-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.json
105 lines (98 loc) · 2.72 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
{
"env": {
"jest": true
},
"extends": [
"next/core-web-vitals",
"plugin:cypress/recommended",
"airbnb",
"plugin:markdown/recommended",
"plugin:jsx-a11y/recommended",
"plugin:sonarjs/recommended",
"plugin:jest-formatting/recommended",
"plugin:promise/recommended",
"prettier",
"plugin:storybook/recommended"
],
"globals": {
"cy": true
},
"overrides": [
{
"extends": ["plugin:testing-library/react"],
"files": ["**/__tests__/**/*.[jt]s?(x)", "**/?(*.)+(spec|test).[jt]s?(x)"]
},
{
"files": ["./cypress/**"],
"rules": {
"sonarjs/no-duplicate-string": "off"
}
},
{
"files": [".eslintrc.js"],
"rules": {
"@typescript-eslint/no-magic-numbers": "off",
"sort-keys": "off"
}
},
{
"extends": ["plugin:jest/recommended"],
"files": ["test/**"],
"plugins": ["jest"],
"rules": { "jest/prefer-expect-assertions": "off" }
}
],
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"import",
"deprecate",
"no-loops",
"jest-formatting",
"promise",
"jest",
"jsx-a11y",
"testing-library",
"sonarjs",
"cypress"
],
"root": true,
"rules": {
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/no-dynamic-delete": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-implicit-any-catch": "error",
"@typescript-eslint/no-invalid-this": "error",
"@typescript-eslint/no-magic-numbers": "error",
"@typescript-eslint/no-redeclare": "error",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-shadow": ["error"],
"@typescript-eslint/no-confusing-non-null-assertion": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-unused-vars": ["error"],
"id-length": [2, { "min": 3, "properties": "never" }],
"import/extensions": "off",
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true
}
],
"import/no-unused-modules": [1, { "ignoreExports": ["./src/pages", "./src/stories"], "unusedExports": true }],
"import/prefer-default-export": "off",
"indent": ["error", 2],
"no-loops/no-loops": 2,
"no-shadow": "off",
"react/function-component-definition": [
2,
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"react/jsx-filename-extension": [0],
"react/jsx-props-no-spreading": "off",
"react/react-in-jsx-scope": "off",
"sort-keys": ["error", "asc", { "caseSensitive": true, "minKeys": 2, "natural": false }]
}
}