-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
44 lines (42 loc) · 1.37 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
{
"extends": [
"next/core-web-vitals",
"next/typescript",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier"
],
"plugins": ["@typescript-eslint"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"rules": {
// Strict TypeScript rules
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-unnecessary-condition": "warn",
// General strict rules
"quotes": ["error", "double"],
"no-console": ["error", { "allow": ["warn", "error"] }],
"eqeqeq": "error",
"curly": "error",
"no-var": "error",
"prefer-const": "error",
"no-unused-expressions": "error",
"no-shadow": "error",
"no-return-await": "error",
"require-await": "error",
"no-throw-literal": "error",
"no-param-reassign": "error",
// React specific rules
"react/jsx-boolean-value": "error",
"react/jsx-no-useless-fragment": "error",
"react/no-array-index-key": "error",
"react/no-unused-prop-types": "error"
}
}