1
1
module . exports = {
2
+ extends : [
3
+ 'plugin:@typescript-eslint/recommended-type-checked' ,
4
+ 'plugin:@typescript-eslint/stylistic-type-checked' ,
5
+ 'prettier' ,
6
+ ] ,
2
7
parser : '@typescript-eslint/parser' ,
3
- extends : [ 'plugin:@typescript-eslint/recommended' , 'prettier' ] ,
8
+ parserOptions : {
9
+ project : [ './packages/*/tsconfig.json' , './tsconfig.eslint.json' ] ,
10
+ tsconfigRootDir : __dirname ,
11
+ } ,
4
12
plugins : [ '@typescript-eslint' , 'prettier' , 'no-only-tests' ] ,
5
13
rules : {
14
+ // These off/configured-differently-by-default rules fit well for us
15
+ '@typescript-eslint/array-type' : [ 'error' , { default : 'array-simple' } ] ,
16
+ '@typescript-eslint/no-unused-vars' : [ 'error' , { ignoreRestSiblings : true } ] ,
17
+ 'no-only-tests/no-only-tests' : 'error' ,
18
+ '@typescript-eslint/no-shadow' : [ 'error' ] ,
19
+ 'no-console' : 'warn' ,
20
+
21
+ // Todo: do we want these?
22
+ '@typescript-eslint/array-type' : 'off' ,
6
23
'@typescript-eslint/ban-ts-comment' : 'off' ,
7
- '@typescript-eslint/camelcase' : 'off' ,
8
- '@typescript-eslint/explicit-module-boundary-types' : 'off' ,
24
+ '@typescript-eslint/class-literal-property-style' : 'off' ,
25
+ '@typescript-eslint/consistent-indexed-object-style' : 'off' ,
26
+ '@typescript-eslint/consistent-type-definitions' : 'off' ,
27
+ '@typescript-eslint/dot-notation' : 'off' ,
28
+ '@typescript-eslint/no-base-to-string' : 'off' ,
29
+ '@typescript-eslint/no-confusing-void-expression' : 'off' ,
9
30
'@typescript-eslint/no-empty-function' : 'off' ,
10
- '@typescript-eslint/no-explicit-any' : 'off' ,
11
- '@typescript-eslint/no-non-null-assertion' : 'off' ,
12
- '@typescript-eslint/no-unused-vars' : 'off' ,
13
- '@typescript-eslint/no-use-before-define' : 'off' ,
14
- '@typescript-eslint/no-var-requires' : 'off' ,
31
+ '@typescript-eslint/no-floating-promises' : 'off' ,
32
+ '@typescript-eslint/no-misused-promises' : 'off' ,
33
+ '@typescript-eslint/no-redundant-type-constituents' : 'off' ,
15
34
'@typescript-eslint/no-this-alias' : 'off' ,
16
- 'no-console' : 'warn' ,
35
+ '@typescript-eslint/no-unsafe-argument' : 'off' ,
36
+ '@typescript-eslint/no-unsafe-assignment' : 'off' ,
37
+ '@typescript-eslint/no-unsafe-call' : 'off' ,
38
+ '@typescript-eslint/no-unsafe-member-access' : 'off' ,
39
+ '@typescript-eslint/no-unsafe-return' : 'off' ,
40
+ '@typescript-eslint/prefer-nullish-coalescing' : 'off' ,
41
+ '@typescript-eslint/prefer-string-starts-ends-with' : 'off' ,
42
+ '@typescript-eslint/require-await' : 'off' ,
43
+ '@typescript-eslint/restrict-plus-operands' : 'off' ,
44
+ '@typescript-eslint/restrict-template-expressions' : 'off' ,
45
+ '@typescript-eslint/sort-type-constituents' : 'off' ,
46
+ '@typescript-eslint/unbound-method' : 'off' ,
47
+
48
+ // These rules enabled by the preset configs don't work well for us
49
+ '@typescript-eslint/await-thenable' : 'off' ,
17
50
'prefer-const' : 'off' ,
18
- 'no-shadow' : 'off' ,
19
- '@typescript-eslint/no-shadow' : [ 'error' ] ,
20
- 'no-only-tests/no-only-tests' : 'error' ,
21
51
} ,
22
52
overrides : [
23
53
{
@@ -41,6 +71,7 @@ module.exports = {
41
71
{
42
72
files : [ 'benchmark/**/*.js' ] ,
43
73
rules : {
74
+ '@typescript-eslint/no-unused-vars' : 'off' ,
44
75
'no-console' : 'off' ,
45
76
} ,
46
77
} ,
0 commit comments