{"id":19626,"library":"eslint-config-wpcalypso","title":"eslint-config-wpcalypso","description":"ESLint shareable config for WordPress.com's Calypso JavaScript Coding Guidelines. Current stable version is 6.1.0. It enforces the Calypso style guide and is maintained by Automattic. Requires ESLint 7+, eslint-plugin-jsdoc, eslint-plugin-wpcalypso, and eslint-plugin-inclusive-language as peer dependencies. Distinct from generic WordPress ESLint configs by focusing on Calypso-specific conventions used in the WordPress.com dashboard.","status":"active","version":"6.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/Automattic/wp-calypso","tags":["javascript","eslint"],"install":[{"cmd":"npm install eslint-config-wpcalypso","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-wpcalypso","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-wpcalypso","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required to run ESLint","package":"eslint","optional":false},{"reason":"peer dependency for JSDoc rules","package":"eslint-plugin-jsdoc","optional":false},{"reason":"peer dependency with custom rules","package":"eslint-plugin-wpcalypso","optional":false},{"reason":"peer dependency for inclusive language checks","package":"eslint-plugin-inclusive-language","optional":false},{"reason":"optional peer dependency for React-specific rules","package":"eslint-plugin-react","optional":true}],"imports":[{"note":"When using shareable configs, you can omit the eslint-config- prefix.","wrong":"{\n  \"extends\": \"eslint-config-wpcalypso\"\n}","symbol":"extends","correct":"{\n  \"extends\": \"wpcalypso\"\n}"},{"note":"Use the /react sub-config to opt into React-specific rules instead of manually adding react plugin.","wrong":"{\n  \"extends\": [\"wpcalypso\", \"plugin:react/recommended\"]\n}","symbol":"extends (React)","correct":"{\n  \"extends\": \"wpcalypso/react\"\n}"},{"note":"The shareable config automatically loads its plugins when extended, so you don't need to specify them separately.","wrong":"{\n  \"extends\": \"wpcalypso\",\n  \"plugins\": []\n}","symbol":"plugins (all)","correct":"{\n  \"plugins\": [\"jsdoc\", \"wpcalypso\", \"inclusive-language\"]\n}"}],"quickstart":{"code":"// .eslintrc.json\n{\n  \"extends\": \"wpcalypso\"\n}","lang":"json","description":"This shows the minimal ESLint configuration using the wpcalypso preset. Install peer dependencies with yarn add --dev eslint-config-wpcalypso eslint eslint-plugin-jsdoc eslint-plugin-wpcalypso eslint-plugin-inclusive-language."},"warnings":[{"fix":"Install eslint-plugin-wpcalypso@4.0.0 if using eslint-config-wpcalypso@6.1.0.","message":"Peer dependency eslint-plugin-wpcalypso requires version ^3.4.1 || ^4.0.0, which may not be compatible with newer versions.","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Downgrade ESLint to version 7.x, or use an older eslint-config-wpcalypso version that supports ESLint 8.","message":"Requires eslint@^7.0.0, which is outdated. Using eslint@8+ will fail.","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Install eslint-plugin-jsdoc@18.x specifically.","message":"Peer dependency eslint-plugin-jsdoc requires version ^18.0.0, which is outdated. Newer versions of eslint-plugin-jsdoc are not compatible.","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Manually install eslint-plugin-react if using the react config.","message":"The react superset 'wpcalypso/react' requires eslint-plugin-react as a peer dependency, but it is not listed as a required peer in package.json.","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Decide on one: either 'wpcalypso' for non-React projects, or 'wpcalypso/react' for React projects.","message":"Using both 'wpcalypso' and 'wpcalypso/react' extends may cause rule conflicts; only extend the react variant if you need React rules.","severity":"gotcha","affected_versions":">=6.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run: yarn add --dev eslint-plugin-jsdoc@^18.0.0","cause":"Missing peer dependency eslint-plugin-jsdoc","error":"Failed to load plugin 'jsdoc' declared in 'eslint-config-wpcalypso': Cannot find module 'eslint-plugin-jsdoc'"},{"fix":"Run: yarn add --dev eslint-config-wpcalypso","cause":"eslint-config-wpcalypso is not installed or not in node_modules","error":"ESLint couldn't find the config \"wpcalypso\" to extend from."},{"fix":"Install eslint-plugin-jsdoc@18.0.0 exactly: yarn add --dev eslint-plugin-jsdoc@18.0.0","cause":"Version mismatch: eslint-plugin-jsdoc >18 causes rule schema changes","error":"Configuration for rule 'jsdoc/check-alignment' is invalid"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}