eslint/rules/node
Node: the mode of a workspace root and of everything around the projects (tool configs, scripts, specs run by Node): Node globals and modules, default exports for the tools, imports by path with their extension (Node ESM needs it), devDependencies, console output. rules/browser turns a project's sources back to the browser.
7 rules, 3 on. Source: lint/eslint/rules/node.mjs.
| Rule | Setting | Files | What it checks | Why |
|---|---|---|---|---|
import-x/no-anonymous-default-export | off | JS + TS | — | Off: tools load their config from a default export. |
import-x/no-default-export | off | JS + TS | — | — |
import-x/extensions | error, ["always",{"ignorePackages":true,"checkTypeImports":true}] | JS + TS | — | Custom: Node ESM needs the extension of a relative import (./lint/eslint/presets/typescript-node.mjs). |
import-x/no-extraneous-dependencies | error, {"devDependencies":true,"optionalDependencies":false,"pee… | JS + TS | — | Custom: tools and scripts are never shipped: they may import devDependencies. |
import-x/no-nodejs-modules | off | JS + TS | — | Off: tool configs and scripts run in Node. |
local/import-folders | error, {"mode":"simplify"} | JS + TS | — | Custom: a path an index re-exports is simplified on save (./lint/index.mjs); a deep path stays allowed. |
no-console | off | JS + TS | Disallow the use of console | Off: tools and scripts report on the console. |