1
1
// @ts -check
2
2
import eslint from "@eslint/js" ;
3
+ import * as regexpPlugin from "eslint-plugin-regexp" ;
3
4
import fs from "fs" ;
4
5
import globals from "globals" ;
5
6
import { createRequire } from "module" ;
@@ -36,6 +37,7 @@ export default tseslint.config(
36
37
eslint . configs . recommended ,
37
38
...tseslint . configs . recommended ,
38
39
...tseslint . configs . stylistic ,
40
+ regexpPlugin . configs [ "flat/recommended" ] ,
39
41
{
40
42
plugins : {
41
43
local : {
@@ -123,24 +125,15 @@ export default tseslint.config(
123
125
"@typescript-eslint/no-var-requires" : "off" ,
124
126
"@typescript-eslint/no-empty-interface" : "off" ,
125
127
"@typescript-eslint/no-explicit-any" : "off" ,
126
- "@typescript-eslint/ban-types" : [
127
- "error" ,
128
- {
129
- extendDefaults : true ,
130
- types : {
131
- // This is theoretically good, but ts-eslint appears to mistake our declaration of Symbol for the global Symbol type.
132
- // See: https://github.com/typescript-eslint/typescript-eslint/issues/7306
133
- "Symbol" : false ,
134
- "{}" : false , // {} is a totally useful and valid type.
135
- } ,
136
- } ,
137
- ] ,
128
+ "@typescript-eslint/no-empty-object-type" : "off" , // {} is a totally useful and valid type.
129
+ "@typescript-eslint/no-require-imports" : "off" ,
138
130
"@typescript-eslint/no-unused-vars" : [
139
131
"warn" ,
140
132
{
141
133
// Ignore: (solely underscores | starting with exactly one underscore)
142
134
argsIgnorePattern : "^(_+$|_[^_])" ,
143
135
varsIgnorePattern : "^(_+$|_[^_])" ,
136
+ // Not setting an ignore pattern for caught errors; those can always be safely removed.
144
137
} ,
145
138
] ,
146
139
"@typescript-eslint/no-inferrable-types" : "off" ,
@@ -162,6 +155,7 @@ export default tseslint.config(
162
155
"local/no-keywords" : "error" ,
163
156
"local/jsdoc-format" : "error" ,
164
157
"local/js-extensions" : "error" ,
158
+ "local/no-array-mutating-method-expressions" : "error" ,
165
159
} ,
166
160
} ,
167
161
{
@@ -210,12 +204,21 @@ export default tseslint.config(
210
204
{ name : "clearImmediate" } ,
211
205
{ name : "performance" } ,
212
206
] ,
207
+ "local/no-direct-import" : "error" ,
213
208
} ,
214
209
} ,
215
210
{
216
211
files : [ "src/harness/**" , "src/testRunner/**" ] ,
217
212
rules : {
218
213
"no-restricted-globals" : "off" ,
214
+ "regexp/no-super-linear-backtracking" : "off" ,
215
+ "local/no-direct-import" : "off" ,
216
+ } ,
217
+ } ,
218
+ {
219
+ files : [ "src/**/_namespaces/**" ] ,
220
+ rules : {
221
+ "local/no-direct-import" : "off" ,
219
222
} ,
220
223
} ,
221
224
{
@@ -231,7 +234,8 @@ export default tseslint.config(
231
234
"@typescript-eslint/interface-name-prefix" : "off" ,
232
235
"@typescript-eslint/prefer-function-type" : "off" ,
233
236
"@typescript-eslint/unified-signatures" : "off" ,
234
- "@typescript-eslint/ban-types" : "off" ,
237
+ "@typescript-eslint/no-unsafe-function-type" : "off" ,
238
+ "@typescript-eslint/no-wrapper-object-types" : "off" ,
235
239
"@typescript-eslint/no-unused-vars" : "off" ,
236
240
237
241
// scripts/eslint/rules
0 commit comments