{"id":15020728,"url":"https://github.com/ianvs/eslint-nibble","last_synced_at":"2025-05-14T01:07:49.716Z","repository":{"id":34263931,"uuid":"38149450","full_name":"IanVS/eslint-nibble","owner":"IanVS","description":"Ease into ESLint, by fixing one rule at a time","archived":false,"fork":false,"pushed_at":"2024-11-18T22:41:49.000Z","size":1591,"stargazers_count":822,"open_issues_count":13,"forks_count":29,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-09T20:44:32.891Z","etag":null,"topics":["autofix","eslint","eslint-nibble"],"latest_commit_sha":null,"homepage":"","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/IanVS.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2015-06-27T06:12:55.000Z","updated_at":"2025-04-09T20:03:50.000Z","dependencies_parsed_at":"2023-01-16T23:30:38.789Z","dependency_job_id":"ba74171a-c402-44f2-8f65-b26d47764065","html_url":"https://github.com/IanVS/eslint-nibble","commit_stats":{"total_commits":168,"total_committers":19,"mean_commits":8.842105263157896,"dds":"0.36309523809523814","last_synced_commit":"eb5545b3ebb1e6063f6b8b3c212a3d4467ae6293"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IanVS%2Feslint-nibble","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IanVS%2Feslint-nibble/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IanVS%2Feslint-nibble/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IanVS%2Feslint-nibble/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IanVS","download_url":"https://codeload.github.com/IanVS/eslint-nibble/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248353116,"owners_count":21089558,"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":["autofix","eslint","eslint-nibble"],"created_at":"2024-09-24T19:55:30.485Z","updated_at":"2025-04-11T06:24:59.377Z","avatar_url":"https://github.com/IanVS.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-nibble\n\n[![npm][npm-badge]][npm-badge-url]\n[![Build Status][travis-badge]][travis-badge-url]\n\nSometimes running ESLint against an existing project and fixing the hundreds or thousands of errors is biting off more than you can chew.  \nInstead, `eslint-nibble` will give a quick overview of your failing rules, and then show the detailed error reports for one rule at a time.\n\nIf a rule can be automatically fixed by ESLint, `eslint-nibble` will allow you to run autofix on individual rules, allowing you to make more focused commits.\n\nRead this excellent blog post from [Paul Hands](https://github.com/paulhands) for a clear explanation of what eslint-nibble can do for your project: [Hiring a gardener to trim the weeds](https://medium.com/@paul.hands.phd/hiring-a-gardener-to-trim-the-weeds-adding-a-linter-halfway-through-building-an-application-194c527db151).\n\n## Installation\n\n```bash\nnpm install --no-save eslint-nibble\n```\n\nYou can also install `eslint-nibble` globally, but it is not recommended.\n\nInstead, try installing `eslint-nibble` in your project with `--no-save` (as shown above), because this tool is intended only to get you up and running.  Once you're happy with your rules and your code, you can remove `eslint-nibble`.\n\nNote: as of version `5.0.0`, `eslint-nibble` no longer comes with its own bundled version of `eslint`.  Instead, you should install `eslint` into your project (see [getting started](https://eslint.org/docs/user-guide/getting-started)), and `eslint-nibble` will use the version you install.  \n\nThis module does not make any decisions about which ESLint rules to run.  Make sure your project has an `.eslintrc` file if you want ESLint to do anything.  No linting rules are enabled by default.\n\n\n## Usage\n\nThere are a few methods you can use to run `eslint-nibble`, depending on the package manager you are using.\n\n### npx\n\nIf you're using `npm@5.2.0` or later, you can simply run:\n\n```bash\nnpx eslint-nibble \u003cdirectories and files to lint\u003e\n```\n\n### yarn\n\nSimilarly, if you are using yarn, you can run:\n\n```bash\nyarn eslint-nibble \u003cdirectories and files to lint\u003e\n```\n\n### package.json script\n\nAdd something like the following to your `package.json` file:\n\n```json\n\"scripts\": {\n  \"nibble\": \"eslint-nibble \u003cdirectories and files to lint\u003e\"\n}\n```\n\nThen, to run eslint-nibble, you can use:\n\n```bash\nnpm run nibble\n```\n\nEslint-nibble will then display a rundown of the rules that are failing and a summary of the results, \nusing [eslint-stats](https://github.com/ganimomer/eslint-stats) and will ask you to pick a rule to work on:\n\n![eslint-stats-screenshot](docs/eslint-stats-screenshot.png)\n\nSelect one of the rules by arrowing up/down and pressing `enter`.  \nIf the rule can be fixed automatically, ESLint will ask if you'd like it to attempt perform fixes for you.\nIf there are lint warnings, you will also be asked whether you want those to be auto-fixed.\n\n\u003cimg src=\"docs/autofix-applied.png\" width=\"500px\"/\u003e\n\nIf you decide not to make autofixes, or the autofix completes but cannot fix all the errors, then a detailed list of the errors will be presented, using [eslint-friendly-formatter](https://github.com/royriojas/eslint-friendly-formatter).  \nIf you are using iTerm2 or Guake, you can set them up so that your text editor opens to the correct line when you click on the filename.\n\n![eslint-friendly-formatter-screenshot](docs/eslint-friendly-formatter-screenshot.png)\n\n## Options\n\n### `--config, -c`\n\nESLint will automatically detect config files with [standard naming](http://eslint.org/docs/user-guide/configuring#configuration-file-formats).\nAdd the `--config` option to specify a different config file for ESLint to use.\n\n### `--cache`\n\nHighly recommended.  ESLint will cache the results of linting, causing subsequent runs to be much faster.  See the\n[ESLint docs](https://eslint.org/docs/user-guide/command-line-interface#--cache) for more details.\n\n### `--cache-location`\nWhen used in conjunction with the `--cache` flag, controls where the ESLint cache\nis written.  See the [ESLint docs](https://eslint.org/docs/user-guide/command-line-interface#--cache-location)\nfor more details.\n\n### `--ext`\n\nIf your Javascript files have an extension other than `.js`, you can use the `--ext` flag to\nspecify which extensions to examine.  For example, this will check all files ending in `.jsx` or `.js`:\n\n```shell\neslint-nibble --ext .jsx,.js lib/\n```\n\n### `--format, -f`\nWhen used in conjunction with `--no-interactive`, controlls the output [format from ESLint](https://eslint.org/docs/user-guide/formatters).  Has no effect in interactive mode.  The default ESLint formatter will be used if `--format` is not set.\n\n### `--fixable-only`\nOnly show rules that are autofixable.\n\n\n### `--multi`\nAllows selection of more than one rule at a time in the interactive cli.\n\n### `--no-interactive`\nPotentially useful in CI, or any other situation where you would like to run ESLint using your standard project config (`.eslintrc`), but only on a subset of rules (using the `--rule` flag).  Using `--no-interactive` will prevent eslint-nibble from displaying a menu, but will instead print out any warnings/errors and return an exit code of 1 if there are errors, or 0 otherwise, just like ESLint itself does.\n\n### `--no-warnings`\nOnly show results for linting errors, not warnings.\n\n### `--resolve-plugins-relative-to`\n\nChanges the folder where plugins are resolved from.  See the\n[ESLint docs](https://eslint.org/docs/user-guide/command-line-interface#--resolve-plugins-relative-to)\nfor more details.\n\n### `--rule`\nIf you have so many failing rules that navigating the list is cumbersome, use this flag to filter down\nthe rules that are displayed.  Multiple rules can be included as comma-separated strings (e.g. `--rule semi,quotes`),\nor by using multiple `--rule` flags (e.g. `--rule semi --rule quotes`).\n\n### `--rulesdir`\nThis corresponds to the eslint `--rulesdir` [option](https://eslint.org/docs/user-guide/command-line-interface#-rulesdir).  Use it to specify a path to custom eslint rules.\n\n\n### globs\n\nYou are not limited to directory and file names as arguments, you can also specify a glob pattern.\nFor example, to examine all `*.jsx` files in all `test/` directories under `lib/`:\n\n```shell\neslint-nibble lib/**/test/**/*.jsx\n```\n\n[npm-badge]: https://img.shields.io/npm/v/eslint-nibble.svg\n[npm-badge-url]: https://www.npmjs.com/package/eslint-nibble\n[travis-badge]: https://travis-ci.org/IanVS/eslint-nibble.svg?branch=master\n[travis-badge-url]: https://travis-ci.org/IanVS/eslint-nibble\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fianvs%2Feslint-nibble","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fianvs%2Feslint-nibble","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fianvs%2Feslint-nibble/lists"}