{"id":19580,"library":"eslint-config-seekingalpha-react","title":"eslint-config-seekingalpha-react","description":"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.","status":"active","version":"10.34.0","language":"javascript","source_language":"en","source_url":"https://github.com/seekingalpha/javascript","tags":["javascript","code","codelinter","policy","quality","eslint","eslintconfig","ECMAScript6","sa"],"install":[{"cmd":"npm install eslint-config-seekingalpha-react","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-seekingalpha-react","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-seekingalpha-react","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency: ESLint 9.39.2 required for flat config","package":"eslint","optional":false},{"reason":"peer dependency: provides JSX accessibility rules","package":"eslint-plugin-jsx-a11y","optional":false},{"reason":"peer dependency: provides React-specific linting rules","package":"eslint-plugin-react","optional":false},{"reason":"peer dependency: enforces React Hooks rules","package":"eslint-plugin-react-hooks","optional":false}],"imports":[{"note":"ESLint 9 flat config is ESM-only; CommonJS require throws error.","wrong":"const reactConfig = require('eslint-config-seekingalpha-react')","symbol":"default","correct":"import reactConfig from 'eslint-config-seekingalpha-react'"},{"note":"Direct array spread may fail if reactConfig lacks expected structure; the correct pattern spreads plugins and rules explicitly.","wrong":"export default [reactConfig]","symbol":"plugins and rules spread","correct":"export default [{ plugins: { ...reactConfig.plugins }, rules: { ...reactConfig.rules } }]"},{"note":"Export is default only, not named.","wrong":"import { reactConfig } from 'eslint-config-seekingalpha-react'","symbol":"config object","correct":"import reactConfig from 'eslint-config-seekingalpha-react';"}],"quickstart":{"code":"// eslint.config.js\nimport reactConfig from 'eslint-config-seekingalpha-react';\n\nexport default [\n  {\n    files: ['src/**/*.{js,jsx,ts,tsx}'],\n    plugins: {\n      ...reactConfig.plugins,\n    },\n    rules: {\n      ...reactConfig.rules,\n      // Override any rules as needed\n      'react/prop-types': 'off', // Example override\n    },\n  },\n];\n","lang":"javascript","description":"Shows how to use the shareable config in an ESLint flat config file, importing the default export and merging plugins and rules."},"warnings":[{"fix":"Update to ESLint 9 and use flat config (eslint.config.js). For ESLint 8, pin to version 9.x.","message":"Version 10.x requires ESLint 9.x flat config format; previous versions used .eslintrc format.","severity":"breaking","affected_versions":">=10.0.0"},{"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.","message":"Peer dependency versions are pinned to exact versions (e.g., eslint@9.39.2). Using different versions may cause rule incompatibilities.","severity":"breaking","affected_versions":">=10.0.0"},{"fix":"Always access .plugins and .rules explicitly, as shown in the documentation.","message":"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.","severity":"gotcha","affected_versions":">=10.0.0"},{"fix":"Monitor GitHub releases or consider a community-maintained alternative if updates lag.","message":"This config may not be actively maintained as it mirrors SeekingAlpha's internal setup. Check for new releases before upgrading ESLint.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run: npm install eslint-config-seekingalpha-react --save-dev","cause":"Package not installed or missing from node_modules.","error":"Error: Cannot find module 'eslint-config-seekingalpha-react'"},{"fix":"Use import syntax: import reactConfig from 'eslint-config-seekingalpha-react'","cause":"Using require() with an ESM-only package (ESLint 9 flat config).","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module from CommonJS not supported."},{"fix":"Use export default [{ plugins: { ...reactConfig.plugins }, rules: { ...reactConfig.rules } }]","cause":"Spreading the entire config object directly into an array (e.g., export default [...reactConfig]).","error":"TypeError: reactConfig is not iterable"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}