CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-eslint-plugin-regexp

ESLint plugin for finding RegExp mistakes and RegExp style guide violations.

82

0.96x
Overview
Eval results
Files

rubric.jsonevals/scenario-9/

{
  "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-regexp

tile.json