-
Notifications
You must be signed in to change notification settings - Fork 87
/
.eslintrc.json
89 lines (89 loc) · 2.45 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
{
"root": true,
"parser": "@typescript-eslint/parser",
"extends": ["eslint:recommended", "eslint-config-prettier"],
"plugins": ["eslint-plugin-import"],
"ignorePatterns": ["src/vendor/**/*"],
"rules": {
"comma-dangle": ["error", "never"],
"curly": "error",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-deprecated": "warn",
"import/no-duplicates": "error",
"import/no-mutable-exports": "error",
"import/no-namespace": "error",
"import/no-self-import": "error",
"import/no-useless-path-segments": "error",
"import/order": [
"error",
{
"newlines-between": "never",
"alphabetize": {
"order": "asc",
"caseInsensitive": false
}
}
],
"no-console": "error",
"quotes": ["error", "single", "avoid-escape"]
},
"overrides": [
{
"files": ["*.ts"],
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:eslint-plugin-import/typescript",
"eslint-config-prettier/@typescript-eslint"
],
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/array-type": [
"error",
{
"default": "array-simple"
}
],
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-expect-error": "allow-with-description"
}
],
"@typescript-eslint/consistent-type-assertions": [
"error",
{
"assertionStyle": "as"
}
],
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "no-public"
}
],
"@typescript-eslint/method-signature-style": ["error", "method"],
"@typescript-eslint/no-non-null-assertion": "off",
"react/no-unescaped-entities": "off",
"react/prop-types": "off",
"react-hooks/exhaustive-deps": "off"
}
},
{
"files": ["*.test.ts", "jest.config.js", "jest.setup.js"],
"env": {
"node": true,
"jest": true
},
"extends": ["plugin:eslint-plugin-jest/recommended", "plugin:eslint-plugin-jest/style"],
"plugins": ["eslint-plugin-jest"],
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"modules": true
}
}
}
]
}