MCPcopy Index your code
hub / github.com/BrainMaestro/eslint-plugin-optimize-regex

github.com/BrainMaestro/eslint-plugin-optimize-regex @v1.2.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.2.1 ↗ · + Follow
3 symbols 3 edges 4 files 1 documented · 33% 3 cross-repo links updated 2y ago★ 755 open issues

Browse by type

Functions 3 Types & classes 0
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

eslint-plugin-optimize-regex

npm npm

Optimize regex literals

Installation

You'll first need to install ESLint:

npm i eslint --save-dev

Next, install eslint-plugin-optimize-regex:

npm install eslint-plugin-optimize-regex --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-optimize-regex globally.

Usage

Add optimize-regex to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "optimize-regex"
    ]
}

Then configure the rules you want to use under the rules section.

{
    "rules": {
        "optimize-regex/optimize-regex": "warn"
    }
}

If you wish to add a whitelist or blacklist array against regexp-tree's transforms, you can add them on an objects object:

{
    "rules": {
        "optimize-regex/optimize-regex": ["warn", {
            "blacklist": ["charClassClassrangesMerge"]
        }]
    }
}

If you want the latter particular settings, you can avoid setting plugins and rules and just use:

{
  "extends": ["optimize-regex/recommended"]
}

Or without the blacklist:

{
  "extends": ["optimize-regex/all"]
}

Rules

Inspiration

License

MIT © Ezinwa Okpoechi

Core symbols most depended-on inside this repo

Shape

Function 3

Languages

TypeScript100%

Modules by API surface

lib/rules/optimize-regex.js3 symbols

For agents

$ claude mcp add eslint-plugin-optimize-regex \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page