Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eslint-plugin-wpcalypso

Automattic16kGPL-2.0-or-later8.0.0

Custom ESLint rules for the WordPress.com Calypso project.

eslint, eslintplugin, eslint-plugin

readme

Calypso

Renovate enabled

Calypso is the new WordPress.com front-end – a beautiful redesign of the WordPress dashboard using a single-page web application, powered by the WordPress.com REST API. Calypso is built for reading, writing, and managing all of your WordPress sites in one place.

beautiful screenshot

It’s built with JavaScript – a very light node plus express server, React.js, Redux, wpcom.js, and many other wonderful libraries on the front-end.

You can read more about Calypso at developer.wordpress.com/calypso.

Getting Started

You can try out the user-side of Calypso on WordPress.com (a lot of the logged-in area is Calypso; if in doubt, view source), you can poke around the code here on GitHub, or you can install it and run it locally. The latter is the most fun.

  1. Make sure you have git, node, and yarn installed.
  2. Clone this repository locally.
  3. Add 127.0.0.1 calypso.localhost to your local hosts file.
  4. Execute yarn and then yarn start from the root directory of the repository.
  5. Open calypso.localhost:3000 in your browser.

Need more detailed installation instructions? We have them.

Contributing

If Calypso sparks your interest, don’t hesitate to send a pull request, send a suggestion, file a bug, or just ask a question. We promise we’ll be nice. Just don’t forget to check out our CONTRIBUTING doc – it includes a few technical details that will make the process a lot smoother.

Calypso welcomes – and indeed has been built by – contributors from all walks of life, with different backgrounds, and with a wide range of experience. We're committed to doing our part to make both Calypso and the wider WordPress community welcoming to everyone.

You can contribute in many ways. You can help reporting, testing, and detailing bugs, and also test new features we release in our "beta" program for testing on Horizon.

To clarify these expectations, Calypso has adopted the code of conduct defined by the Contributor Covenant. It can be read in full here.

Security

Need to report a security vulnerability? Go to https://automattic.com/security/ or directly to our security bug bounty site https://hackerone.com/automattic.

Our security policy can be read in full here.

Browser Support

We support the latest two versions of all major browsers. (see Browse Happy for current latest versions).

Troubleshooting

If you have any problems running Calypso, please see the most common issues.

License

Calypso is licensed under GNU General Public License v2 (or later).

changelog

Unreleased

v8.0.0 (2023-09-14)

  • Breaking: Updated peer dependency eslint-plugin-jsdoc to 46.5.1, which may result in more rule violations which were not previously detected.
  • Breaking: Minimum node version is now 14.21.3 (formerly 14.0.0).
  • Breaking: Minimum eslint version is now 8.48.0 (formerly >=8.6.0).
  • Enhancement: Added rule wpcalypso/i18n-translate-identifier.
  • Enhancement: Added rule wpcalypso/i18n-unlocalized-url.
  • Fix: Fixed spread operator error.

v7.0.0 (2022-01-24)

  • Breaking: For JSDoc types like {object}, prefer capitalized variants to match the WordPress coding style. (Like {Object}.) Violations are autofixable. You can override this by setting settings.jsdoc.preferredTypes.object to 'object' in your eslint config.
  • Breaking: Updated peer dependency eslint-plugin-jsdoc to v39.6.7, which includes fixes to some JSDoc rules like jsdoc/require-returns-check. This may result in more rule violations which were not previously detected.
  • Breaking: Require at least NodeJS 14, since dependencies dropped support for older versions.
  • Enhancement: The jsdoc/check-types rule now sets unifyParentAndChildTypeChecks to true to enforce preferredTypes on unions as well (e.g. {string | Object}).

v6.1.0 (2022-08-24)

  • Add missing optional peer dependency on eslint-plugin-react.
  • Mark the peer dependency on eslint-plugin-react-hooks as optional to match that on eslint-plugin-react.
  • Update jsx-classname-namespace rule to check only for BEM convention.

v6.0.0 (2022-05-13)

  • Breaking: Migrated from babel-eslint to @babel/eslint-parser. This requires @babel/core to be installed (added as a peerDependency to this package) and a valid Babel configuration file to exist.
  • Breaking: Deleted import-docblock rule. Consumers can migrate to @wordpress/dependency-group, which is a more complete implementation of the same code style.

v5.1.0 (2020-12-14)

  • Absorb package eslint-config-wpcalypso

