From a93bd42724bf879717de126b81fe0f51de03bddb Mon Sep 17 00:00:00 2001 From: calixteman Date: Tue, 4 Aug 2026 18:50:37 +0200 Subject: [PATCH] Enable a few more `eslint-plugin-regexp` rules The remaining rules from the plugin's "Best Practices" category that the recommended config leaves off, plus the two it only warns about, all of which the code already complies with. `regexp/prefer-regexp-test` is left off, since `unicorn/prefer-regexp-test` already covers it. --- eslint.config.mjs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eslint.config.mjs b/eslint.config.mjs index 9d887d7e4..654aad8bd 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -62,7 +62,13 @@ export default [ rules: { ...regexpPlugin.configs["flat/recommended"].rules, "regexp/no-legacy-features": "off", + "regexp/no-octal": "error", + "regexp/no-potentially-useless-backreference": "error", + "regexp/no-standalone-backslash": "error", "regexp/no-super-linear-move": "error", + "regexp/optimal-lookaround-quantifier": "error", + "regexp/prefer-escape-replacement-dollar-char": "error", + "regexp/prefer-regexp-exec": "error", }, }, {