{"id":19916,"library":"eslint-plugin-regexp","title":"eslint-plugin-regexp","description":"ESLint plugin for finding RegExp mistakes and enforcing style guide violations. Current stable version is v3.1.0 (requires ESLint >=9.38.0 and Node.js >=20.19.0). Released regularly with minor and patch updates. Key differentiators: 80+ rules covering regex syntax, optimization, and style; TypeScript type declarations included; supports ES2025 features like duplicate named capturing groups; provides recommended and all configs; exclusively supports ESLint Flat Config since v3.0.0 (drops Legacy Config).","status":"active","version":"3.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/ota-meshi/eslint-plugin-regexp","tags":["javascript","eslint","eslintplugin","eslint-plugin","regexp","regex","typescript"],"install":[{"cmd":"npm install eslint-plugin-regexp","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-regexp","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-regexp","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for plugin to function","package":"eslint","optional":false}],"imports":[{"note":"ESM-only since v3.0.0; default export named 'regexp' but can be imported with any name.","wrong":"const regexpPlugin = require('eslint-plugin-regexp')","symbol":"regexpPlugin (default)","correct":"import regexpPlugin from 'eslint-plugin-regexp'"},{"note":"Use within flat config array. Legacy .eslintrc configs dropped in v3.","wrong":"require('eslint-plugin-regexp').configs.recommended","symbol":"configs (recommended)","correct":"regexpPlugin.configs.recommended"},{"note":"Plugin must be registered under 'plugins' key in flat config before using rules.","wrong":"rules: { 'regexp/no-useless-escape': 'error' } without plugins","symbol":"rules","correct":"plugins: { regexp: regexpPlugin }, rules: { 'regexp/no-useless-escape': 'error' }"}],"quickstart":{"code":"// eslint.config.js\nimport regexpPlugin from 'eslint-plugin-regexp';\n\nexport default [\n  regexpPlugin.configs.recommended,\n  {\n    rules: {\n      'regexp/prefer-regexp-exec': 'warn',\n      'regexp/no-useless-escape': 'error',\n    },\n  },\n];","lang":"javascript","description":"Setup ESLint flat config with recommended regexp rules and custom overrides."},"warnings":[{"fix":"Migrate to ESLint v9 and use eslint.config.js with import statement.","message":"v3.0.0: Dropped support for ESLint v8 and Legacy Config (.eslintrc). Only Flat Config (eslint.config.js) is supported.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Use 'recommended' config for stable rule set.","message":"The 'all' config changes with every minor/major version. Not suitable for production.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Update to v3 and follow flat config patterns.","message":"v2.10.0: Deprecated old rule 'regexp/...' without explicit notice.","severity":"deprecated","affected_versions":">=2.10.0 <3.0.0"},{"fix":"Use full rule name including prefix.","message":"Rule names must be prefixed with 'regexp/' in config, e.g., 'regexp/no-useless-escape'.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Update Node.js to supported version.","message":"v3.0.0: Minimum Node.js version bumped to 20.19.0, 22.13.0, or >=24.","severity":"breaking","affected_versions":">=3.0.0"}],"env_vars":null,"search_vec":"'20.19.0':26 '80':36 '9.38.0':23 'captur':54 'config':60,65,70 'cover':38 'current':16 'declar':46 'differenti':35 'drop':68 'duplic':52 'enforc':12 'es2025':49 'eslint':2,5,22,63,72,75 'eslint-plugin':74 'eslint-plugin-regexp':1 'eslintplugin':73 'exclus':61 'featur':50 'find':8 'flat':64 'group':55 'guid':14 'includ':47 'javascript':71 'key':34 'legaci':69 'like':51 'minor':30 'mistak':10 'name':53 'node.js':25 'optim':41 'patch':32 'plugin':3,6,76 'provid':56 'recommend':57 'regex':39,78 'regexp':4,9,77 'regular':28 'releas':27 'requir':21 'rule':37 'sinc':66 'stabl':17 'style':13,43 'support':48,62 'syntax':40 'type':45 'typescript':44,79 'updat':33 'v3.0.0':67 'v3.1.0':20 'version':18 'violat':15","created_at":"2026-04-25T11:20:20.897576+00:00","updated_at":"2026-04-25T11:20:20.897576+00:00","problems":[{"fix":"Run 'npm install --save-dev eslint-plugin-regexp' and ensure import path is correct.","cause":"Package not installed or incorrect import path.","error":"Error: Cannot find module 'eslint-plugin-regexp'"},{"fix":"Use full rule name like 'regexp/no-useless-escape'.","cause":"Rule name missing 'regexp/' prefix.","error":"Configuration for rule \"regexp/...\" is invalid: Value \"error\" is unexpected."},{"fix":"Add 'plugins: { regexp: regexpPlugin }' to your config object.","cause":"Plugin not registered in flat config 'plugins' array.","error":"ESLint couldn't find the plugin \"eslint-plugin-regexp\"."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/ota-meshi/eslint-plugin-regexp","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/eslint-plugin-regexp","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}