Add eslint-plugin-import
This commit is contained in:
parent
2031935ce4
commit
9b06c8aed3
21
.eslintrc.js
21
.eslintrc.js
|
@ -9,6 +9,9 @@ module.exports = {
|
|||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
||||
"plugin:import/errors",
|
||||
"plugin:import/warnings",
|
||||
"plugin:import/typescript",
|
||||
"plugin:react/recommended",
|
||||
"plugin:prettier/recommended",
|
||||
],
|
||||
|
@ -16,12 +19,30 @@ module.exports = {
|
|||
rules: {
|
||||
"prettier/prettier": "error",
|
||||
|
||||
"import/first": "warn",
|
||||
"import/order": [
|
||||
"error",
|
||||
{
|
||||
"newlines-between": "always",
|
||||
"alphabetize": {
|
||||
"order": "asc",
|
||||
"caseInsensitive": true,
|
||||
},
|
||||
"pathGroups": {
|
||||
"pattern": "@/**",
|
||||
"group": "external",
|
||||
"position": "after",
|
||||
}
|
||||
},
|
||||
],
|
||||
|
||||
"react/prop-types": "off",
|
||||
"react-hooks/rules-of-hooks": "error",
|
||||
"react-hooks/exhaustive-deps": "error",
|
||||
|
||||
// Turn off these rules
|
||||
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||
"import/no-unresolved": "off",
|
||||
},
|
||||
settings: {
|
||||
react: {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -34,6 +34,7 @@
|
|||
"@typescript-eslint/parser": "4.28.4",
|
||||
"eslint": "7.32.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-import": "^2.24.0",
|
||||
"eslint-plugin-prettier": "^3.4.0",
|
||||
"eslint-plugin-react": "7.24.0",
|
||||
"eslint-plugin-react-hooks": "^4.2.0",
|
||||
|
|
Loading…
Reference in New Issue