ESLint plugin for finding RegExp mistakes and RegExp style guide violations.
82
Configure ESLint to lint regex usage via the regex plugin's built-in presets for both flat and legacy config formats.
npm run lint:flat uses ESLint's flat config format and the plugin's flat preset to lint all JS/TS files in src/; linting src/patterns.js with a duplicate alternative like (foo|foo) exits non-zero and reports the regex issue. @testnpm run lint:flat completes with zero errors. @testnpm run lint:legacy uses a legacy .eslintrc that registers the plugin and extends its legacy preset to lint files in legacy/; linting legacy/replace.js with replaceAll using a non-global regex reports the missing global-flag issue. @testlegacy/vendor/, so files there are skipped by linting. @test@generates
{
"scripts": {
"lint:flat": "eslint src",
"lint:legacy": "eslint --config .eslintrc.cjs legacy"
}
}JavaScript/TypeScript linting engine.
Provides regex-focused lint rules and presets for flat and legacy config formats.
Install with Tessl CLI
npx tessl i tessl/npm-eslint-plugin-regexpevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10