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

Unicode-Safe Regex Linting

Create an ESLint flat config snippet that enforces safe Unicode handling in regular expressions, ensuring engineers rely on Unicode-aware flags, code point escapes, and canonical property names. Tests lint sample files with this config; patterns marked as passing should produce no violations, while failing patterns should surface at least one Unicode-focused lint error.

Capabilities

Requires Unicode-aware flags

  • A pattern using Unicode property escapes without a u or v flag is reported; the same pattern passes when the flag is present. @test
  • A pattern containing an astral character literal (e.g., πŸ˜€) without a Unicode-aware flag is reported, while the pattern passes when written with a code point escape and the proper flag. @test

Prefers code point escapes

  • A pattern that encodes an astral symbol via surrogate pairs or raw literal is reported, and autofix rewrites it to a \u{...} code point escape under a Unicode-aware flag. @test

Normalizes property names

  • A pattern using non-canonical Unicode property keys or casing (e.g., \p{sc=grEek}) is reported; the canonical form (e.g., \p{Script=Greek}) passes. @test

Implementation

@generates

API

// Returns an ESLint flat config array that enforces unicode-safe regex linting.
// Configuration must enable only the rules necessary for Unicode flags, code point escapes, and property name normalization.
export function createUnicodeRegexConfig(): import('eslint').Linter.FlatConfig[];

Dependencies { .dependencies }

eslint-plugin-regexp { .dependency }

Provides regex-focused ESLint rules with Unicode-aware checks and autofixes.

Version

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