configure prettier

This commit is contained in:
Jacky Zhao 2023-07-22 17:26:03 -07:00
parent 8dd73704e6
commit 2034b970b6
3 changed files with 22 additions and 1 deletions

3
.prettierignore Normal file
View File

@ -0,0 +1,3 @@
public
node_modules
.quartz-cache

16
package-lock.json generated
View File

@ -74,6 +74,7 @@
"@types/ws": "^8.5.5", "@types/ws": "^8.5.5",
"@types/yargs": "^17.0.24", "@types/yargs": "^17.0.24",
"esbuild": "^0.18.11", "esbuild": "^0.18.11",
"prettier": "^3.0.0",
"tsx": "^3.12.7", "tsx": "^3.12.7",
"typescript": "^5.0.4" "typescript": "^5.0.4"
} }
@ -4458,6 +4459,21 @@
"preact": ">=10" "preact": ">=10"
} }
}, },
"node_modules/prettier": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.0.tgz",
"integrity": "sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==",
"dev": true,
"bin": {
"prettier": "bin/prettier.cjs"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/pretty-bytes": { "node_modules/pretty-bytes": {
"version": "6.1.0", "version": "6.1.0",
"resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-6.1.0.tgz", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-6.1.0.tgz",

View File

@ -12,7 +12,8 @@
"url": "https://github.com/jackyzha0/quartz.git" "url": "https://github.com/jackyzha0/quartz.git"
}, },
"scripts": { "scripts": {
"typecheck": "tsc --noEmit", "check": "tsc --noEmit && npx prettier . --check",
"format": "npx prettier . --write",
"test": "tsx ./quartz/path.test.ts" "test": "tsx ./quartz/path.test.ts"
}, },
"keywords": [ "keywords": [
@ -89,6 +90,7 @@
"@types/ws": "^8.5.5", "@types/ws": "^8.5.5",
"@types/yargs": "^17.0.24", "@types/yargs": "^17.0.24",
"esbuild": "^0.18.11", "esbuild": "^0.18.11",
"prettier": "^3.0.0",
"tsx": "^3.12.7", "tsx": "^3.12.7",
"typescript": "^5.0.4" "typescript": "^5.0.4"
} }