-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.json
180 lines (180 loc) · 6 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
{
"parser": "@typescript-eslint/parser", // airbnb-typescript won't work without specifying the parser
"extends": ["airbnb", "airbnb-typescript", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended", "next/core-web-vitals"],
"globals": {
"globalThis": false
},
"plugins": ["no-relative-import-paths"],
"rules": {
"prettier/prettier": 1,
"react/jsx-closing-bracket-location": 2,
"react/jsx-closing-tag-location": 2,
"react/sort-comp": 2,
"jsx-quotes": 2,
"no-multi-spaces": 2,
"react/jsx-tag-spacing": 2,
"react/jsx-curly-spacing": 2,
"curly": 1,
"react/jsx-wrap-multilines": ["error", { "declaration": false, "assignment": false }],
"react/self-closing-comp": 2,
"react/prop-types": 2,
"no-var": 2,
"no-const-assign": 2,
"no-restricted-imports": [
2,
{
"name": "next/navigation",
"importNames": ["useParams"],
"message": "Please import from `components/useParams/useParams` instead."
}
],
"prefer-const": 1,
"react/jsx-curly-brace-presence": 2,
"no-console": [
1,
{
"allow": ["error"]
}
],
"comma-dangle": [2, "always-multiline"],
"max-len": [
1,
{
"code": 150,
"ignoreStrings": true,
"ignoreComments": true
}
],
"arrow-parens": [1, "always"],
"no-param-reassign": [
1,
{
"props": true,
"ignorePropertyModificationsFor": ["state"]
}
],
"no-relative-import-paths/no-relative-import-paths": [
1,
{
"rootDir": "src"
}
],
"import/no-unresolved": 0,
"indent": 0,
"operator-linebreak": 0,
"object-curly-newline": 0,
"implicit-arrow-linebreak": 0,
"function-paren-newline": 0,
"no-restricted-syntax": 0,
"import/no-extraneous-dependencies": 0,
"no-underscore-dangle": 0,
"react/no-unescaped-entities": 0,
"no-confusing-arrow": 0,
"newline-per-chained-call": 0,
// @typescript-eslint only as warnings to facilitate migration
"@typescript-eslint/ban-ts-comment": 1,
"@typescript-eslint/no-explicit-any": 1,
"@typescript-eslint/no-this-alias": 1,
"@typescript-eslint/no-var-requires": 1,
"@typescript-eslint/ban-types": 1,
"@typescript-eslint/no-unused-vars": 1,
"@typescript-eslint/naming-convention": [
1,
{
"selector": "variable",
"format": ["camelCase", "PascalCase", "UPPER_CASE"],
"leadingUnderscore": "allow"
}
],
"@typescript-eslint/no-shadow": 1,
"@typescript-eslint/default-param-last": 1,
"@typescript-eslint/no-use-before-define": 1,
"@typescript-eslint/return-await": 1,
"@typescript-eslint/no-unused-expressions": 1,
"react/jsx-filename-extension": 0,
"react/destructuring-assignment": 1,
"react/require-default-props": 0,
"react/no-unused-state": 1,
"react/jsx-props-no-spreading": 0,
"react/function-component-definition": 0,
"react/forbid-prop-types": 1,
"react/no-array-index-key": 1,
"react/no-unused-prop-types": 1,
"react/no-access-state-in-setstate": 1,
"react/no-arrow-function-lifecycle": 1,
"react/jsx-boolean-value": 1,
"react/jsx-no-useless-fragment": 1,
"react/no-unused-class-component-methods": 1,
"react/state-in-constructor": 1,
"react/no-unstable-nested-components": 1,
"react/button-has-type": 1,
"jsx-a11y/control-has-associated-label": 1,
"jsx-a11y/no-noninteractive-tabindex": 1,
"jsx-a11y/anchor-is-valid": 1,
"react/no-this-in-sfc": 1,
"jsx-a11y/interactive-supports-focus": 1,
"jsx-a11y/no-noninteractive-element-to-interactive-role": 1,
"react/prefer-stateless-function": 1,
"react/jsx-no-bind": 1,
"jsx-a11y/label-has-associated-control": 1,
"no-unused-vars": 0,
"import/named": 1,
"no-await-in-loop": 1,
"no-nested-ternary": 1,
"no-prototype-builtins": 1,
"prefer-destructuring": 1,
"space-before-function-paren": 1,
"class-methods-use-this": 1,
"no-shadow": 1,
"no-empty": 1,
"consistent-return": 1,
"no-use-before-define": 1,
"radix": 1,
"import/prefer-default-export": 1,
"import/extensions": 1,
"no-return-await": 1,
"no-unused-expressions": 1,
"no-lonely-if": 1,
"no-plusplus": 1,
"no-bitwise": 1,
"prefer-promise-reject-errors": 1,
"prefer-rest-params": 1,
"no-return-assign": 1,
"no-restricted-globals": 1,
"no-case-declarations": 1,
"no-continue": 1,
"import/no-duplicates": 1,
"import/no-cycle": 1,
"no-tabs": 1,
"no-cond-assign": 1,
"global-require": 1,
"new-cap": 1,
"guard-for-in": 1,
"operator-assignment": 1,
"import/no-named-as-default": 1,
"no-unsafe-optional-chaining": 1,
"default-case-last": 1,
"default-param-last": 1,
"import/no-import-module-exports": 1,
"prefer-regex-literals": 1,
"wrap-iife": 1,
"no-constructor-return": 1,
"react/display-name": 1,
"react/no-unknown-property": 1
},
"overrides": [
{
"files": ["**/*.stories.*"],
"rules": {
"import/no-anonymous-default-export": "off"
}
}
],
"env": {
"jest": true
},
"parserOptions": {
"project": "./tsconfig.json"
},
"ignorePatterns": ["next.config.js"]
}