ESLint plugin for finding RegExp mistakes and RegExp style guide violations.
82
Lint configuration that enforces structured regular-expression captures, readable backreferences, and intentional match result handling.
fixtures/structured.js that includes a regex with unnamed capturing groups (for example /(\d{4})-(\d{2})/) and a numeric backreference reports two problems: one for missing capture names and one for referencing them numerically; messages point to using named captures and named references. @testfixtures/structured.js where match results are read via numeric indexes (such as match[1]) reports a single problem that prefers reading from the .groups object tied to named captures, while the same file also contains a match.groups.year access that passes without issues. @testfixtures/structured.js containing a capturing group that is never referenced or needed (for example /(\d{2}) dollars/.test(str) when only the overall match is used) reports one unused-group problem, and the equivalent pattern without the capturing group is accepted in the same file. @test@generates
const config = [
{
files: string[],
plugins: Record<string, unknown>,
rules: Record<string, unknown>,
},
];
export default config;Provides regex-focused lint rules for structured captures, backreferences, and result groups.
JavaScript/TypeScript lint engine used to run the plugin rules.
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