{"id":19581,"library":"eslint-config-seekingalpha-tests","title":"SeekingAlpha Tests ESLint Config","description":"SeekingAlpha's shareable ESLint configuration for testing environments using ESLint 9.39.2, eslint-plugin-jest 29.15.2, and eslint-plugin-testing-library 7.16.2. This config is designed for ES6+ codebases and is distributed under MIT license. It requires Node.js >= 24 and uses the flat config format (eslint.config.js) introduced in ESLint 9. The package enforces Jest and Testing Library best practices for unit and integration tests. It is part of SeekingAlpha's JavaScript monorepo and follows their internal coding standards.","status":"active","version":"4.60.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-tests","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-seekingalpha-tests","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-seekingalpha-tests","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency: core ESLint runtime required","package":"eslint","optional":false},{"reason":"Peer dependency: provides Jest-specific linting rules","package":"eslint-plugin-jest","optional":false},{"reason":"Peer dependency: provides Testing Library-specific linting rules","package":"eslint-plugin-testing-library","optional":false}],"imports":[{"note":"Package is ESM-only. Requires Node >= 24 and 'type': 'module' in package.json or use .mjs extension.","wrong":"const testsConfig = require('eslint-config-seekingalpha-tests');","symbol":"default (testsConfig)","correct":"import testsConfig from 'eslint-config-seekingalpha-tests';"},{"note":"Import the default export and destructure plugins and rules. Do not require() as it will throw.","wrong":"const { plugins } = require('eslint-config-seekingalpha-tests');","symbol":"plugins","correct":"const { plugins } = testsConfig;"},{"note":"Access rules object from the default export. This is the recommended pattern in the README.","wrong":"","symbol":"rules","correct":"const { rules } = testsConfig;"}],"quickstart":{"code":"import testsConfig from 'eslint-config-seekingalpha-tests';\n\nexport default [\n  {\n    plugins: {\n      ...testsConfig.plugins,\n    },\n    rules: {\n      ...testsConfig.rules,\n    },\n  },\n];","lang":"javascript","description":"Shows how to use the shareable config in eslint.config.js by importing the default export and spreading its plugins and rules."},"warnings":[{"fix":"Migrate to eslint.config.js flat config format. See ESLint documentation.","message":"ESLint 9 flat config only; does not support .eslintrc.* formats. Using legacy config results in 'Configuration for rule \"...\" is invalid' or ESLint failing to load config.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Upgrade Node.js to 24 or later.","message":"Requires Node.js >= 24. Older Node versions cause 'ERR_REQUIRE_ESM' or syntax errors.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Wrap in an array as shown in the quickstart example, or spread plugins and rules into a new config object.","message":"The default export is an object with 'plugins' and 'rules' keys, not an array. Using it directly as a config array element may cause 'Config (element) is not an array' error.","severity":"gotcha","affected_versions":">=4.0.0"},{"fix":"Install with exact versions: npm install eslint@9.39.2 eslint-plugin-jest@29.15.2 eslint-plugin-testing-library@7.16.2 --save-dev","message":"Peer dependencies must be installed at exact versions specified ('eslint@9.39.2', 'eslint-plugin-jest@29.15.2', 'eslint-plugin-testing-library@7.16.2'). Mismatched versions may cause rule conflicts or missing plugins.","severity":"gotcha","affected_versions":">=4.0.0"},{"fix":"Consider creating your own ESLint config or using community alternatives like eslint-config-jest.","message":"Package is internal to SeekingAlpha; no longer maintained for public use. Issues and PRs may not be addressed.","severity":"deprecated","affected_versions":">=4.0.0"}],"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-tests@latest --save-dev'","cause":"Package not installed or not in node_modules.","error":"Error: Cannot find module 'eslint-config-seekingalpha-tests'"},{"fix":"Use import statement in an ESM context (e.g., set 'type': 'module' in package.json or rename file to .mjs).","cause":"Using CommonJS require() to load an ESM-only package.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module not supported"},{"fix":"Ensure eslint-plugin-jest@29.15.2 is installed exactly.","cause":"Incompatible version of eslint-plugin-jest or missing peer dependency.","error":"Oops! Something went wrong! :( ESLint: 9.39.2. Configuration for rule 'jest/consistent-test-it' is invalid: Value \"test\" does not match any valid value."},{"fix":"Use flat config eslint.config.js and import the module as shown in quickstart.","cause":"Using the legacy 'extends' field in .eslintrc.* with a flat config package.","error":"ESLint couldn't find the config 'eslint-config-seekingalpha-tests' in extended configs. You can remove this config from the extends list.","affected_versions":">=4.0.0"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}