{"id":10819,"library":"eslint-config-standard-jsx","title":"JavaScript Standard Style JSX ESLint Config","description":"eslint-config-standard-jsx provides ESLint configuration for linting JSX syntax according to JavaScript Standard Style. It extends `eslint-config-standard` and specifically adds rules for JSX, making it suitable for projects using JSX with libraries like React, Preact, or others, without enforcing React-specific patterns. This package is intended for advanced users who prefer direct ESLint configuration rather than using the `standard` command-line tool. The current stable version is v11.0.0. Releases typically align with updates to ESLint, `standard` itself, and `eslint-plugin-react`. Its key differentiator is its focus on generic JSX rules, utilizing `eslint-plugin-react` for its JSX capabilities but remaining framework-agnostic regarding specific virtual DOM implementations. It requires several other `eslint-plugin-*` packages to be installed alongside it for a complete setup.","status":"active","version":"11.0.0","language":"javascript","source_language":"en","source_url":"git://github.com/standard/eslint-config-standard-jsx","tags":["javascript","JavaScript Standard Style","check","checker","code","code checker","code linter","code standards","code style"],"install":[{"cmd":"npm install eslint-config-standard-jsx","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-standard-jsx","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-standard-jsx","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core ESLint engine required for all ESLint configurations.","package":"eslint","optional":false},{"reason":"Provides the generic JSX linting rules used by this configuration.","package":"eslint-plugin-react","optional":false},{"reason":"This configuration extends `eslint-config-standard`, providing the base JavaScript Standard Style rules.","package":"eslint-config-standard","optional":false},{"reason":"Required for the full 'standard' ruleset when extending `eslint-config-standard`.","package":"eslint-plugin-promise","optional":false},{"reason":"Required for the full 'standard' ruleset when extending `eslint-config-standard`.","package":"eslint-plugin-import","optional":false},{"reason":"Required for the full 'standard' ruleset when extending `eslint-config-standard`.","package":"eslint-plugin-node","optional":false}],"imports":[{"note":"This config is referenced by its short name in the `extends` array of an `.eslintrc` file. While the full package name works, the short form is canonical.","wrong":"{ \"extends\": [\"standard\", \"eslint-config-standard-jsx\"] }","symbol":"standard-jsx","correct":"{ \"extends\": [\"standard\", \"standard-jsx\"] }"},{"note":"ESLint configuration files (e.g., `.eslintrc.js`) typically use CommonJS `module.exports` for their configuration objects. Direct ESM imports of the config package are not the standard way to apply it.","wrong":"import config from 'eslint-config-standard-jsx'","symbol":"config object","correct":"module.exports = { extends: ['standard', 'standard-jsx'] }"}],"quickstart":{"code":"npm install --save-dev eslint eslint-config-standard eslint-config-standard-jsx eslint-plugin-promise eslint-plugin-import eslint-plugin-node eslint-plugin-react\n\n// Then, create a .eslintrc.js file in your project root:\n// .eslintrc.js\nmodule.exports = {\n  extends: [\n    'standard',\n    'standard-jsx'\n  ],\n  // You can add project-specific rules or overrides here\n  rules: {\n    // Example: allow unused variables if they start with underscore\n    'no-unused-vars': ['error', { 'argsIgnorePattern': '^_', 'varsIgnorePattern': '^_', 'caughtErrorsIgnorePattern': '^_' }]\n  }\n};\n\n// To run ESLint (assuming you have an 'index.jsx' file):\n// npx eslint index.jsx","lang":"javascript","description":"Demonstrates how to install all necessary packages and configure ESLint using `eslint-config-standard-jsx` and its required peers in an `.eslintrc.js` file, then run linting."},"warnings":[{"fix":"Consider using `npm install -g standard` and `standard --fix` instead of manually configuring ESLint.","message":"This package is for advanced users configuring ESLint directly. Most users will find the `standard` package, which provides a CLI and pre-bundled configuration, much simpler to use.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Upgrade to `eslint-config-standard-jsx@^11.0.0` and ensure your `eslint` peer dependency meets the specified version (`^8.8.0`).","message":"Version 11.0.0 fixed an issue with the usage of ES2022 features. Projects using ES2022 syntax with older versions (pre-v11) might encounter parsing errors or incorrect linting results.","severity":"breaking","affected_versions":"<11.0.0"},{"fix":"Ensure all required peer and extended dependencies are installed: `npm install --save-dev eslint eslint-config-standard eslint-config-standard-jsx eslint-plugin-promise eslint-plugin-import eslint-plugin-node eslint-plugin-react`.","message":"Installing `eslint-config-standard-jsx` alone is not sufficient. You must also manually install `eslint`, `eslint-config-standard`, `eslint-plugin-react`, `eslint-plugin-promise`, `eslint-plugin-import`, and `eslint-plugin-node` as development dependencies.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Run `npm install --save-dev eslint-config-standard-jsx` or `yarn add --dev eslint-config-standard-jsx`.","cause":"The `eslint-config-standard-jsx` package is not installed or not discoverable by ESLint.","error":"Error: Failed to load config 'standard-jsx' to extend from."},{"fix":"Run `npm install --save-dev eslint-plugin-react` or `yarn add --dev eslint-plugin-react`.","cause":"The `eslint-plugin-react` package is not installed, which is a required dependency for `eslint-config-standard-jsx`.","error":"Error: Failed to load plugin 'react' declared in '.eslintrc' at 'standard-jsx#overrides[0]'."},{"fix":"Run `npm install --save-dev eslint-config-standard` or `yarn add --dev eslint-config-standard`.","cause":"The `eslint-config-standard` package is not installed, which is a base config extended by `standard-jsx`.","error":"Error: Failed to load config 'standard' to extend from."},{"fix":"Update `eslint-config-standard-jsx` to v11.0.0 or higher, and ensure your `eslint` version is at least `^8.8.0`. Also, verify your ESLint parser (if customized) is up-to-date and configured for the correct ECMAScript version.","cause":"You are using ES2022 syntax (e.g., top-level await, class static blocks) with an older version of `eslint` or `eslint-config-standard-jsx` that does not fully support it.","error":"Parsing error: '...' is not a valid ES2022 feature."}],"ecosystem":"npm"}