-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
89 lines (89 loc) · 2.77 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
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"next/core-web-vitals"
],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "eslint-plugin-sonarjs"],
"root": true,
"parserOptions": {
"project": ["tsconfig.json"]
},
"rules": {
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-misused-promises": [
"error",
{
"checksVoidReturn": false
}
],
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-expect-error": "allow-with-description",
"ts-ignore": "allow-with-description",
"ts-nocheck": "allow-with-description",
"ts-check": "allow-with-description"
}
],
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/prefer-as-const": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/type-annotation-spacing": [
"error",
{
"before": false,
"after": true,
"overrides": {
"arrow": {
"before": true
}
}
}
],
"@typescript-eslint/no-inferrable-types": "off",
"react/prefer-read-only-props": "error",
"react/jsx-no-useless-fragment": [
"error",
{
"allowExpressions": true
}
],
"no-var": "error",
"prefer-const": "error",
"func-call-spacing": ["error", "never"],
"key-spacing": [
"error",
{
"beforeColon": false,
"afterColon": true
}
],
"no-debugger": "error",
"no-dupe-keys": "error",
"no-with": "error",
"eqeqeq": ["error", "always"],
"quotes": [
"error",
"single",
{
"avoidEscape": true
}
],
"no-unused-vars": "off",
"camelcase": "error",
"no-duplicate-imports": "error",
"require-await": "error",
"sonarjs/no-duplicate-string": "off",
"sonarjs/cognitive-complexity": "warn",
"sonarjs/no-small-switch": "warn"
}
}