Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
feat: Update eslint rule overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyzwezdin committed Jan 12, 2024
1 parent b3ce739 commit 8d2370c
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 8 deletions.
39 changes: 35 additions & 4 deletions next.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module.exports = {
"env": {
"browser": true,
"es2021": true
"es2021": true,
"node": true
},
"extends": [
"standard-with-typescript",
Expand All @@ -22,6 +23,11 @@ module.exports = {
}
}
],
"settings": {
"react": {
"version": "detect"
}
},
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
Expand All @@ -30,10 +36,35 @@ module.exports = {
"react"
],
"rules": {
"@typescript-eslint/array-type": [ "warn", { default: "array" } ],
"@typescript-eslint/ban-types": [ "error", { "types": { "{}": false }, "extendDefaults": true } ],
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/consistent-type-imports": "off",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-confusing-void-expression": "off",
"@typescript-eslint/no-extraneous-class": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/prefer-optional-chain": "warn",
"@typescript-eslint/prefer-readonly": "warn",
"@typescript-eslint/promise-function-async": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/triple-slash-reference": "off",
"@typescript-eslint/unbound-method": "off",
"import/no-anonymous-default-export": "off",
"no-extra-boolean-cast": "warn",
"no-undef-init": "warn",
"no-useless-escape": "warn",
"no-void": "off",
"prefer-const": "warn",
"react-hooks/exhaustive-deps": "error",
"spaced-comment": "warn"
},
"ignorePatterns": [
'node_modules/',
'**/node_modules/',
'/**/node_modules/*'
"node_modules/",
"**/node_modules/",
"/**/node_modules/*"
]
}
32 changes: 28 additions & 4 deletions node.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,35 @@ module.exports = {
"sourceType": "module"
},
"rules": {
"@typescript-eslint/explicit-function-return-type": "warn"
"@typescript-eslint/array-type": [ "warn", { default: "array" } ],
"@typescript-eslint/ban-types": [ "error", { "types": { "{}": false }, "extendDefaults": true } ],
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/consistent-type-imports": "off",
"@typescript-eslint/dot-notation": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-confusing-void-expression": "off",
"@typescript-eslint/no-extraneous-class": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/prefer-nullish-coalescing": "off",
"@typescript-eslint/prefer-optional-chain": "warn",
"@typescript-eslint/prefer-readonly": "warn",
"@typescript-eslint/promise-function-async": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/triple-slash-reference": "off",
"@typescript-eslint/unbound-method": "off",
"import/no-anonymous-default-export": "off",
"no-extra-boolean-cast": "warn",
"no-undef-init": "warn",
"no-useless-escape": "warn",
"no-void": "off",
"prefer-const": "warn",
"react-hooks/exhaustive-deps": "error",
"spaced-comment": "warn"
},
"ignorePatterns": [
'node_modules/',
'**/node_modules/',
'/**/node_modules/*'
"node_modules/",
"**/node_modules/",
"/**/node_modules/*"
]
}
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
},
"dependencies": {
"@typescript-eslint/eslint-plugin": "6.18.1",
"@typescript-eslint/parser": "6.18.1",
"eslint-config-next": "14.0.4",
"eslint-config-prettier": "9.1.0",
"eslint-config-standard-with-typescript": "43.0.0",
Expand Down

0 comments on commit 8d2370c

Please sign in to comment.