-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor ESLint configurations and update dependencies
The old ESLint configurations have been deleted and replaced with new ones, both for the server side and the client side. Additionally, the versions of 'eslint' package were downgraded and new dependencies such as '@typescript-eslint/eslint-plugin', 'eslint-plugin-import', 'eslint-plugin-react', 'eslint-plugin-jest', and 'eslint-plugin-react-hooks' were added to facilitate ESLint configurations and to enforce code styles.
- Loading branch information
manu
committed
Jun 20, 2024
1 parent
0df2ffe
commit 1a63f22
Showing
5 changed files
with
132 additions
and
123 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
{ | ||
"env": { | ||
"node": true, | ||
"es2021": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint", "import", "prettier" | ||
], | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "off", | ||
// Possible errors | ||
"no-empty": [ | ||
"error", | ||
{ | ||
"allowEmptyCatch": true | ||
} | ||
], | ||
|
||
// Best practices | ||
"curly": ["error", "all"], | ||
"eqeqeq": [ | ||
"error", | ||
"always", | ||
{ | ||
"null": "ignore" | ||
} | ||
], | ||
"no-caller": "error", | ||
"no-new": "error", | ||
"no-with": "error", | ||
|
||
// Stylistic issues | ||
"brace-style": [ | ||
"error", | ||
"1tbs", | ||
{ | ||
"allowSingleLine": true | ||
} | ||
], | ||
"func-call-spacing": ["error", "never"], | ||
"indent": "off", | ||
// "@typescript-eslint/indent": [ "error", 2, { | ||
// "SwitchCase": 1 | ||
// }], | ||
"no-trailing-spaces": "error", | ||
"key-spacing": [ | ||
"error", | ||
{ | ||
"beforeColon": false, | ||
"afterColon": true | ||
} | ||
], | ||
"keyword-spacing": "error", | ||
"no-bitwise": "error", | ||
"space-before-function-paren": [ | ||
"error", | ||
{ | ||
"anonymous": "ignore", | ||
"named": "never" | ||
} | ||
], | ||
"space-infix-ops": "error", | ||
"space-unary-ops": [ | ||
"error", | ||
{ | ||
"words": false, | ||
"nonwords": false | ||
} | ||
], | ||
|
||
// Variables | ||
"no-use-before-define": [ | ||
"error", | ||
{ | ||
"functions": false | ||
} | ||
], | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": "error", | ||
// ES6+ | ||
"sort-imports": [ | ||
"error", | ||
{ | ||
"ignoreCase": false, | ||
"ignoreDeclarationSort": true, | ||
"ignoreMemberSort": false | ||
} | ||
], | ||
"import/newline-after-import": ["error"], | ||
"import/order": [ | ||
"error", | ||
{ | ||
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"], | ||
"newlines-between": "never" | ||
} | ||
], | ||
|
||
// TS-specific | ||
"@typescript-eslint/member-delimiter-style": [ | ||
"error", | ||
{ | ||
"multiline": { | ||
"delimiter": "semi", | ||
"requireLast": true | ||
}, | ||
"singleline": { | ||
"delimiter": "semi", | ||
"requireLast": false | ||
} | ||
} | ||
], | ||
"@typescript-eslint/no-require-imports": "error" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters