| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,6 +20,7 @@ const { default: js } = await importEslintTool('@eslint/js'); | |||
| 20 | 20 | const { default: babelEslintParser } = await importEslintTool('@babel/eslint-parser'); | |
| 21 | 21 | const babelPluginSyntaxImportSource = resolveEslintTool('@babel/plugin-syntax-import-source'); | |
| 22 | 22 | const { default: jsdoc } = await importEslintTool('eslint-plugin-jsdoc'); | |
| 23 | + const { default: regexpPlugin } = await importEslintTool('eslint-plugin-regexp'); | ||
| 23 | 24 | const { default: markdown } = await importEslintTool('@eslint/markdown'); | |
| 24 | 25 | const { default: stylisticJs } = await importEslintTool('@stylistic/eslint-plugin'); | |
| 25 | 26 | ||
@@ -84,6 +85,7 @@ export default [ | |||
| 84 | 85 | // #region general config | |
| 85 | 86 | js.configs.recommended, | |
| 86 | 87 | jsdoc.configs['flat/recommended'], | |
| 88 | + regexpPlugin.configs.recommended, | ||
| 87 | 89 | { | |
| 88 | 90 | files: ['**/*.js'], | |
| 89 | 91 | languageOptions: { | |
@@ -275,6 +277,42 @@ export default [ | |||
| 275 | 277 | 'jsdoc/reject-any-type': 'off', | |
| 276 | 278 | 'jsdoc/reject-function-type': 'off', | |
| 277 | 279 | ||
| 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 | + | ||
| 278 | 316 | // Stylistic rules. | |
| 279 | 317 | '@stylistic/js/arrow-parens': 'error', | |
| 280 | 318 | '@stylistic/js/arrow-spacing': 'error', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,6 +12,7 @@ | |||
| 12 | 12 | "eslint": "^10.0.2", | |
| 13 | 13 | "eslint-formatter-tap": "^9.0.1", | |
| 14 | 14 | "eslint-plugin-jsdoc": "^62.7.1", | |
| 15 | + "eslint-plugin-regexp": "^3.0.0", | ||
| 15 | 16 | "globals": "^17.3.0" | |
| 16 | 17 | } | |
| 17 | 18 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments