Skip to content

Commit

Permalink
Update ESLint configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaliimelnychuk committed Jan 27, 2024
1 parent 4859c99 commit 4d814ca
Show file tree
Hide file tree
Showing 3 changed files with 584 additions and 196 deletions.
44 changes: 42 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,44 @@
module.exports = {
extends: ["eslint-config-barecheck-base"],
rules: {}
env: {
node: true,
mocha: true
},
extends: [
"airbnb-base",
"prettier",
"plugin:import/errors",
"plugin:import/warnings"
],
plugins: ["prettier", "simple-import-sort"],
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly"
},
parserOptions: {
ecmaVersion: 11
},
rules: {
"prettier/prettier": "error",
"no-console": 1,
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
// Code complexity rules
complexity: ["error", 10],
"max-depth": ["error", 3],
"max-nested-callbacks": ["error", 3],
"max-statements": ["error", 10],
"max-lines": ["error", 300]
},
overrides: [
// Code complexity rules for test files
{
files: ["*.test.js"],
rules: {
"max-depth": ["error", 2],
"max-nested-callbacks": ["error", 4],
"max-statements": ["error", 30],
"max-lines": ["error", 500]
}
}
]
};
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
"@vercel/ncc": "^0.38.1",
"chai": "^4.3.7",
"eslint": "^8.56.0",
"eslint-config-barecheck-base": "^0.5.4",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-simple-import-sort": "^10.0.0",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"prettier": "^3.2.4",
Expand Down
Loading

0 comments on commit 4d814ca

Please sign in to comment.