Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 2.37 KB

node.md

File metadata and controls

40 lines (27 loc) · 2.37 KB

@code-pushup/eslint-config/node config

Config for Node.js projects.

🏗️ Setup

  1. If you haven't already, make sure to install @code-pushup/eslint-config and its required peer dependencies.

  2. Since this plugin requires additional peer dependencies, you have to install them as well:

    npm install -D eslint-plugin-n
  3. Add to extends in your .eslintrc file:

    {
      "extends": ["@code-pushup/eslint-config/node"]
    }

📏 Rules (255)

251 rules are included from the default config. For brevity, only the 4 additional rules are listed in this document.

🔧 Automatically fixable by the --fix CLI option.
💡 Manually fixable by editor suggestions.
🧪🚫 Disabled for test files.
🧪⚠️ Severity lessened to warning for test files.

🚨 Errors (1)

Plugin Rule Options Autofix Overrides
n no-unsupported-features/node-builtins
disallow unsupported Node.js built-in APIs on the specified version

⚠️ Warnings (3)

Plugin Rule Options Autofix Overrides
n no-process-exit
disallow the use of process.exit()
n no-sync
disallow synchronous methods
n prefer-promises/fs
enforce require("fs").promises