install prettier and add config files

This commit is contained in:
d-yokoi 2019-03-23 19:59:31 +09:00
parent 717868a6a5
commit 54169e36d6
No known key found for this signature in database
GPG Key ID: 49EAF81BC6A0D19A
4 changed files with 14 additions and 0 deletions

0
.prettierignore Normal file
View File

4
.prettierrc.json Normal file
View File

@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}

6
package-lock.json generated
View File

@ -2754,6 +2754,12 @@
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
"dev": true
},
"prettier": {
"version": "1.16.4",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.16.4.tgz",
"integrity": "sha512-ZzWuos7TI5CKUeQAtFd6Zhm2s6EpAD/ZLApIhsF9pRvRtM1RFo61dM/4MSRUA0SuLugA/zgrZD8m0BaY46Og7g==",
"dev": true
},
"process-nextick-args": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",

View File

@ -5,6 +5,9 @@
"main": "index.js",
"scripts": {
"coverage": "nyc --branches 100 --functions 100 --check-coverage npm run unit",
"format": "npm run prettier -- --write",
"format:ci": "npm run prettier -- --check",
"prettier": "prettier 'ts_src/**/*.ts' --ignore-path ./.prettierignore",
"standard": "standard",
"test": "npm run standard && npm run unit",
"unit": "tape test/*.js",
@ -33,6 +36,7 @@
"devDependencies": {
"node-fetch": "^1.6.3",
"nyc": "^13.1.0",
"prettier": "^1.16.4",
"proxyquire": "^1.7.10",
"standard": "^10.0.2",
"tape": "^4.6.2",