ESLint plugin for finding RegExp mistakes and RegExp style guide violations.
82
{
"context": "Evaluates how the solution configures eslint-plugin-regexp to enforce correct JavaScript RegExp API usage for boolean checks, match extraction, and safe string replacements using the provided fixtures and lint script.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Plugin setup",
"description": "Flat ESLint config registers the regexp plugin (plugins map) and targets src/examples files so linting actually applies the package rules.",
"max_score": 20
},
{
"name": "Boolean checks",
"description": "Enables the regexp/prefer-regexp-test rule at error level and demonstrates it catching String#match boolean checks while passing RegExp#test usage in good.js.",
"max_score": 25
},
{
"name": "Match extraction",
"description": "Enables the regexp/prefer-regexp-exec rule at error level and demonstrates it rejecting String#match when match details are needed while allowing RegExp#exec in good.js.",
"max_score": 25
},
{
"name": "Escape dollars",
"description": "Uses regexp/prefer-escape-replacement-dollar-char (error level) so unescaped literal $ in replacements are lint failures and escaped forms in good.js pass.",
"max_score": 15
},
{
"name": "Avoid useless tokens",
"description": "Uses regexp/no-useless-dollar-replacements (or prefer-named-replacement) at error level so unnecessary $&/$1-style tokens in replacements are flagged in bad.js and absent in good.js.",
"max_score": 15
}
]
}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