11// @ts -check
22import eslint from "@eslint/js" ;
3+ import * as regexpPlugin from "eslint-plugin-regexp" ;
34import fs from "fs" ;
45import globals from "globals" ;
56import { createRequire } from "module" ;
@@ -36,6 +37,7 @@ export default tseslint.config(
3637 eslint . configs . recommended ,
3738 ...tseslint . configs . recommended ,
3839 ...tseslint . configs . stylistic ,
40+ regexpPlugin . configs [ "flat/recommended" ] ,
3941 {
4042 plugins : {
4143 local : {
@@ -123,24 +125,15 @@ export default tseslint.config(
123125 "@typescript-eslint/no-var-requires" : "off" ,
124126 "@typescript-eslint/no-empty-interface" : "off" ,
125127 "@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" ,
138130 "@typescript-eslint/no-unused-vars" : [
139131 "warn" ,
140132 {
141133 // Ignore: (solely underscores | starting with exactly one underscore)
142134 argsIgnorePattern : "^(_+$|_[^_])" ,
143135 varsIgnorePattern : "^(_+$|_[^_])" ,
136+ // Not setting an ignore pattern for caught errors; those can always be safely removed.
144137 } ,
145138 ] ,
146139 "@typescript-eslint/no-inferrable-types" : "off" ,
@@ -162,6 +155,7 @@ export default tseslint.config(
162155 "local/no-keywords" : "error" ,
163156 "local/jsdoc-format" : "error" ,
164157 "local/js-extensions" : "error" ,
158+ "local/no-array-mutating-method-expressions" : "error" ,
165159 } ,
166160 } ,
167161 {
@@ -210,12 +204,21 @@ export default tseslint.config(
210204 { name : "clearImmediate" } ,
211205 { name : "performance" } ,
212206 ] ,
207+ "local/no-direct-import" : "error" ,
213208 } ,
214209 } ,
215210 {
216211 files : [ "src/harness/**" , "src/testRunner/**" ] ,
217212 rules : {
218213 "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" ,
219222 } ,
220223 } ,
221224 {
@@ -231,7 +234,8 @@ export default tseslint.config(
231234 "@typescript-eslint/interface-name-prefix" : "off" ,
232235 "@typescript-eslint/prefer-function-type" : "off" ,
233236 "@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" ,
235239 "@typescript-eslint/no-unused-vars" : "off" ,
236240
237241 // scripts/eslint/rules
0 commit comments