{"id":15693937,"url":"https://github.com/eps1lon/eslint-focus","last_synced_at":"2025-05-08T05:57:16.063Z","repository":{"id":60518356,"uuid":"543666604","full_name":"eps1lon/eslint-focus","owner":"eps1lon","description":"Allows running ESLint with a single rule on a given directory.","archived":false,"fork":false,"pushed_at":"2023-07-31T16:58:01.000Z","size":51269,"stargazers_count":7,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-08T05:57:08.117Z","etag":null,"topics":["cli","eslint","lint"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eps1lon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":null,"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},"funding":{"github":["eps1lon"],"custom":["https://www.paypal.me/SebastianSilbermann"]}},"created_at":"2022-09-30T15:29:45.000Z","updated_at":"2024-07-12T21:31:05.000Z","dependencies_parsed_at":"2024-10-24T02:48:21.842Z","dependency_job_id":null,"html_url":"https://github.com/eps1lon/eslint-focus","commit_stats":{"total_commits":18,"total_committers":3,"mean_commits":6.0,"dds":0.2777777777777778,"last_synced_commit":"f697bb8b43760bff81e8ff36623a8624a9681fe4"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eps1lon%2Feslint-focus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eps1lon%2Feslint-focus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eps1lon%2Feslint-focus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eps1lon%2Feslint-focus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eps1lon","download_url":"https://codeload.github.com/eps1lon/eslint-focus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253009891,"owners_count":21839714,"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":["cli","eslint","lint"],"created_at":"2024-10-03T18:50:25.404Z","updated_at":"2025-05-08T05:57:16.041Z","avatar_url":"https://github.com/eps1lon.png","language":"JavaScript","funding_links":["https://github.com/sponsors/eps1lon","https://www.paypal.me/SebastianSilbermann"],"categories":[],"sub_categories":[],"readme":"# eslint-focus\n\nAllows running ESLint on a directory with a single rule or set of rules matching a pattern.\nThe matched rules MUST be enabled in your ESLint config for the files you want it to run on (e.g. enable it in your root `.eslintrc.js`).\n\n## Usage\n\n```bash\nnpx eslint-focus \u003cruleOrRulePattern\u003e \u003crelativeOrAbsolutePaths..\u003e\n\nRun ESLint with a single rule or rules matching a pattern on a given directory.\n\nPositionals:\n  ruleOrRulePattern        A single rule or pattern                                                             [string]\n  relativeOrAbsolutePaths  An absolute path or a path relative to the current working directory.                [string]\n\nOptions:\n  --version            Show version number                                                                     [boolean]\n  --help               Show help                                                                               [boolean]\n  --allowInlineConfig  Respects eslint-disable directives.                                    [boolean] [default: false]\n  --diff               Only includes file that are also part of git-diff. See git-diff docs for possible values.[string]\n  --fix                Same as `eslint --fix`: https://eslint.org/docs/latest/use/command-line-interface#--fix\n                                                                                              [boolean] [default: false]\n  --fix-type           Same as `eslint --fix-type`\n                       (https://eslint.org/docs/latest/use/command-line-interface#--fix-type) with an additional\n                       'add-disable-directive' option to ignore the violation instead with an `eslint-disable-next-line`\n                       directive. 'add-disable-directive' only adds `//` comments i.e. it will likely produce syntax\n                       errors if lint violations are found inside JSX.\n                             [array] [choices: \"problem\", \"suggestion\", \"layout\", \"add-disable-directive\"] [default: []]\n\nExamples:\n  npx eslint-focus react-hooks/rules-of-hooks .                 Run `react-hooks/rules-of-hooks` on every file inside\n                                                                the current directory.\n  npx $1 /jest\\// .                                             Run all Jest rules on every file inside the current\n                                                                directory.\n  npx eslint-focus react-hooks/exhaustive-deps . --fix          Fixes all `react-hooks/exhaustive-deps` issues inside\n  --fix-type suggestion                                         the current directory.\n  npx eslint-focus import/order packages/features/pf-*          (Relies on Bash globbing) Run `import/order` on every\n                                                                folder matching 'packages/features/pf-*'.\n  npx eslint-focus import/order packages/core packages/traits   (Relies on Bash globbing) Run `import/order` on every\n                                                                file inside 'packages/core' OR 'packages/traits'.\n  npx eslint-focus import/order packages/core                   Adds eslint-disable-next-line directives to ignore all\n  --allowInlineConfig --fix --fix-type add-disable-directive    `import/order` violations inside 'packages/core'.\n```\n\n```bash\n$ npx eslint-focus react/no-unstable-nested-components .\n/Users/sebastian.silbermann/repo/BottomSheet.native.tsx:106:29\n/Users/sebastian.silbermann/repo/BottomSheet.native.tsx:145:15\n/Users/sebastian.silbermann/repo/CardExpirationWarning.tsx:51:23\n┌──────────────────────┬────────┐\n│       (index)        │ Values │\n├──────────────────────┼────────┤\n│   Considered files   │ 71671  │\n│    Checked rules     │ 71671  │\n│    Skipped files     │  181   │\n│ Files failed to lint │   1    │\n│  Files with issues   │  216   │\n│        Issues        │  308   │\n└──────────────────────┴────────┘\nDone in 386.08s.\n```\n\n## Missing\n\nConfigure extensions. By default it runs on everything that's TypeScript or JavaScript i.e. `/\\.(cjs|cts|js|jsx|mjs|mts|ts|tsx)$/`.\n\n## Why?\n\n- eslint-nibbler is slow\n- ESLint formatters still executes every rule\n- ESLint `--no-eslintrc` means I have to know the parser options up front\n- ESLint has no built-in support to stream results\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feps1lon%2Feslint-focus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feps1lon%2Feslint-focus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feps1lon%2Feslint-focus/lists"}