https://github.com/cedaro/esformatter-wordpress
Format JavaScript according to the WordPress Coding Standards.
https://github.com/cedaro/esformatter-wordpress
esformatter esformatter-wordpress
Last synced: 10 months ago
JSON representation
Format JavaScript according to the WordPress Coding Standards.
- Host: GitHub
- URL: https://github.com/cedaro/esformatter-wordpress
- Owner: cedaro
- License: mit
- Created: 2015-07-06T18:25:38.000Z (about 11 years ago)
- Default Branch: develop
- Last Pushed: 2016-12-27T16:35:26.000Z (over 9 years ago)
- Last Synced: 2025-10-06T20:57:19.321Z (10 months ago)
- Topics: esformatter, esformatter-wordpress
- Language: JavaScript
- Size: 14.6 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# esformatter-wordpress
> An [*esformatter*](https://github.com/millermedeiros/esformatter) plugin to format JavaScript according to the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/coding-standards/javascript/).
## Installation
```sh
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:
```js
var esformatter = require('esformatter');
var wordpressPreset = require('esformatter-wordpress');
esformatter.register(wordpressPreset);
```
### CLI
When using the [*esformatter* CLI](https://github.com/millermedeiros/esformatter#cli), register it as a plugin:
```sh
esformatter --plugins=esformatter-wordpress
```
### 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](https://github.com/millermedeiros/esformatter/blob/master/doc/config.md) for more information.
#### .esformatter
```json
{
"plugins": [
"esformatter-wordpress"
]
}
```
#### package.json
```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](https://github.com/cedaro/esformatter-wordpress/issues/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.