Skip to content

Commit

Permalink
add prettier for JS/YAML/JSON formatting
Browse files Browse the repository at this point in the history
use `.editorconfig` for settings
  • Loading branch information
TheAfroOfDoom committed Dec 29, 2023
1 parent 1b831e0 commit 3ec2457
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2
quote_type = single
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"recommendations": [
"minecraftcommands.syntax-mcfunction",
"spgoding.datapack-language-server"
"spgoding.datapack-language-server",
"esbenp.prettier-vscode"
]
}
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,

"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
}
},

"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs"
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"cpy-cli": "5.0.0",
"nps": "5.10.0",
"nps-utils": "1.7.0",
"prettier": "3.1.1",
"rimraf": "5.0.1",
"watch": "1.0.2"
}
Expand Down
10 changes: 10 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1623,6 +1623,7 @@ __metadata:
cpy-cli: 5.0.0
nps: 5.10.0
nps-utils: 1.7.0
prettier: 3.1.1
rimraf: 5.0.1
watch: 1.0.2
languageName: unknown
Expand Down Expand Up @@ -1948,6 +1949,15 @@ __metadata:
languageName: node
linkType: hard

"prettier@npm:3.1.1":
version: 3.1.1
resolution: "prettier@npm:3.1.1"
bin:
prettier: bin/prettier.cjs
checksum: e386855e3a1af86a748e16953f168be555ce66d6233f4ba54eb6449b88eb0c6b2ca79441b11eae6d28a7f9a5c96440ce50864b9d5f6356d331d39d6bb66c648e
languageName: node
linkType: hard

"process-nextick-args@npm:~2.0.0":
version: 2.0.1
resolution: "process-nextick-args@npm:2.0.1"
Expand Down

0 comments on commit 3ec2457

Please sign in to comment.