@@ -28,6 +28,13 @@ module.exports = {
28
28
] ,
29
29
parser : '@typescript-eslint/parser' ,
30
30
parserOptions : {
31
+ // Ensure JSDoc parsing is enabled.
32
+ jsDocParsingMode : 'all' ,
33
+
34
+ // Speed up ESLint CLI runs. This is opt-out in v8.
35
+ // The only known bugs are with project references, which we don't use.
36
+ automaticSingleRunInference : true ,
37
+
31
38
// A stable, but experimental, option to speed up linting.
32
39
// It's also more feature complete, as it relies on the TypeScript Language Service.
33
40
EXPERIMENTAL_useProjectService : true // TODO(@lishaduck) [typescript-eslint@>=8]: Rename to `projectService`.
@@ -72,7 +79,18 @@ module.exports = {
72
79
'unicorn/prefer-node-protocol' : 'error' ,
73
80
'@typescript-eslint/no-var-requires' : 'off' ,
74
81
'@typescript-eslint/no-empty-function' : 'off' ,
75
- '@typescript-eslint/no-unused-vars' : [ 'error' , { argsIgnorePattern : '^_' } ] ,
82
+ '@typescript-eslint/no-unused-vars' : [
83
+ 'error' ,
84
+ {
85
+ args : 'all' ,
86
+ argsIgnorePattern : '^_' ,
87
+ caughtErrors : 'all' ,
88
+ caughtErrorsIgnorePattern : '^_' ,
89
+ destructuredArrayIgnorePattern : '^_' ,
90
+ varsIgnorePattern : '^_' ,
91
+ ignoreRestSiblings : true
92
+ }
93
+ ] ,
76
94
'@typescript-eslint/switch-exhaustiveness-check' : 'error' ,
77
95
'@typescript-eslint/consistent-type-definitions' : [ 'error' , 'type' ] ,
78
96
'default-case' : 'off' ,
@@ -101,15 +119,27 @@ module.exports = {
101
119
'unicorn/prevent-abbreviations' : 'off' ,
102
120
'unicorn/catch-error-name' : [ 'error' , { ignore : [ / ^ e r r / i] } ] , // We use "error" for the result of `intoError` as well.
103
121
'no-fallthrough' : 'off' , // TSESLint doesn't provide an alternative, and TS checks for this anyway.
122
+ 'prefer-promise-reject-errors' : 'off' , // TSESlint provides an alternative.
123
+
124
+ // typescript-eslint v8, but now:
125
+ '@typescript-eslint/no-array-delete' : 'error' , // Recommended in v8
126
+ 'no-loss-of-precision' : 'error' , // This rule handles numeric separators now
127
+ '@typescript-eslint/no-loss-of-precision' : 'off' , // This rule is redundant
128
+ 'no-unused-expressions' : 'off' , // This rule is replaced with the TSESlint version.
129
+ '@typescript-eslint/no-unused-expressions' : 'error' , // Support TS stuff.
130
+ '@typescript-eslint/no-throw-literal' : 'error' , // Recommended in v8 (w/rename to `only-throw-error`)
131
+ '@typescript-eslint/prefer-namespace-keyword' : 'error' , // Recommended in v8
104
132
133
+ // Unsafe
134
+ '@typescript-eslint/no-unsafe-assignment' : 'off' , // Blocked on typescript-eslint/typescript-eslint#1682.
105
135
// TODO(@lishaduck): Once there are no more `any`s, start enforcing these rules.
106
- '@typescript-eslint/no-unsafe-assignment' : 'off' ,
107
136
'@typescript-eslint/no-unsafe-argument' : 'off' ,
108
137
'@typescript-eslint/no-unsafe-member-access' : 'off' ,
109
138
110
139
// TODO(@lishaduck): Enable stricter promise rules.
111
140
'@typescript-eslint/no-misused-promises' : 'off' ,
112
141
'@typescript-eslint/no-floating-promises' : 'off' ,
142
+ '@typescript-eslint/prefer-promise-reject-errors' : 'off' ,
113
143
'promise/catch-or-return' : 'off' ,
114
144
'promise/always-return' : 'off' ,
115
145
0 commit comments