Skip to content

Commit

Permalink
Add eslint and prettier config files
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenkumarct committed Oct 9, 2023
1 parent d44fcf4 commit 614d5b6
Show file tree
Hide file tree
Showing 10 changed files with 88 additions and 0 deletions.
1 change: 1 addition & 0 deletions order-syncer/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
19 changes: 19 additions & 0 deletions order-syncer/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
root: true,
extends: ['eslint:recommended'],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
rules: {
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-undef': 'error',
'no-console': 'error',
'no-const-assign': 'error',
},
env: {
es6: true,
jest: true,
node: true, //adds things like process to global
},
};
13 changes: 13 additions & 0 deletions order-syncer/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"trailingComma": "es5",
"singleQuote": true,
"parser": "babel",
"overrides": [
{
"files": "*.json",
"options": {
"parser": "json"
}
}
]
}
3 changes: 3 additions & 0 deletions order-syncer/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [['@babel/preset-env', {targets: {node: 'current'}}]],
};
8 changes: 8 additions & 0 deletions order-syncer/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
displayName: 'Tests Javascript Application - Service',
moduleDirectories: ['node_modules', 'src'],
testMatch: ['**/tests/**/*.js?(x)', '**/?(*.)+(spec|test).js?(x)'],
testEnvironment: 'node',
verbose: true,
silent: true,
};
1 change: 1 addition & 0 deletions tax-calculator/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
19 changes: 19 additions & 0 deletions tax-calculator/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
root: true,
extends: ['eslint:recommended'],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
rules: {
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-undef': 'error',
'no-console': 'error',
'no-const-assign': 'error',
},
env: {
es6: true,
jest: true,
node: true, //adds things like process to global
},
};
13 changes: 13 additions & 0 deletions tax-calculator/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"trailingComma": "es5",
"singleQuote": true,
"parser": "babel",
"overrides": [
{
"files": "*.json",
"options": {
"parser": "json"
}
}
]
}
3 changes: 3 additions & 0 deletions tax-calculator/babel.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [['@babel/preset-env', {targets: {node: 'current'}}]],
};
8 changes: 8 additions & 0 deletions tax-calculator/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
displayName: 'Tests Javascript Application - Service',
moduleDirectories: ['node_modules', 'src'],
testMatch: ['**/tests/**/*.js?(x)', '**/?(*.)+(spec|test).js?(x)'],
testEnvironment: 'node',
verbose: true,
silent: true,
};

0 comments on commit 614d5b6

Please sign in to comment.