ESLint plugin for finding RegExp mistakes and RegExp style guide violations.
82
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.
@generates
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[]>;Provides the linting engine used to run regex checks.
Adds regex-aware rules for optimizing lookarounds and quantifiers.
Install with Tessl CLI
npx tessl i tessl/npm-eslint-plugin-regexpevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10