Skip to content

Commit

Permalink
chore: add prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-He95 committed Dec 9, 2022
1 parent 7f35050 commit 26e5ee2
Show file tree
Hide file tree
Showing 9 changed files with 2,852 additions and 2,224 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
12 changes: 12 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
packages/*/CHANGELOG.md
playground-temp/
dist/
temp/
LICENSE.md
pnpm-lock.yaml
pnpm-workspace.yaml
playground/tsconfig-json-load-error/has-error/tsconfig.json
playground/html/invalid.html
playground/html/valid.html
playground/worker/classic-worker.js
.history
22 changes: 22 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"semi": false,
"tabWidth": 2,
"singleQuote": true,
"printWidth": 80,
"trailingComma": "all",
"overrides": [
{
"files": ["*.json5"],
"options": {
"singleQuote": false,
"quoteProps": "preserve"
}
},
{
"files": ["*.yml"],
"options": {
"singleQuote": false
}
}
]
}
5 changes: 5 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[build.environment]
NODE_VERSION = "16"
[build]
publish = "playground/dist"
command = "pnpm run play:build"
21 changes: 19 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@
"dist"
],
"scripts": {
"preinstall": "npx only-allow pnpm",
"postinstall": "simple-git-hooks",
"build": "unbuild",
"dev": "unbuild --stub",
"format": "prettier --write --cache .",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"prepublishOnly": "nr build",
Expand All @@ -57,8 +60,7 @@
},
"dependencies": {
"fast-glob": "^3.2.12",
"ora": "^6.1.2",
"simon-js-tool": "^4.1.27"
"ora": "^6.1.2"
},
"devDependencies": {
"@antfu/eslint-config": "^0.25.2",
Expand All @@ -68,10 +70,25 @@
"bumpp": "^8.2.1",
"eslint": "^8.28.0",
"esno": "^0.16.3",
"lint-staged": "^13.1.0",
"picocolors": "^1.0.0",
"pnpm": "^7.17.0",
"prettier": "^2.8.1",
"rimraf": "^3.0.2",
"simple-git-hooks": "^2.8.1",
"tsx": "^3.12.1",
"typescript": "^4.9.3",
"unbuild": "^0.7.6",
"vitest": "^0.25.2"
},
"simple-git-hooks": {
"pre-commit": "pnpm exec lint-staged --concurrent false",
"commit-msg": "pnpm exec tsx scripts/verifyCommit.ts $1"
},
"lint-staged": {
"*": [
"prettier --write --cache --ignore-unknown"
],
"*.{vue,js,ts,jsx,tsx,md,json}": "eslint --fix"
}
}
Loading

0 comments on commit 26e5ee2

Please sign in to comment.