Skip to content

Commit

Permalink
chore: Add prettier.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Sep 14, 2021
1 parent 04f458f commit 2dea0f0
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

node_modules/.bin/pretty-quick --staged
10 changes: 10 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
**/*.md
**/*.svg
**/*.ejs
**/*.html

package.json
dist
build
lib
esm
11 changes: 11 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"singleQuote": true,
"trailingComma": "all",
"printWidth": 80,
"overrides": [
{
"files": ".prettierrc",
"options": { "parser": "json" }
}
]
}
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
"create-antdp": "lib/cli.js"
},
"scripts": {
"build": "tsbb build --no-esm",
"watch": "tsbb watch --no-esm"
"prepare": "husky install",
"build": "tsbb build --disable-babel",
"watch": "tsbb watch --disable-babel",
"prettier": "prettier --write '**/*.{js,jsx,tsx,ts,md,json}'"
},
"files": [
"lib",
Expand All @@ -39,6 +41,9 @@
"frontend"
],
"devDependencies": {
"pretty-quick": "3.1.1",
"prettier": "2.4.0",
"husky": "7.0.2",
"tsbb": "3.2.1"
},
"dependencies": {
Expand Down

0 comments on commit 2dea0f0

Please sign in to comment.