Ctrl + K
DocumentationLog inGet started

tessl/npm-eslint-plugin-regexp

tessl install tessl/npm-eslint-plugin-regexp@2.10.0

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

Agent Success

Agent success rate when using this tile

82%

Improvement

Agent success rate improvement when using this tile compared to baseline

0.96x

Baseline

Agent success rate without this tile

85%

task.mdevals/scenario-7/

Structured Regex Linting

Lint configuration that enforces structured regular-expression captures, readable backreferences, and intentional match result handling.

Capabilities

Enforce named captures and backreferences

  • Linting 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. @test

Prefer groups object access

  • Linting fixtures/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. @test

Detect unused capturing groups

  • Linting fixtures/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

Implementation

@generates

API

const config = [
  {
    files: string[],
    plugins: Record<string, unknown>,
    rules: Record<string, unknown>,
  },
];

export default config;

Dependencies { .dependencies }

eslint-plugin-regexp { .dependency }

Provides regex-focused lint rules for structured captures, backreferences, and result groups.

eslint { .dependency }

JavaScript/TypeScript lint engine used to run the plugin rules.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/eslint-plugin-regexp@2.10.x
tile.json