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

Regex Context Optimizer

Build a lint helper that focuses on improving regex lookarounds and quantifier structure using ESLint plugin capabilities. Detection of problems should come from the plugin's rules rather than any custom regex parsing.

Capabilities

Build lookaround/quantifier lint config

  • Combines the plugin's recommended baseline with extra rules that tighten lookaround correctness and quantifier conciseness. @test
  • Allows severity overrides for those lookaround/quantifier checks through options. @test

Detect issues in sample snippets

  • Linting code containing redundant nested lookarounds reports a violation for the nested assertion and returns its rule id and location. @test
  • Linting code with adjacent quantifiers on the same token reports that the quantifiers should be combined and includes an autofix suggestion. @test

Implementation

@generates

API

export interface RegexLintOptions {
  /**
   * Optional severity overrides for the specialized lookaround and quantifier checks.
   * Values can be "off", "warn", or "error".
   */
  ruleLevels?: {
    nestedLookaround?: "off" | "warn" | "error";
    concatenatedQuantifiers?: "off" | "warn" | "error";
  };
}

/**
 * Builds an ESLint flat config array focused on optimizing regex lookarounds and quantifiers.
 */
export function createRegexLintConfig(options?: RegexLintOptions): any[];

/**
 * Lints a string of JavaScript/TypeScript code with the specialized config and returns ESLint results.
 */
export async function lintRegexText(code: string, options?: RegexLintOptions): Promise<any[]>;

Dependencies { .dependencies }

eslint { .dependency }

Provides the linting engine used to run regex checks.

eslint-plugin-regexp { .dependency }

Adds regex-aware rules for optimizing lookarounds and quantifiers.

Version

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