Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 3.66 KB

node.md

File metadata and controls

41 lines (27 loc) · 3.66 KB

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 your eslint.config.js file:

    import node from '@code-pushup/eslint-config/node.js';
    import tseslint from 'typescript-eslint';
    
    export default tseslint.config(...node);

📏 Rules (294)

290 rules are included from javascript 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