-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.json
executable file
·53 lines (53 loc) · 2.01 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
{
"parser": "@typescript-eslint/parser", //makes typescript syntax readable for eslint
"extends": [
"eslint:recommended", //enforces rules from eslint team
"plugin:react/recommended", //enforces react rules (no-direct-mutation-state rule etc.)
"plugin:react-hooks/recommended", //enforces rules of hooks from react (exhaustive-deps rule etc.)
"plugin:jsx-a11y/recommended", //evaluation of the JSX to spot accessibility issues
"plugin:@typescript-eslint/recommended", // enforces typescript rules
"plugin:import/recommended", //enforces correct file paths and import names (no-unresolved rule etc.)
"plugin:import/typescript", //enforces correct typescript file paths and import names
"prettier" //turns off rules that will be enforced by prettier to avoid duplication
],
"env": {
"es6": true,
"browser": true,
"node": true
},
//settings that will be used by all the plugins if not specified
"settings": {
"react": {
"version": "detect" // automatically picks the react version we have installed
},
//need ts import resolver for plugin:import/typescript rules to work
"import/parsers": { "@typescript-eslint/parser": [".ts", ".tsx"] },
"import/resolver": {
"typescript": {
"alwaysTryTypes": true
}
}
},
"rules": {
"react/prop-types": "off",
"react/display-name": "off",
"react-hooks/exhaustive-deps": "off",
"no-useless-escape": "off",
"react/no-unescaped-entities": "off",
"react/react-in-jsx-scope": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/anchor-is-valid": [
"off",
{
"components": ["Link"]
}
],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-var-requires": "off",
"import/no-named-as-default": "off"
}
}