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

Regex Style Normalizer

A small utility that builds an ESLint configuration and lint runner focused on normalizing regular expression style: character classes, quantifiers, flags, and escape sequences.

Capabilities

Configures regex style linting

  • Creates a ready-to-use ESLint configuration (legacy or flat) that enables the regex style normalization dependency and turns on style normalization for character classes, quantifiers, flags, and escape sequences at error severity. @test

Lints provided sources

  • lintRegexStyles lints supplied JS/TS source strings with that configuration, returning rule ids, messages, and locations for every regex style normalization issue; sources without regex style problems return an empty list. @test

Applies autofix when requested

  • With fix: true, linting rewrites [0-9] into \\d, converts a{1,} into a+, reorders /abc/ig flags into canonical order, and reports an escape-style violation for a literal containing an unescaped control character. @test

Summarizes results

  • lintRegexStyles returns {id, errors, fixedText?} per input, preserving the order of the provided sources. @test

Implementation

@generates

API

export type RegexStyleConfigFormat = "flat" | "legacy";

export interface LintRequest {
  id: string;
  sourceText: string;
  fix?: boolean;
}

export interface LintResult {
  id: string;
  errors: {
    ruleId: string;
    message: string;
    line: number;
    column: number;
  }[];
  fixedText?: string;
}

/**
 * Build an ESLint configuration that enforces regex style normalization
 * for character classes, quantifiers, flags, and escape sequences.
 */
export function buildRegexStyleConfig(format?: RegexStyleConfigFormat): any;

/**
 * Lint one or more source snippets using the regex style configuration.
 * Applies autofix when requested and returns structured results.
 */
export async function lintRegexStyles(
  requests: LintRequest[],
  format?: RegexStyleConfigFormat
): Promise<LintResult[]>;

Dependencies { .dependencies }

eslint { .dependency }

Provides programmatic linting support.

eslint-plugin-regexp { .dependency }

Enforces regex-oriented lint rules, including style normalization.

Version

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