Skip to content

Commit 0034349

Browse files
wangyiz4262iamkun
authored andcommitted
chore: Add prettier (#467)
1 parent a7e05e0 commit 0034349

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

package.json

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"test": "TZ=Pacific/Auckland npm run test-tz && TZ=Europe/London npm run test-tz && npm run test-tz && jest",
1010
"test-tz": "jest test/timezone.test --coverage=false",
1111
"lint": "./node_modules/.bin/eslint src/* test/* build/*",
12+
"prettier": "prettier --write \"{src,test,build,docs}/**/*.{js,ts,md}\"",
1213
"babel": "cross-env BABEL_ENV=build babel src --out-dir esm --copy-files",
1314
"build": "cross-env BABEL_ENV=build node build && npm run size",
1415
"sauce": "npx karma start karma.sauce.conf.js",
@@ -86,6 +87,7 @@
8687
"mockdate": "^2.0.2",
8788
"moment": "^2.22.0",
8889
"pre-commit": "^1.2.2",
90+
"prettier": "^1.16.1",
8991
"rollup": "^0.57.1",
9092
"rollup-plugin-babel": "^4.0.0-beta.4",
9193
"rollup-plugin-uglify": "^3.0.0",

prettier.config.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
useTabs: false,
3+
printWidth: 80,
4+
tabWidth: 2,
5+
singleQuote: true,
6+
trailingComma: 'none',
7+
semi: false,
8+
arrowParens: 'avoid'
9+
}

0 commit comments

Comments
 (0)