build(editor): add VS Code config

Make it easy to initialize the development environment.
This commit is contained in:
Cotes Chung 2024-01-22 01:57:55 +08:00
parent 02e296ed75
commit c0018b66f3
No known key found for this signature in database
GPG Key ID: 0D9E54843167A808
3 changed files with 36 additions and 1 deletions

1
.gitignore vendored
View File

@ -16,7 +16,6 @@ package-lock.json
# IDE configurations # IDE configurations
.idea .idea
.vscode
# Misc # Misc
assets/js/dist assets/js/dist

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

@ -0,0 +1,12 @@
{
"recommendations": [
// Liquid tags auto-complete
"killalau.vscode-liquid-snippets",
// Liquid syntax highlighting and formatting
"Shopify.theme-check-vscode",
// Common formatter
"esbenp.prettier-vscode",
"foxundermoon.shell-format",
"stylelint.vscode-stylelint"
]
}

24
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,24 @@
{
// Prettier
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"prettier.trailingComma": "none",
// Shopify Liquid
"files.associations": {
"*.html": "liquid"
},
// Formatter
"[html][liquid]": {
"editor.defaultFormatter": "Shopify.theme-check-vscode"
},
"[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
},
// Disable vscode built-in stylelint
"css.validate": false,
"scss.validate": false,
"less.validate": false,
// Stylint extension settings
"stylelint.snippet": ["css", "less", "postcss", "scss"],
"stylelint.validate": ["css", "less", "postcss", "scss"]
}