-
-
Notifications
You must be signed in to change notification settings - Fork 241
/
.eslintrc
117 lines (111 loc) · 3.16 KB
/
.eslintrc
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
{
"parser": "@typescript-eslint/parser",
"env": {
"es6": true,
"shared-node-browser": true
},
"extends": [
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"no-console": "error",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"args": "after-used",
"ignoreRestSiblings": true
}
],
"@typescript-eslint/no-var-requires": "warn",
"@typescript-eslint/explicit-function-return-type": "warn"
},
"overrides": [
{
"files": [
"packages/*/src/**/*.ts"
],
"parserOptions": {
"project": "./tsconfig.eslint.json"
},
"extends": [
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"plugins": ["import"],
"rules": {
"@typescript-eslint/prefer-regexp-exec": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/no-floating-promises": ["error", { "ignoreVoid": true }],
"@typescript-eslint/strict-boolean-expressions": "warn",
"@typescript-eslint/no-throw-literal": "error",
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/no-unsafe-argument": "warn",
"import/no-extraneous-dependencies": ["error", { "devDependencies": ["**/*.{test,spec}.ts", "**/__tests__/__helpers__/*.ts"] }]
}
},
{
"files": [
"packages/cli/src/**/*.ts"
],
"rules": {
"no-console": "warn"
}
},
{
"files": [
"packages/*/src/**/__tests__/*.ts",
"test-harness/**/*.{ts,js}"
],
"rules": {
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/restrict-template-expressions": "off"
}
},
{
"files": [
"src/**/__tests__/**/*.jest.test.{ts,js}",
"__mocks__/**/*.{ts,js}"
],
"env": {
"jest": true,
"node": true
}
},
{
"files": [
"src/**/__tests__/**/*.karma.test.{ts,js}"
],
"env": {
"browser": true,
"jasmine": true
}
},
{
"files": [
"scripts/**/*.{mjs,ts}",
"test-harness/**/*.{ts,js}"
],
"env": {
"node": true
}
}
]
}