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

@rgrove/eslint-config

v5.1.0

Published

Ryan Grove's personal ESLint configs.

Downloads

125

Readme

@rgrove/eslint-config

These are my personal ESLint configs. There are many like them, but these ones are mine.

You're welcome to extend my configs and use them for your own projects, but be warned: my preferences change from time to time, and these configs will change with them.

Please don't ask me to change these configs to suit your preferences. Just override them in your own configs, or don't use them.

Installation

npm

npm i --save-dev @rgrove/eslint-config

pnpm

pnpm add --save-dev --config.auto-install-peers=true @rgrove/eslint-config

Usage

To use the primary config, add an extends property to your .eslintrc.js (or wherever you've chosen to configure ESLint), like this:

module.exports = {
  extends: '@rgrove/eslint-config'
};

You can extend multiple configs using an array:

module.exports = {
  extends: [
    '@rgrove/eslint-config',
    '@rgrove/eslint-config/browser',
    '@rgrove/eslint-config/modules',
    '@rgrove/eslint-config/react'
  ]
};

When extending multiple configs, always extend @rgrove/eslint-config first, since it defines baseline rules that other configs may override.

See the documentation for ESLint's extends property for more details.

Available Configs

@rgrove/eslint-config

This is the base config. It defines parser options and rules that are relevant in all modern JS environments, and doesn't assume the use of any particular module system.

When extending multiple configs, this one should always be first.

@rgrove/eslint-config/browser

Defines parser options and rules specific to modern browser JS.

@rgrove/eslint-config/commonjs

Defines parser options and rules specific to CommonJS modules.

@rgrove/eslint-config/modules

Defines parser options and rules specific to ES modules.

@rgrove/eslint-config/node

Defines parser options and rules specific to modern Node.js.

@rgrove/eslint-config/react

Defines parser options and rules specific to React.

@rgrove/eslint-config/typescript

Defines parser options and rules specific to TypeScript.

Using an alternative parser

These configs use ESLint's default parser. If you're using (for example) Babel to transpile language features that aren't yet part of the ECMAScript standard, ESLint may not be able to parse them, and you may see parsing errors when you run ESLint.

To fix this, you may need to specify an alternative parser such as babel-eslint in your ESLint config:

module.exports = {
  parser: 'babel-eslint',

  extends: [
    '@rgrove/eslint-config',
    '@rgrove/eslint-config/browser',
    '@rgrove/eslint-config/modules',
    '@rgrove/eslint-config/react'
  ]
};

You'll need to install and properly configure babel-eslint (or whatever alternative parser you use) as a dependency of your own project.