Skip to content

Commit 05d5f95

Browse files
committed
chore: update prettier
1 parent 1ab180d commit 05d5f95

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

.prettierignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules
2+
package.json
3+
package-lock.json
4+
pnpm-lock.yaml
5+
changelog.md
6+
coverage
7+
build
8+
dist
9+
lib

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
"ide-vue"
1111
],
1212
"license": "MIT",
13+
"scripts": {
14+
"format": "prettier --write ."
15+
},
1316
"engines": {
1417
"atom": ">=1.0.0 <2.0.0"
1518
},
@@ -18,7 +21,7 @@
1821
"vls": "^0.2.0"
1922
},
2023
"devDependencies": {
21-
"prettier": "^1.19.1"
24+
"prettier": "^2.1.2"
2225
},
2326
"activationHooks": [
2427
"text.html.vue:root-scope-used"

prettier.config.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Add to .prettierignore to ignore files and folders
2+
3+
// This configuration all the formats including typescript, javascript, json, yaml, markdown
4+
module.exports = {
5+
tabWidth: 2,
6+
printWidth: 120,
7+
semi: false,
8+
singleQuote: false,
9+
overrides: [
10+
{
11+
files: "{*.json}",
12+
options: {
13+
parser: "json",
14+
trailingComma: "es5",
15+
},
16+
},
17+
{
18+
files: "{*.md}",
19+
options: {
20+
parser: "markdown",
21+
proseWrap: "preserve",
22+
},
23+
},
24+
],
25+
}

0 commit comments

Comments
 (0)