Skip to content

Commit c0ae8eb

Browse files
committed
build: use prettier
1 parent 76ced2d commit c0ae8eb

File tree

6 files changed

+1317
-12
lines changed

6 files changed

+1317
-12
lines changed

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ scripts
77
node_modules
88
.babelrc
99
.eslintrc
10+
.prettierrc
1011
.travis.yml
1112
.eslintcache
1213
.idea

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true,
4+
"trailingComma": "es5",
5+
"parser": "babylon"
6+
}

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
"lint": "eslint src test --cache",
1111
"lint:fix": "eslint --fix src test --cache",
1212
"lint:watch": "esw --watch src test --cache",
13+
"prettier": "prettier --write src/**/*.js test/**/*.js",
14+
"prettier:check": "prettier --list-different src/**/*.js test/**/*.js",
1315
"flow": "flow",
1416
"flow:coverage": "for file in src/**.js test/**.js; do echo $file; flow coverage $file; done",
1517
"flow:watch": "flow-watch -e js,js.flow,flowconfig --ignore es/ --ignore node_modules/ --watch .flowconfig --watch src/ --watch test/",
@@ -19,7 +21,7 @@
1921
"test:watch": "NODE_ENV=production BABEL_ENV=test mocha --watch $npm_package_config_mocha",
2022
"codecov": "nyc report --reporter=text-lcov > coverage.lcov; codecov",
2123
"commitmsg": "commitlint -e $GIT_PARAMS",
22-
"precommit": "npm run lint && flow",
24+
"precommit": "npm run lint && npm run prettier:check && flow",
2325
"prepush": "npm test",
2426
"prepublishOnly": "npm run clean && npm run lint && flow && npm test && npm run build",
2527
"open:coverage": "open coverage/lcov-report/index.html",
@@ -88,6 +90,8 @@
8890
"istanbul": "^0.4.5",
8991
"mocha": "^4.1.0",
9092
"nyc": "^11.4.1",
93+
"prettier": "^1.15.1",
94+
"prettier-eslint": "^8.8.2",
9195
"rimraf": "^2.6.0",
9296
"semantic-release": "^15.1.4",
9397
"travis-deploy-once": "^4.3.1"

test/clearConsole.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33
if (process.argv.indexOf('--watch') >= 0) {
44
before(() => process.stdout.write('\u001b[2J\u001b[1;1H\u001b[3J'))
55
}
6-

test/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,5 @@
33
import '../src/index'
44

55
describe('test setup', () => {
6-
it('works', () => {
7-
8-
})
6+
it('works', () => {})
97
})

0 commit comments

Comments
 (0)