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.
npm install eslint-config-wpcalypsoVerified import paths — ran on the pinned version, not inferred.
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.
Install eslint-plugin-wpcalypso@4.0.0 if using eslint-config-wpcalypso@6.1.0.
Downgrade ESLint to version 7.x, or use an older eslint-config-wpcalypso version that supports ESLint 8.
Install eslint-plugin-jsdoc@18.x specifically.
Manually install eslint-plugin-react if using the react config.
Decide on one: either 'wpcalypso' for non-React projects, or 'wpcalypso/react' for React projects.
Run: yarn add --dev eslint-plugin-jsdoc@^18.0.0
Run: yarn add --dev eslint-config-wpcalypso
Install eslint-plugin-jsdoc@18.0.0 exactly: yarn add --dev eslint-plugin-jsdoc@18.0.0