npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

eslint-nibble-ignore

v3.0.0

Published

Ease into ESLint, by fixing one rule at a time

Downloads

28

Readme

eslint-nibble

npm dependency status Build Status

Sometimes running ESLint against an existing project and fixing the hundreds or thousands of errors is biting off more than you can chew. This will give a quick overview of your failing rules, and then show the detailed error reports for one rule at a time.

Major versions of this tool correspond to the major version of ESLint. This means eslint-nibble version 3.X will use the latest eslint 3.X.

Installation

npm install eslint-nibble

You can also install eslint-nibble globally, but it is not recommended.

Instead, try installing eslint-nibble in your project without --save-dev (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, install eslint itself with npm install eslint --save-dev and use that for all your ongoing linting.

Usage

Add something like the following to your package.json file:

"scripts": {
  "nibble": "eslint-nibble lib/ tests/ index.js"
}

This will run eslint against .js files in the lib/ and tests/ directories, as well as index.js.

Then, to run eslint-nibble, you can use:

npm run nibble

Eslint-nibble will then display a rundown of the rules that are failing and a summary of the results, using eslint-stats and eslint-summary, and will ask you to pick a rule to work on:

eslint-stats-screenshot

Type in the name of the rule, and then a detailed list of the errors will be presented, using eslint-friendly-formatter. If 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.

eslint-friendly-formatter-screenshot

Options

--ext

If your javascript files have an extension other than .js, you can use the --ext flag to specify which extensions to examine. For example, this will check all files ending in .jsx` or .js`:

eslint-nibble --ext .jsx,.js lib/

globs

You are not limited to directory and file names as arguments, you can also specify a glob pattern. For example, to examine all .jsx files in "test/" directories within "lib/":

eslint-nibble lib/**/test/**/*.jsx

Notes

This module does not make any decisions about which ESLint rules to run. Make sure your project has a .eslintrc file if you want ESLint to do anything. As of version 1.0.0, no rules are enabled by default.