@@ -45,28 +45,57 @@ export async function typescript(
45
45
const tsconfigPath = options . tsconfigPath
46
46
const isTypeAware = ! ! tsconfigPath
47
47
48
+ // https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/eslintrc/recommended-type-checked.ts
48
49
const typeAwareRules : TypedFlatConfigItem [ 'rules' ] = {
49
- 'dot-notation ' : 'off' ,
50
+ 'no-array-constructor ' : 'off' ,
50
51
'no-implied-eval' : 'off' ,
52
+ 'no-throw-literal' : 'off' ,
53
+ 'no-unused-expressions' : 'off' ,
54
+ 'no-unused-vars' : 'off' ,
55
+ 'prefer-promise-reject-errors' : 'off' ,
51
56
'require-await' : 'off' ,
52
57
'ts/await-thenable' : 'error' ,
53
- 'ts/dot-notation' : [ 'error' , { allowKeywords : true } ] ,
58
+ 'ts/ban-ts-comment' : 'error' ,
59
+ 'ts/no-array-constructor' : 'error' ,
60
+ 'ts/no-array-delete' : 'error' ,
61
+ 'ts/no-base-to-string' : 'error' ,
62
+ 'ts/no-duplicate-enum-values' : 'error' ,
63
+ 'ts/no-duplicate-type-constituents' : 'error' ,
64
+ 'ts/no-empty-object-type' : 'error' ,
65
+ 'ts/no-explicit-any' : 'error' ,
66
+ 'ts/no-extra-non-null-assertion' : 'error' ,
54
67
'ts/no-floating-promises' : 'error' ,
55
68
'ts/no-for-in-array' : 'error' ,
56
69
'ts/no-implied-eval' : 'error' ,
70
+ 'ts/no-misused-new' : 'error' ,
57
71
'ts/no-misused-promises' : 'error' ,
72
+ 'ts/no-namespace' : 'error' ,
73
+ 'ts/no-non-null-asserted-optional-chain' : 'error' ,
74
+ 'ts/no-redundant-type-constituents' : 'error' ,
75
+ 'ts/no-require-imports' : 'error' ,
76
+ 'ts/no-this-alias' : 'error' ,
58
77
'ts/no-unnecessary-type-assertion' : 'error' ,
78
+ 'ts/no-unnecessary-type-constraint' : 'error' ,
59
79
'ts/no-unsafe-argument' : 'error' ,
60
80
'ts/no-unsafe-assignment' : 'error' ,
61
81
'ts/no-unsafe-call' : 'error' ,
82
+ 'ts/no-unsafe-declaration-merging' : 'error' ,
83
+ 'ts/no-unsafe-enum-comparison' : 'error' ,
84
+ 'ts/no-unsafe-function-type' : 'error' ,
62
85
'ts/no-unsafe-member-access' : 'error' ,
63
86
'ts/no-unsafe-return' : 'error' ,
64
- 'ts/promise-function-async' : 'error' ,
87
+ 'ts/no-unsafe-unary-minus' : 'error' ,
88
+ 'ts/no-unused-expressions' : 'error' ,
89
+ 'ts/no-unused-vars' : 'error' ,
90
+ 'ts/no-wrapper-object-types' : 'error' ,
91
+ 'ts/only-throw-error' : 'error' ,
92
+ 'ts/prefer-as-const' : 'error' ,
93
+ 'ts/prefer-namespace-keyword' : 'error' ,
94
+ 'ts/prefer-promise-reject-errors' : 'error' ,
95
+ 'ts/require-await' : 'error' ,
65
96
'ts/restrict-plus-operands' : 'error' ,
66
97
'ts/restrict-template-expressions' : 'error' ,
67
- 'ts/return-await' : 'error' ,
68
- 'ts/strict-boolean-expressions' : 'error' ,
69
- 'ts/switch-exhaustiveness-check' : 'error' ,
98
+ 'ts/triple-slash-reference' : 'error' ,
70
99
'ts/unbound-method' : 'error' ,
71
100
}
72
101
0 commit comments