Skip to content

cedaro/esformatter-wordpress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

esformatter-wordpress

An esformatter plugin to format JavaScript according to the WordPress Coding Standards.

Installation

npm install esformatter-wordpress

Usage

There are various ways to register esformatter-wordpress depending on how you're using esformatter.

API

When working with esformatter programmatically:

var esformatter = require('esformatter');
var wordpressPreset = require('esformatter-wordpress');

esformatter.register(wordpressPreset);

CLI

When using the esformatter CLI, register it as a plugin:

esformatter --plugins=esformatter-wordpress <input.js>

Configuration Files

It's also possible to register esformatter-wordpress in a project, either in an .esformatter configuration file in the project root, your home directory, or in a section in package.json. Read the configuration documentation for more information.

.esformatter

{
  "plugins": [
    "esformatter-wordpress"
  ]
}

package.json

{
  "esformatter": {
    "plugins": [
      "esformatter-wordpress"
    ]
  }
}

Changelog

0.2.1

  • Updated the quotes plugin implementation to fix an error caused by a change in the esformatter-quotes plugin. See #4

0.2.0

  • Reworked the package to make it an esformatter plugin.
  • Removed the wpjs CLI utility in favor of using the esformatter CLI directly.

About

Format JavaScript according to the WordPress Coding Standards.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published