eslint-config-seekingalpha-react

raw JSON →
10.34.0 verified Sat Apr 25 auth: no javascript

SeekingAlpha's shareable ESLint config for React.js projects. Current stable version 10.34.0, requires Node >= 24 and ESLint 9.39.2. This flat config (ESLint 9+) bundles rules from eslint-plugin-react, eslint-plugin-jsx-a11y, and eslint-plugin-react-hooks. It is an opinionated, company-internal preset but publicly available. Unlike generic configs (e.g., eslint-config-airbnb), it is tailored to SeekingAlpha's code style and focuses on React, accessibility, and hooks best practices. Releases follow the plugin's updates with manual bumps.

error Error: Cannot find module 'eslint-config-seekingalpha-react'
cause Package not installed or missing from node_modules.
fix
Run: npm install eslint-config-seekingalpha-react --save-dev
error Error [ERR_REQUIRE_ESM]: require() of ES Module from CommonJS not supported.
cause Using require() with an ESM-only package (ESLint 9 flat config).
fix
Use import syntax: import reactConfig from 'eslint-config-seekingalpha-react'
error TypeError: reactConfig is not iterable
cause Spreading the entire config object directly into an array (e.g., export default [...reactConfig]).
fix
Use export default [{ plugins: { ...reactConfig.plugins }, rules: { ...reactConfig.rules } }]
breaking Version 10.x requires ESLint 9.x flat config format; previous versions used .eslintrc format.
fix Update to ESLint 9 and use flat config (eslint.config.js). For ESLint 8, pin to version 9.x.
breaking Peer dependency versions are pinned to exact versions (e.g., eslint@9.39.2). Using different versions may cause rule incompatibilities.
fix Install exact peer versions: eslint@9.39.2, eslint-plugin-jsx-a11y@6.10.2, eslint-plugin-react@7.37.5, eslint-plugin-react-hooks@7.1.1.
gotcha The config exports an object with plugins and rules properties, not a flat array. Spreading directly into array may break if config is not iterable.
fix Always access .plugins and .rules explicitly, as shown in the documentation.
deprecated This config may not be actively maintained as it mirrors SeekingAlpha's internal setup. Check for new releases before upgrading ESLint.
fix Monitor GitHub releases or consider a community-maintained alternative if updates lag.
npm install eslint-config-seekingalpha-react
yarn add eslint-config-seekingalpha-react
pnpm add eslint-config-seekingalpha-react

Shows how to use the shareable config in an ESLint flat config file, importing the default export and merging plugins and rules.

// eslint.config.js
import reactConfig from 'eslint-config-seekingalpha-react';

export default [
  {
    files: ['src/**/*.{js,jsx,ts,tsx}'],
    plugins: {
      ...reactConfig.plugins,
    },
    rules: {
      ...reactConfig.rules,
      // Override any rules as needed
      'react/prop-types': 'off', // Example override
    },
  },
];