Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-wpcalypso

Package Overview
Dependencies
Maintainers
50
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-wpcalypso

Custom ESLint rules for the WordPress.com Calypso project.

  • 8.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
50
Created
Source

Eslint plugin wpcalypso

An ESLint configuration following WordPress.com's "Calypso" JavaScript Coding Guidelines. This package also includes custom ESLint rules for the WordPress.com Calypso project

Installation

Install ESLint and eslint-plugin-wpcalypso

$ yarn add --dev eslint eslint-plugin-wpcalypso

If you're planning to use the React superset of rules, you should also install eslint-plugin-react and eslint-plugin-react-hooks:

yarn add --dev eslint-plugin-react eslint-plugin-react-hooks

Usage

Simply extend the configuration from your project's .eslintrc configuration file:

{
	"extends": [ "plugin:wpcalypso/recommended" ]
}

Or, if your project uses React and you want to opt in to additional React-specific rules, extend the React superset:

{
	"extends": [ "plugin:wpcalypso/react" ]
}

Any of the above options will:

Custom rules

If you are not interesetd in the recommended set of rules but only on some of the custom rules, you can enable them individually.

First, add wpcalypso to the plugins section of your .eslintrc configuration file:

{
	"plugins": [ "wpcalypso" ]
}

Then configure the rules you want to use under the rules section.

{
	"rules": {
		"wpcalypso/rule-name": "error"
	}
}

Supported Rules

Suggesting Changes

Want to suggest a change to our style guide? Edit the JavaScript Coding Guidelines on the Automattic/wp-calypso repository and submit a pull request.

Want to revise the ESLint rules used here? Edit the recommended.js file and submit a pull request.

License

GNU General Public License v2.0 or later.

Keywords

FAQs

Package last updated on 14 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc