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-1/

{
  "context": "Evaluates whether the solution uses @babel/plugin-transform-sticky-regex with @babel/core to rewrite sticky regex literals while preserving other regex usage. Scoring checks plugin configuration, transformed output for sticky literals, and that non-sticky literals and RegExp constructors remain unchanged.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Plugin wiring",
      "description": "Includes @babel/plugin-transform-sticky-regex in the plugins array passed to @babel/core.transformSync (or equivalent transform) rather than hand-rolled regex rewriting.",
      "max_score": 20
    },
    {
      "name": "Sticky rewrite",
      "description": "Babel output shows sticky regex literals rewritten by the plugin into new RegExp(\"pattern\",\"flags\") constructor calls, matching the plugin's default formatting for examples like /abc/y.",
      "max_score": 30
    },
    {
      "name": "Flag preservation",
      "description": "Transformed code retains all original flags when sticky is present (e.g., /foo/gy -> new RegExp(\"foo\",\"gy\")), demonstrating reliance on the plugin's handling of flags.",
      "max_score": 20
    },
    {
      "name": "Non-sticky untouched",
      "description": "Outputs from the Babel transform keep non-sticky regex literals exactly as authored, showing the plugin was allowed to leave them unchanged.",
      "max_score": 15
    },
    {
      "name": "RegExp constructors",
      "description": "Existing new RegExp(...) constructor calls remain unaltered in the transform output, reflecting that the plugin's scope is limited to regex literals.",
      "max_score": 15
    }
  ]
}

Version

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