Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/npm/eslint-config
a base eslint config used by the npm CLI team
https://github.com/npm/eslint-config
npm-cli
Last synced: about 1 month ago
JSON representation
a base eslint config used by the npm CLI team
- Host: GitHub
- URL: https://github.com/npm/eslint-config
- Owner: npm
- License: other
- Created: 2021-08-26T20:42:34.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-24T18:45:43.000Z (about 2 months ago)
- Last Synced: 2024-09-30T20:54:18.135Z (about 1 month ago)
- Topics: npm-cli
- Language: JavaScript
- Homepage:
- Size: 234 KB
- Stars: 10
- Watchers: 8
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
## @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:```js
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...`