v5.0.0 (2020-07-23)

  • Breaking: Removed rule import-no-redux-combine-reducers
  • Enhancement: jsx-classname-namespace understands Storybook index.stories.js files and treats them as root files
  • Enhancement: import-docblock now supports WordPress dependencies.

v4.1.0 (2019-05-07)

  • Enhancement: jsx-classname-namespace doesn't limit classnames without suffix to root elements
  • Enhancement: jsx-classname-namespace accepts both file and directory name when validating class name
  • Enhancement: i18n-ellipsis rule updated to catch usage in @wordpress/i18n functions

v4.0.2 (2018-08-10)

  • General: Updated Mocha from 3.0.2 to 5.2.x
  • General: Refreshed package-lock.json

v4.0.1 (2017-10-13)

  • Fix: i18n-ellipsis: Running the fixer for this rule no longer incorrectly removes quotes

v4.0.0 (2017-09-07)

v3.4.1 (2017-08-03)

  • Fix: i18n-named-placeholders: Resolve error thrown if translate has no arguments

v3.4.0 (2017-05-26)

v3.3.0 (2017-05-25)

v3.2.0 (2017-04-11)

  • Updated: jsx-classname-namespace: New "rootFiles" option to specify files in which components are to be considered as root (defaults to "index.js", "index.jsx") (#34, thanks @bperson)
  • Updated: jsx-classname-namespace: Improved error messaging for root components in non-root files

v3.1.1 (2017-04-08)

  • Fix: added a documentation link to the i18n-no-this-translate error message

v3.1.0 (2017-01-26)

v3.0.2 (2016-10-24)

  • Fix: import-docblock less strict with matched docblocks (case insensitive, trailing spaces)

v3.0.1 (2016-10-21)

  • Fix: Resolve issue where i18n-no-collapsible-whitespace may result in an error when text cannot be determined

v3.0.0 (2016-10-21)

  • Breaking: Removed no-lodash-import rule in favor of using babel-plugin-lodash to transform root Lodash imports
  • Breaking: Removed i18n-no-newlines rule in favor of using i18n-no-collapsible-whitespace, which warns for a superset of whitespace issues
  • New rule: import-docblock
  • New rule: i18n-no-this-translate
  • Fix: jsx-classname-namespace will not allow underscores except as separator after namespace

v2.0.0 (2016-08-24)

  • Breaking: Required Node version increased from >=0.10.x to >=4.x (see ESLint 3.0.0 migration guide)
  • Fix: jsx-classname-namespace can accurately validate elements assigned to variables within render (#21)
  • Fix: yarn test is now run synchronously so it exits with a non-zero code on failure
  • Fix: Replace ES2015 variable (let) declarations to accommodate older Node versions
  • Fix: Remove unintended debugging statement from i18n-no-newlines rule
  • Fix: jsx-classname-namespace will now correctly identify index components in Windows environments (#18)
  • General: Add files to package.json to omit files relevant only for development
  • General: Use shared configuration for linting (yo dawg, i herd you like ESLint rules...) (#22)
  • General: Updated ESLint from 2.x to 3.x

v1.4.1 (2016-08-12)

  • Add: String template support for all rules

v1.4.0 (2016-07-29)

  • Add: i18n-no-newlines: Warn on newlines in translatable text

v1.3.3 (2016-06-28)

  • Fix: jsx-classname-namespace: Only consider components in index.js(x) as being eligible for root export
  • Fix: jsx-classname-namespace: Ensure child component isn't exactly equal to namespace prefix

v1.3.2 (2016-06-23)

  • Fix: jsx-classname-namespace: Skip validation on render call expressions (ReactDOM.render)
  • General: Upgrade ESLint (^1.10.3 to ^2.13.1) and babel-eslint (^5.0.0-beta6 to ^6.1.0)
  • General: Add yarn run lint npm script, included in yarn test

v1.3.1 (2016-06-17)

  • Fix: jsx-classname-namespace: JSX child expressions should not be considered root elements

v1.3.0 (2016-06-16)

v1.2.0 (2016-06-09)

v1.1.4 (2016-06-09)

  • Fix: i18n-no-variables should allow ES2015 template literal strings as long as there are no interpolated variables

v1.1.3 (2016-03-08)

  • Fix: i18n-named-placeholders: Account for escaped percentage
  • Fix: Extract callee from MemberExpression (e.g. this.translate, i18n.translate)

v1.1.2 (2016-03-08)

  • Fix: i18n-no-variables: Account for options passed as first argument

v1.1.1 (2016-03-08)

  • Fix: Include missing credits for regular expression adaptation

v1.1.0 (2016-03-08)