-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
77 lines (77 loc) · 2.47 KB
/
.eslintrc.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
{
"extends": [
// By extending from a plugin config, we can get recommended rules without having to add them manually.
"eslint:recommended",
"plugin:react/recommended",
"plugin:import/recommended",
"plugin:jsx-a11y/recommended",
"plugin:@typescript-eslint/recommended",
// This disables the formatting rules in ESLint that Prettier is going to be responsible for handling.
// Make sure it"s always the last config, so it gets the chance to override other configs.
"eslint-config-prettier"
],
"plugins": ["no-relative-import-paths", "import", "react", "react-hooks"],
"settings": {
"react": {
// Tells eslint-plugin-react to automatically detect the version of React to use.
"version": "detect"
},
// Tells eslint how to resolve imports
"import/resolver": {
"node": {
"paths": ["src"],
"extensions": [".js", ".jsx", ".ts", ".tsx"]
},
"alias": {
"map": [["@", "."]],
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
},
"rules": {
// Add your own rules here to override ones from the extended configs.
"no-empty": "off",
"no-constant-condition": "off",
"react/react-in-jsx-scope": "off",
"prefer-template": "error",
"jsx-a11y/no-autofocus": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/consistent-type-imports": "error",
"@typescript-eslint/no-explicit-any": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/no-static-element-interactions": "off",
"import/no-named-as-default": "off",
"react-hooks/rules-of-hooks": "warn",
"react-hooks/exhaustive-deps": "warn",
"jsx-a11y/no-noninteractive-element-interactions": "off",
"no-relative-import-paths/no-relative-import-paths": [
"error",
{
"prefix": "@",
"rootDir": "."
}
],
"import/order": [
"error",
{
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"newlines-between": "always",
"groups": ["builtin", "external", "parent", "sibling", "index"],
"pathGroups": [
{
"pattern": "react",
"group": "external",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": ["builtin"]
}
]
}
}