SeekingAlpha Node.js ESLint Config
raw JSON → 9.32.0 verified Sat Apr 25 auth: no javascript
SeekingAlpha's shareable ESLint config for Node.js projects, version 9.32.0. This config packages rules from eslint-plugin-n for Node.js linting. It requires ESLint 9.39.2 and eslint-plugin-n 17.24.0 as peer dependencies and is designed for flat config only. Maintained by SeekingAlpha, it enforces a specific rule set tailored for Node.js development.
Common errors
error Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/eslint-config-seekingalpha-node/index.js from /path/to/.eslintrc.cjs not supported. ↓
cause Attempting to use require() on an ESM-only module.
fix
Rename .eslintrc.cjs to eslint.config.js and use import statements.
error Cannot find module 'eslint-plugin-n' ↓
cause Missing peer dependency eslint-plugin-n.
fix
Install the peer dependency: npm install eslint-plugin-n@17.24.0 --save-dev
Warnings
breaking v9 is ESM-only and requires flat config; CommonJS and legacy eslintrc format are not supported. ↓
fix Use ESM imports (import) in eslint.config.js. Convert from .eslintrc to flat config if needed.
deprecated v8.x is no longer maintained; upgrade to v9 for continued updates. ↓
fix Upgrade to v9 and update ESLint to 9.x.
breaking Peer dependency version requirements are strict: ESLint 9.39.2 and eslint-plugin-n 17.24.0. Installing other versions may cause conflicts. ↓
fix Ensure your project uses exact versions: npm install eslint@9.39.2 eslint-plugin-n@17.24.0 --save-dev
gotcha This config does not include any parser or environment; you may need to add parserOptions or env per your Node version. ↓
fix If linting globals like process or __dirname, add globals: { process: 'readonly', __dirname: 'readonly' } or use the env config property if available.
Install
npm install eslint-config-seekingalpha-node yarn add eslint-config-seekingalpha-node pnpm add eslint-config-seekingalpha-node Imports
- default wrong
const nodeConfig = require('eslint-config-seekingalpha-node')correctimport nodeConfig from 'eslint-config-seekingalpha-node' - plugins wrong
const { plugins } = require('eslint-config-seekingalpha-node')correctimport nodeConfig from 'eslint-config-seekingalpha-node'; const { plugins } = nodeConfig; - rules wrong
const { rules } = require('eslint-config-seekingalpha-node')correctimport nodeConfig from 'eslint-config-seekingalpha-node'; const { rules } = nodeConfig;
Quickstart
import nodeConfig from 'eslint-config-seekingalpha-node';
export default [
{
plugins: {
...nodeConfig.plugins,
},
rules: {
...nodeConfig.rules,
},
},
];