CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-babel-plugin-transform-es2015-sticky-regex

tessl install tessl/npm-babel-plugin-transform-es2015-sticky-regex@6.24.0

Babel plugin that transforms ES2015 sticky regex literals to ES5-compatible RegExp constructor calls

Agent Success

Agent success rate when using this tile

100%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.03x

Baseline

Agent success rate without this tile

97%

rubric.jsonevals/scenario-5/

{
  "context": "Evaluates how the solution wires @babel/plugin-transform-sticky-regex into a Babel 7+ workflow to rewrite sticky regex literals and expose the required transform helpers.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Plugin usage",
      "description": "Imports `@babel/plugin-transform-sticky-regex` and registers it as the Babel plugin driving the transformations instead of reimplementing the visitor logic.",
      "max_score": 15
    },
    {
      "name": "Version gate",
      "description": "Relies on the plugin's `api.assertVersion(7)` (or equivalent Babel 7 assertion) so loading the plugin under Babel <7 surfaces the expected error.",
      "max_score": 20
    },
    {
      "name": "Sticky rewrite",
      "description": "Ensures the plugin's `RegExpLiteral` visitor converts literals whose `flags` include \"y\" into `new RegExp(<pattern>, <flags>)` calls in the emitted code.",
      "max_score": 25
    },
    {
      "name": "Flag fidelity",
      "description": "Uses the plugin output to preserve the exact pattern text and the full flag string (including `y` plus any others such as `g`) when emitting the `RegExp` constructor call.",
      "max_score": 15
    },
    {
      "name": "Passthrough",
      "description": "Leaves regex literals without the sticky flag untouched, reflecting the plugin's default behavior of returning early when `flags` omits \"y\".",
      "max_score": 15
    },
    {
      "name": "Literal scope",
      "description": "Keeps the transformation confined to `RegExpLiteral` nodes only, avoiding rewrites of `RegExp` constructor expressions or unrelated syntax, matching the package's visitor scope.",
      "max_score": 10
    }
  ]
}

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/babel-plugin-transform-es2015-sticky-regex@6.24.x
tile.json