Skip to content

Commit a45145b

Browse files
committed
add prettier
1 parent 6f5bbd8 commit a45145b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@
4545
"build:babel": "NODE_ENV=production babel ./src --ignore \"src/**/*.story.js\" --out-dir=./dist && rm dist/index.js && cp dist/lib.js dist/index.js",
4646
"build-storybook": "build-storybook",
4747
"build:gh-pages": "react-scripts build && mkdir build/demo && cp build/index.html build/demo/index.html",
48-
"gh-pages": "npm run build:gh-pages && gh-pages -d build"
48+
"gh-pages": "npm run build:gh-pages && gh-pages -d build",
49+
"prettier": "prettier --write \"src/**/*.js\"",
50+
"prettier:test": "prettier --check \"src/**/*.js\""
4951
},
5052
"eslintConfig": {
5153
"extends": "react-app"
@@ -66,6 +68,7 @@
6668
"babel-loader": "^8.0.5",
6769
"babel-preset-react-app": "^7.0.0",
6870
"gh-pages": "^2.0.1",
71+
"prettier": "^2.0.4",
6972
"raw.macro": "^0.3.0",
7073
"react-github-btn": "^1.1.1",
7174
"react-scripts": "^2.1.8"

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12771,6 +12771,11 @@ preserve@^0.2.0:
1277112771
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
1277212772
integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=
1277312773

12774+
prettier@2.0.2:
12775+
version "2.0.2"
12776+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.2.tgz#1ba8f3eb92231e769b7fcd7cb73ae1b6b74ade08"
12777+
integrity sha512-5xJQIPT8BraI7ZnaDwSbu5zLrB6vvi8hVV58yHQ+QK64qrY40dULy0HSRlQ2/2IdzeBpjhDkqdcFBnFeDEMVdg==
12778+
1277412779
prettier@^1.16.4:
1277512780
version "1.19.1"
1277612781
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"

0 commit comments

Comments
 (0)