build: add prettier

This commit is contained in:
AidenLx 2021-06-03 22:41:50 +08:00
parent 5471ea6542
commit ea767a12e4
2 changed files with 22 additions and 0 deletions

20
.prettierrc Normal file
View file

@ -0,0 +1,20 @@
{
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"overrides": [
{
"files": ".prettierrc",
"options": {
"parser": "json"
}
},
{
"files": "*.yml",
"options": {
"tabWidth": 2,
"singleQuote": false
}
}
]
}

View file

@ -4,6 +4,7 @@
"description": "You can see the number of notes under each folder within the file explorer",
"main": "main.js",
"scripts": {
"prettier": "prettier --write 'src/**/*.+(ts|tsx|json|html|css)'",
"dev": "rollup --config rollup.config.js -w",
"build": "rollup --config rollup.config.js --environment BUILD:production"
},
@ -16,6 +17,7 @@
"@rollup/plugin-typescript": "^8.2.1",
"@types/node": "^14.14.37",
"obsidian": "^0.12.0",
"prettier": "^2.3.0",
"rollup": "^2.32.1",
"rollup-plugin-import-css": "^2.0.1",
"tslib": "^2.2.0",