-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
141 lines (141 loc) · 4.22 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
{
"root": true,
"parser": "@typescript-eslint/parser",
"extends": ["eslint:recommended", "eslint-config-prettier", "plugin:eslint-plugin-import/errors"],
"plugins": ["eslint-plugin-react", "eslint-plugin-import"],
"ignorePatterns": ["hardhat.config.ts", "jest_config", "node-scripts"],
"rules": {
"eqeqeq": ["error", "always", { "null": "ignore" }],
"import/first": "error",
"import/newline-after-import": "error",
"import/no-deprecated": "error",
"import/no-duplicates": "error",
"import/no-mutable-exports": "error",
"import/no-namespace": "error",
"import/no-self-import": "error",
"import/no-unresolved": "off",
"import/no-useless-path-segments": "error",
"import/order": [
"error",
{
"newlines-between": "always",
"groups": [["builtin", "external"], "internal", ["parent", "sibling", "index"]],
"pathGroups": [
{
"pattern": "@{assets,components,config,database,fixtures,features,helpers,hooks,routing,sass,services,store,theme,translations,types,utils,vendor,workers}{**,**/**}",
"group": "internal"
},
{
"pattern": "react",
"group": "external",
"position": "before"
}
],
"pathGroupsExcludedImportTypes": [],
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
"sort-imports": [
"error",
{
"ignoreCase": true,
"ignoreDeclarationSort": true,
"allowSeparatedGroups": true
}
]
},
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:eslint-plugin-react/recommended",
"plugin:eslint-plugin-react-hooks/recommended",
"plugin:eslint-plugin-import/typescript",
"eslint-config-prettier/@typescript-eslint"
],
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/consistent-type-assertions": [
"error",
{
"assertionStyle": "as"
}
],
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/method-signature-style": ["error", "method"],
"@typescript-eslint/no-inferrable-types": [
"error",
{
"ignoreParameters": true
}
],
"@typescript-eslint/no-empty-function": [
"error",
{
"allow": ["private-constructors"]
}
],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/prefer-nullish-coalescing": "error",
"react/display-name": "off",
"react/no-unescaped-entities": "off",
"react/prop-types": "off",
"react/react-in-jsx-scope": "off",
"react-hooks/exhaustive-deps": "off",
// Configure Jest to recognise react-saga-test-plan assertions
// https://github.com/jfairbank/redux-saga-test-plan/issues/329
"jest/expect-expect": [
"error",
{
"assertFunctionNames": ["expect", "expectSaga", "testSaga", "expectToThrow"]
}
]
},
"settings": {
"react": {
"version": "detect"
}
},
"parserOptions": {
"project": "./tsconfig.json",
"ecmaFeatures": {
"jsx": true
}
}
},
{
"files": ["*.test.{ts,tsx}", "*.spec.{ts,tsx}", "jest_config/**/*"],
"env": {
"node": true,
"jest": true
},
"extends": ["plugin:eslint-plugin-jest/recommended", "plugin:eslint-plugin-jest/style"],
"plugins": ["eslint-plugin-jest"]
},
{
"files": ["__tests__/**/*.js"],
"extends": ["plugin:testcafe/recommended"],
"plugins": ["eslint-plugin-testcafe"]
}
],
"parserOptions": {
"ecmaVersion": 2020
},
"env": {
"browser": true,
"node": true
}
}