Skip to content

Commit

Permalink
Janitorial: add Prettier to help prettify JS code in Jetpack. (#10784)
Browse files Browse the repository at this point in the history
#### Changes proposed in this Pull Request:

This PR adds support for Prettier to help prettify JS code in Jetpack.

The original configuration is copied from Calypso.

Down the road, I think we should, like in Calypso, add Prettier to our pre-commit hook to clean things up a bit.

#### Testing instructions:

* Configure Prettier in your editor.
* Run `yarn` 
* See that your editor can auto-fix your code 

#### Proposed changelog entry for your changes:
* none
  • Loading branch information
jeherve authored Dec 5, 2018
1 parent d259c27 commit e61bf64
Show file tree
Hide file tree
Showing 3 changed files with 626 additions and 81 deletions.
12 changes: 12 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
useTabs: true
tabWidth: 2
printWidth: 100
singleQuote: true
trailingComma: es5
bracketSpacing: true
parenSpacing: true
jsxBracketSameLine: false
insertPragma: true
requirePragma: false
semi: true
arrowParens: avoid
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
"mockery": "1.7.0",
"nock": "7.7.3",
"node-wp-i18n": "1.2.1",
"prettier": "github:Automattic/wp-prettier",
"react-test-renderer": "15.6.2",
"sinon": "1.17.7",
"sinon-chai": "2.14.0"
Expand Down
Loading

0 comments on commit e61bf64

Please sign in to comment.