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 🙏

© 2026 – Pkg Stats / Ryan Hefner

eslint-config-alanramsay-node

v3.0.1

Published

ESLint config based on semistandard and prettier

Readme

eslint-config-alanramsay-node

ESLint config based on prettier.

How to install

  • Run npx install-peerdeps eslint-config-alanramsay-node --dev

How to configure

  • Create a file named .eslintrc.js with the following contents:
module.exports = {
  extends: ['eslint-config-alanramsay-node']
};
  • Create a file named .eslintignore with the following contents:
node_modules
!.eslintrc.js
  • Add any folders that you do not want to be linted into the .eslintignore file, e.g. build, out
  • Add lint and lint-fix entries under the scripts section of your package.json, e.g:
"scripts": {
  "lint": "eslint .",
  "lint-fix": "eslint . --fix"
}

Note these commands will lint all JavaScript files in your project so you it is important that you have ignored any output folders by adding them to the .eslintignore file (copying the globs from your .gitignore file is normally helpful)

Configure rules for Jest

If you are using Jest in your project, you should install the Jest plugin for ESLint by doing the following:

  • Run npm install --save-dev eslint-plugin-jest
  • Add 'plugin:jest/recommended' to your eslintrc.js file, e.g.
module.exports = {
  extends: ['eslint-config-alanramsay-node', 'plugin:jest/recommended']
};

Configure rules for React

If you are using React in your project, you should use eslint-config-alanramsay-react instead, which extends this configuration with rules for React, JSX and Jest.

How to run

  • Use npm run lint-fix to lint all files and fix any fixable errors automatically

Lint on commit using Husky and lint-staged

  • Run npm install --save-dev lint-staged husky
  • Add a lint-staged section within your package.json file with the following content (note this is not within the scripts section but in the root):
  "lint-staged": {
    "**/*.js": [
      "eslint --fix",
      "git add"
    ]
  }
  • Add a lint-staged script to your package.json, scripts, e.g.
"scripts": {
  "lint": "eslint .",
  "lint-fix": "eslint . --fix",
  "lint-staged": "lint-staged"
}
  • You can now run npm run lint-staged to fix linting errors in any JavaScript files that are currently staged in Git. When you have a large codebase, this will be significantly faster than linting all files in your project unnecessarily.
  • Add a precommit command to the scripts in your package.json file, e.g. "precommit": "lint-staged"
  • Whenever you commit to Git, the system will now automatically run lint-staged, which will automatically fix any fixable linting issues in files that that are currently staged in Git.

Bonus: Install the ESLint plugin for your code editor

Most modern code editors and IDEs have an ESLint plugin available which improve the developer experience when using ESLint.

For example, if you use Visual Studio Code, search for ESLint in the Extension Marketplace, and install it. After reloading the app, it should automatically detect your .eslintrc.js file and will now show you any linting errors within the editor as you type. If you like, you can add "eslint.autoFixOnSave": true to your properties file, so that all fixable ESLint errors in a file will be automatically fixed whenever that file is saved.