Skip to content

sirbrillig/eslint-config-wordpress

This branch is 2 commits ahead of, 2 commits behind WordPress-Coding-Standards/eslint-config-wordpress:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

feb3acc · Jan 15, 2019

History

87 Commits
Mar 17, 2018
Mar 25, 2018
Jan 18, 2018
Jul 19, 2017
Jan 17, 2018
Mar 25, 2018
Mar 15, 2018
May 17, 2018
Mar 14, 2018
Sep 1, 2015
Jan 15, 2019
Jul 19, 2017
Dec 19, 2018

Repository files navigation

eslint-config-wordpress

WordPress JavaScript Coding Standards shareable config for ESLint.

Build Status bitHound Overall Score NPM version

Requirements

npm

If you do not have npm installed on your computer, follow the instructions here.

Next you will need to have npm set up for your JavaScript project. If you do not see a package.json file in your project's directory, run npm init within that directory and follow the prompts to create one. You do not need to answer all the questions if you do not plan to be publishing your project to npm, so accepting the defaults is usually fine. You can also edit the configuration later by editing your package.json file.

eslint

After that you will need to have eslint installed for your project. If it is not installed already, run the following command:

$ npm install --save-dev eslint

Installation

If the requirements are satisfied, you can install this plugin as follows:

$ npm install --save-dev eslint-config-wordpress

Configuration

To use this plugin, you must have an eslint configuration file for your project. There are several different formats for this config file. In your config file you will need to find or create a section called "extends" and add "wordpress" to that section.

For example, if you are using the JSON file .eslintrc.json, it should look something like this:

{
  "extends": "wordpress"
}

There may be other sections in your config file as well. Read more about configuring eslint here.

About

ESLint shareable config for WordPress

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%