1. @npmcli/eslint-config
eslint config used by the npm cli team
@npmcli/eslint-config
Package: @npmcli/eslint-config
Created by: npm
Last modified: Mon, 22 Apr 2024 14:51:22 GMT
Version: 4.0.3
License: ISC
Downloads: 20,985
Repository: https://github.com/npm/eslint-config

Install

npm install @npmcli/eslint-config
yarn add @npmcli/eslint-config

@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...`

Dependencies

RELATED POST

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin