From c0018b66f3a182d1dca6ead379b5c530c4ede3e5 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Mon, 22 Jan 2024 01:57:55 +0800 Subject: [PATCH] build(editor): add VS Code config Make it easy to initialize the development environment. --- .gitignore | 1 - .vscode/extensions.json | 12 ++++++++++++ .vscode/settings.json | 24 ++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .vscode/extensions.json create mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index 0124b68..cee9e12 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,6 @@ package-lock.json # IDE configurations .idea -.vscode # Misc assets/js/dist diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..6927cd1 --- /dev/null +++ b/.vscode/extensions.json @@ -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" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..4fcded4 --- /dev/null +++ b/.vscode/settings.json @@ -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"] +}