{"id":14978278,"url":"https://github.com/brainmaestro/eslint-plugin-optimize-regex","last_synced_at":"2025-04-06T19:11:31.057Z","repository":{"id":37734086,"uuid":"88307980","full_name":"BrainMaestro/eslint-plugin-optimize-regex","owner":"BrainMaestro","description":"Optimize regex literals","archived":false,"fork":false,"pushed_at":"2024-06-20T07:38:37.000Z","size":590,"stargazers_count":76,"open_issues_count":8,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T19:11:26.482Z","etag":null,"topics":["eslint","eslint-plugin","eslint-rules","optimizer","regex","regexp"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BrainMaestro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-14T22:31:44.000Z","updated_at":"2025-02-08T18:14:51.000Z","dependencies_parsed_at":"2024-01-02T23:43:10.075Z","dependency_job_id":"dd16962e-2c23-42ad-addd-9102293bb96d","html_url":"https://github.com/BrainMaestro/eslint-plugin-optimize-regex","commit_stats":{"total_commits":77,"total_committers":10,"mean_commits":7.7,"dds":0.5324675324675325,"last_synced_commit":"f38c89df9dea37f66fe4f54ca2fce2739b2686dc"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrainMaestro%2Feslint-plugin-optimize-regex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrainMaestro%2Feslint-plugin-optimize-regex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrainMaestro%2Feslint-plugin-optimize-regex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrainMaestro%2Feslint-plugin-optimize-regex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BrainMaestro","download_url":"https://codeload.github.com/BrainMaestro/eslint-plugin-optimize-regex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247535517,"owners_count":20954576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eslint","eslint-plugin","eslint-rules","optimizer","regex","regexp"],"created_at":"2024-09-24T13:57:17.112Z","updated_at":"2025-04-06T19:11:31.015Z","avatar_url":"https://github.com/BrainMaestro.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-plugin-optimize-regex\n[![npm](https://img.shields.io/npm/v/eslint-plugin-optimize-regex.svg)](https://www.npmjs.com/package/eslint-plugin-optimize-regex)\n[![npm](https://img.shields.io/npm/dt/eslint-plugin-optimize-regex.svg)](https://www.npmjs.com/package/eslint-plugin-optimize-regex)\n\n\u003e Optimize regex literals\n\n## Installation\n\nYou'll first need to install [ESLint](http://eslint.org):\n\n```\nnpm i eslint --save-dev\n```\n\nNext, install `eslint-plugin-optimize-regex`:\n\n```\nnpm install eslint-plugin-optimize-regex --save-dev\n```\n\n**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-optimize-regex` globally.\n\n## Usage\n\nAdd `optimize-regex` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:\n\n```json\n{\n    \"plugins\": [\n        \"optimize-regex\"\n    ]\n}\n```\n\n\nThen configure the rules you want to use under the rules section.\n\n```json\n{\n    \"rules\": {\n        \"optimize-regex/optimize-regex\": \"warn\"\n    }\n}\n```\n\nIf you wish to add a `whitelist` or `blacklist` array against `regexp-tree`'s\n[transforms](https://github.com/DmitrySoshnikov/regexp-tree/blob/master/src/optimizer/README.md#transforms), you can add them on an objects object:\n\n```json\n{\n    \"rules\": {\n        \"optimize-regex/optimize-regex\": [\"warn\", {\n            \"blacklist\": [\"charClassClassrangesMerge\"]\n        }]\n    }\n}\n```\n\nIf you want the latter particular settings, you can avoid setting `plugins` and\n`rules` and just use:\n\n```json\n{\n  \"extends\": [\"optimize-regex/recommended\"]\n}\n```\n\nOr without the blacklist:\n\n```json\n{\n  \"extends\": [\"optimize-regex/all\"]\n}\n```\n\n## Rules\n\n* [optimize-regex](./docs/rules/optimize-regex.md)\n\n## Inspiration\n\n* [regexp-tree](https://github.com/DmitrySoshnikov/regexp-tree)\n\n## License\n\nMIT © Ezinwa Okpoechi\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrainmaestro%2Feslint-plugin-optimize-regex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrainmaestro%2Feslint-plugin-optimize-regex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrainmaestro%2Feslint-plugin-optimize-regex/lists"}