chore: configure prettier

This commit is contained in:
NateScarlet
2019-04-25 20:51:11 +08:00
parent 18e0ff2395
commit 5c5caec9b8
4 changed files with 55 additions and 39 deletions

3
.gitignore vendored
View File

@@ -3,4 +3,5 @@ node_modules/*
npm-debug.log
# Editor
/.vscode
/.vscode/*
!/.vscode/extensions.json

5
.prettierrc Normal file
View File

@@ -0,0 +1,5 @@
{
"singleQuote": false,
"semi": true,
"tabWidth": 4
}

9
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,9 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": ["esbenp.prettier-vscode"],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}

View File

@@ -11,7 +11,8 @@
"prebuild": "rimraf build",
"build": "grunt build",
"start": "nodemon utils/server.js",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"prettier": "npx prettier --write src/**/*.* css/**/*.*"
},
"repository": {
"type": "git",