@@ -20,6 +20,7 @@ const { default: js } = await importEslintTool('@eslint/js');
2020const { default : babelEslintParser } = await importEslintTool ( '@babel/eslint-parser' ) ;
2121const babelPluginSyntaxImportSource = resolveEslintTool ( '@babel/plugin-syntax-import-source' ) ;
2222const { default : jsdoc } = await importEslintTool ( 'eslint-plugin-jsdoc' ) ;
23+ const { default : regexpPlugin } = await importEslintTool ( 'eslint-plugin-regexp' ) ;
2324const { default : markdown } = await importEslintTool ( '@eslint/markdown' ) ;
2425const { default : stylisticJs } = await importEslintTool ( '@stylistic/eslint-plugin' ) ;
2526
@@ -84,6 +85,7 @@ export default [
8485 // #region general config
8586 js . configs . recommended ,
8687 jsdoc . configs [ 'flat/recommended' ] ,
88+ regexpPlugin . configs . recommended ,
8789 {
8890 files : [ '**/*.js' ] ,
8991 languageOptions : {
@@ -275,6 +277,42 @@ export default [
275277 'jsdoc/reject-any-type' : 'off' ,
276278 'jsdoc/reject-function-type' : 'off' ,
277279
280+ // RegExp recommended rules that we disable.
281+ // Todo: Investigate which rules should be enabled.
282+ 'prefer-regex-literals' : 'off' ,
283+ 'regexp/control-character-escape' : 'off' ,
284+ 'regexp/match-any' : 'off' ,
285+ 'regexp/negation' : 'off' ,
286+ 'regexp/no-contradiction-with-assertion' : 'off' ,
287+ 'regexp/no-dupe-characters-character-class' : 'off' ,
288+ 'regexp/no-dupe-disjunctions' : 'off' ,
289+ 'regexp/no-empty-alternative' : 'off' ,
290+ 'regexp/no-legacy-features' : 'off' ,
291+ 'regexp/no-misleading-capturing-group' : 'off' ,
292+ 'regexp/no-obscure-range' : 'off' ,
293+ 'regexp/no-potentially-useless-backreference' : 'off' ,
294+ 'regexp/no-super-linear-backtracking' : 'off' ,
295+ 'regexp/no-trivially-nested-quantifier' : 'off' ,
296+ 'regexp/no-unused-capturing-group' : 'off' ,
297+ 'regexp/no-useless-assertions' : 'off' ,
298+ 'regexp/no-useless-character-class' : 'off' ,
299+ 'regexp/no-useless-escape' : 'off' ,
300+ 'regexp/no-useless-flag' : 'off' ,
301+ 'regexp/no-useless-lazy' : 'off' ,
302+ 'regexp/no-useless-non-capturing-group' : 'off' ,
303+ 'regexp/no-useless-quantifier' : 'off' ,
304+ 'regexp/no-useless-range' : 'off' ,
305+ 'regexp/optimal-lookaround-quantifier' : 'off' ,
306+ 'regexp/optimal-quantifier-concatenation' : 'off' ,
307+ 'regexp/prefer-character-class' : 'off' ,
308+ 'regexp/prefer-d' : 'off' ,
309+ 'regexp/prefer-question-quantifier' : 'off' ,
310+ 'regexp/prefer-star-quantifier' : 'off' ,
311+ 'regexp/prefer-w' : 'off' ,
312+ 'regexp/sort-flags' : 'off' ,
313+ 'regexp/strict' : 'off' ,
314+ 'regexp/use-ignore-case' : 'off' ,
315+
278316 // Stylistic rules.
279317 '@stylistic/js/arrow-parens' : 'error' ,
280318 '@stylistic/js/arrow-spacing' : 'error' ,
0 commit comments