5.0.1 • Published 9 months ago

@npmcli/eslint-config v5.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

@npmcli/eslint-config

This module contains eslint rules used by the npm CLI team. All rules are listed in index.js at the root of this repo.

Usage

To facilitate having a single .eslintrc.js that can live untouched in every project, we prefer to use a default config like:

const { readdirSync: readdir } = require('fs')

const localConfigs = readdir(__dirname)
  .filter((file) => file.startsWith('.eslintrc.local.'))
  .map((file) => `./${file}`)

module.exports = {
  extends: [
    '@npmcli',
    ...localConfigs,
  ],
}

This allows any overrides for a project to exist in a separate file, typically .eslintrc.local.json.

bin

This module also contains a bin script that will run eslint with the bundled config.

npm i -D @npmcli/eslint-config

# lint with our style rules
npx @npmcli/eslint-config -- # any args to eslint go here...`
5.0.1

9 months ago

5.0.0

11 months ago

4.0.5

1 year ago

4.0.4

1 year ago

4.0.3

1 year ago

4.0.2

2 years ago

4.0.1

3 years ago

4.0.0

3 years ago

3.1.0

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.0.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago