diff --git a/.eslintrc.yml b/.eslintrc.yml index d5dfb4b15..53775ae02 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -315,6 +315,8 @@ rules: - error regexp/control-character-escape: - error + regexp/grapheme-string-literal: + - error regexp/hexadecimal-escape: - error - never # prefer unicode escape @@ -352,6 +354,8 @@ rules: - error regexp/no-empty-lookarounds-assertion: - error + regexp/no-empty-string-literal: + - error regexp/no-escape-backspace: - error regexp/no-extra-lookaround-assertions: @@ -421,6 +425,10 @@ rules: - error regexp/no-useless-range: - error + regexp/no-useless-set-operand: + - error + regexp/no-useless-string-literal: + - error regexp/no-useless-two-nums-quantifier: - error regexp/no-zero-quantifier: @@ -466,6 +474,8 @@ rules: regexp/prefer-result-array-groups: - error - strictTypes: true + regexp/prefer-set-operation: + - error regexp/prefer-star-quantifier: - error regexp/prefer-unicode-codepoint-escapes: @@ -474,6 +484,10 @@ rules: - error regexp/require-unicode-regexp: - error + regexp/require-unicode-sets-regexp: + - off + regexp/simplify-set-operations: + - error regexp/sort-alternatives: - error regexp/sort-character-class-elements: diff --git a/package-lock.json b/package-lock.json index 27e89d761..56e191571 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "eslint-plugin-ava": "14.0.0", "eslint-plugin-jsdoc": "46.8.2", "eslint-plugin-jsonc": "2.10.0", - "eslint-plugin-regexp": "1.15.0", + "eslint-plugin-regexp": "2.0.0", "eslint-plugin-yml": "1.10.0", "fast-check": "3.13.0", "husky": "8.0.3", @@ -906,9 +906,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", - "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.9.1.tgz", + "integrity": "sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -5126,25 +5126,24 @@ } }, "node_modules/eslint-plugin-regexp": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-1.15.0.tgz", - "integrity": "sha512-YEtQPfdudafU7RBIFci81R/Q1yErm0mVh3BkGnXD2Dk8DLwTFdc2ITYH1wCnHKim2gnHfPFgrkh+b2ozyyU7ag==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-2.0.0.tgz", + "integrity": "sha512-VT3J6rOt3Lp+Mxw4jfvox5f31Do5UEsgRNXLy2Afl/gv5HiwMu7n+xt4J9bxePC1ds5uXTsPYMOKiCjfXsHapA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "comment-parser": "^1.1.2", - "grapheme-splitter": "^1.0.4", - "jsdoctypeparser": "^9.0.0", - "refa": "^0.11.0", - "regexp-ast-analysis": "^0.6.0", - "scslre": "^0.2.0" + "@eslint-community/regexpp": "^4.9.1", + "comment-parser": "^1.4.0", + "jsdoc-type-pratt-parser": "^4.0.0", + "refa": "^0.12.1", + "regexp-ast-analysis": "^0.7.1", + "scslre": "^0.3.0" }, "engines": { - "node": "^12 || >=14" + "node": "^18 || >=20" }, "peerDependencies": { - "eslint": ">=6.0.0" + "eslint": ">=8.44.0" } }, "node_modules/eslint-plugin-yml": { @@ -6385,12 +6384,6 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true - }, "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", @@ -7485,18 +7478,6 @@ "node": ">=12.0.0" } }, - "node_modules/jsdoctypeparser": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz", - "integrity": "sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw==", - "dev": true, - "bin": { - "jsdoctypeparser": "bin/jsdoctypeparser" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -11245,12 +11226,12 @@ } }, "node_modules/refa": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/refa/-/refa-0.11.0.tgz", - "integrity": "sha512-486O8/pQXwj9jV0mVvUnTsxq0uknpBnNJ0eCUhkZqJRQ8KutrT1PhzmumdCeM1hSBF2eMlFPmwECRER4IbKXlQ==", + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/refa/-/refa-0.12.1.tgz", + "integrity": "sha512-J8rn6v4DBb2nnFqkqwy6/NnTYMcgLA+sLr0iIO41qpv0n+ngb7ksag2tMRl0inb1bbO/esUwzW1vbJi7K0sI0g==", "dev": true, "dependencies": { - "@eslint-community/regexpp": "^4.5.0" + "@eslint-community/regexpp": "^4.8.0" }, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -11263,13 +11244,13 @@ "dev": true }, "node_modules/regexp-ast-analysis": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/regexp-ast-analysis/-/regexp-ast-analysis-0.6.0.tgz", - "integrity": "sha512-OLxjyjPkVH+rQlBLb1I/P/VTmamSjGkvN5PTV5BXP432k3uVz727J7H29GA5IFiY0m7e1xBN7049Wn59FY3DEQ==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/regexp-ast-analysis/-/regexp-ast-analysis-0.7.1.tgz", + "integrity": "sha512-sZuz1dYW/ZsfG17WSAG7eS85r5a0dDsvg+7BiiYR5o6lKCAtUrEwdmRmaGF6rwVj3LcmAeYkOWKEPlbPzN3Y3A==", "dev": true, "dependencies": { - "@eslint-community/regexpp": "^4.5.0", - "refa": "^0.11.0" + "@eslint-community/regexpp": "^4.8.0", + "refa": "^0.12.1" }, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -11693,14 +11674,17 @@ "dev": true }, "node_modules/scslre": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/scslre/-/scslre-0.2.0.tgz", - "integrity": "sha512-4hc49fUMmX3jM0XdFUAPBrs1xwEcdHa0KyjEsjFs+Zfc66mpFpq5YmRgDtl+Ffo6AtJIilfei+yKw8fUn3N88w==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/scslre/-/scslre-0.3.0.tgz", + "integrity": "sha512-3A6sD0WYP7+QrjbfNA2FN3FsOaGGFoekCVgTyypy53gPxhbkCIjtO6YWgdrfM+n/8sI8JeXZOIxsHjMTNxQ4nQ==", "dev": true, "dependencies": { - "@eslint-community/regexpp": "^4.5.0", - "refa": "^0.11.0", - "regexp-ast-analysis": "^0.6.0" + "@eslint-community/regexpp": "^4.8.0", + "refa": "^0.12.0", + "regexp-ast-analysis": "^0.7.0" + }, + "engines": { + "node": "^14.0.0 || >=16.0.0" } }, "node_modules/semver": { diff --git a/package.json b/package.json index f335ae828..11d9a3b10 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "eslint-plugin-ava": "14.0.0", "eslint-plugin-jsdoc": "46.8.2", "eslint-plugin-jsonc": "2.10.0", - "eslint-plugin-regexp": "1.15.0", + "eslint-plugin-regexp": "2.0.0", "eslint-plugin-yml": "1.10.0", "fast-check": "3.13.0", "husky": "8.0.3",