-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
123 lines (123 loc) · 3.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
{
"env": {
"es6": true,
"node": true
},
"extends": [
"next/core-web-vitals",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:jsx-a11y/recommended"
],
"ignorePatterns": ["/*.js"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"ecmaFeatures": {
"jsx": true
}
},
"plugins": ["@typescript-eslint", "import", "jsx-a11y", "promise"],
"rules": {
"eqeqeq": ["error"],
"import/named": "warn",
"import/order": [
"error",
{
"groups": [
"builtin",
"external",
"internal",
"parent",
"sibling",
"index"
],
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
"jsx-a11y/anchor-is-valid": [
"error",
{
"components": ["Link"],
"specialLink": ["hrefLeft", "hrefRight"],
"aspects": ["invalidHref", "preferButton"]
}
],
"jsx-a11y/no-noninteractive-tabindex": "error",
"no-implicit-coercion": ["error"],
"no-multi-spaces": "error",
"no-nested-ternary": "warn",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-use-before-define": "error",
"no-useless-catch": "error",
"prefer-promise-reject-errors": [
"error",
{
"allowEmptyReject": true
}
],
"promise/param-names": "error",
"promise/prefer-await-to-callbacks": "error",
"promise/prefer-await-to-then": "error",
"promise/no-return-wrap": "error",
"quotes": [
"error",
"single",
{
"avoidEscape": true
}
],
"react/display-name": "error",
"react/jsx-curly-brace-presence": [
"error",
{
"propElementValues": "always"
}
],
"react/jsx-key": "error",
"react/jsx-no-useless-fragment": [
"error",
{
"allowExpressions": true
}
],
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/no-array-index-key": "error",
"react/no-access-state-in-setstate": "error",
"react/no-danger": "error",
"react/no-unused-state": "error",
"react/no-unstable-nested-components": "error",
"react/self-closing-comp": [
"error",
{
"component": true,
"html": false
}
],
"react/prefer-stateless-function": "error",
"require-await": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/no-unused-vars": "error"
},
"settings": {
"import/extensions": [".ts", ".tsx"],
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"node": {
"extensions": [".ts", ".tsx"]
},
"typescript": {}
},
"react": {
"version": "detect"
}
}
}