eslint-plugin-nitpick

0.6.0 • Public • Published

eslint-plugin-nitpick

Nitpicky ESLint rules.

Installation

npm install -D eslint eslint-plugin-nitpick

Configuration

Old (.eslintrc.*)

module.exports = {
  // ...
  plugins: [
    // ...
    "nitpick",
  ],
  extends: [
    // ...
    "nitpick/recommended",
  ],
};

New (eslint.config.js)

Either use one of the configs in eslint-plugin-nitpick/lib/configs or import the plugin as a standalone from eslint-plugin-nitpick.

const nitpickRecommended = require("eslint-plugin-nitpick/lib/configs/recommended");

module.exports = {
  // ...
  ...nitpickRecommended,
};

Rules

💼 Configurations enabled in.
🌐 Set in the all configuration.
✅ Set in the recommended configuration.
🔧 Automatically fixable by the --fix CLI option.
💡 Manually fixable by editor suggestions.

Name                     Description 💼 🔧 💡
no-redundant-vars Warns against variables that are returned without any other usage 🌐 ✅ 💡
no-useless-interpolation Warns against template-literal interpolation with a literal 🌐 ✅ 🔧 💡
no-useless-rest Warns against using a rest element without destructuring other properties/elements 🌐 ✅ 💡
prefer-if-conditionals Prefer an if statement to using logical operators (?:, && or ||) in expressions 🌐 ✅ 🔧 💡

Configs

Name
🌐 all
recommended

Package Sidebar

Install

npm i eslint-plugin-nitpick

Weekly Downloads

251

Version

0.6.0

License

MIT

Unpacked Size

20.2 kB

Total Files

15

Last publish

Collaborators

  • ej-shafran