diff --git a/.gitignore b/.gitignore index 9f089b5..f3c60d1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # auto generate -src/data/recipe.json +data/recipe.json .DS_Store .vite-ssg-dist @@ -7,6 +7,7 @@ src/data/recipe.json *.local esbuild-kit +tsx-* # nuxt node_modules diff --git a/.vscode/settings.json b/.vscode/settings.json index 76c40fe..65a5a15 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,11 +1,69 @@ { "cSpell.words": ["Vitesse", "Vite", "unocss", "vitest", "vueuse", "pinia", "demi", "antfu", "iconify", "intlify", "vitejs", "unplugin", "pnpm"], - "prettier.enable": false, - "editor.codeActionsOnSave": { - "source.fixAll.eslint": true, - }, "files.associations": { - "*.css": "postcss", + "*.css": "postcss" }, + + // Enable the ESlint flat config support + "eslint.experimental.useFlatConfig": true, + // Disable the default formatter, use eslint instead + "prettier.enable": false, "editor.formatOnSave": false, + // Auto fix + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit", + "source.organizeImports": "never" + }, + // Silent the stylistic rules in you IDE, but still auto fix them + "eslint.rules.customizations": [ + { + "rule": "style/*", + "severity": "off" + }, + { + "rule": "*-indent", + "severity": "off" + }, + { + "rule": "*-spacing", + "severity": "off" + }, + { + "rule": "*-spaces", + "severity": "off" + }, + { + "rule": "*-order", + "severity": "off" + }, + { + "rule": "*-dangle", + "severity": "off" + }, + { + "rule": "*-newline", + "severity": "off" + }, + { + "rule": "*quotes", + "severity": "off" + }, + { + "rule": "*semi", + "severity": "off" + } + ], + // Enable eslint for all supported languages + "eslint.validate": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "vue", + "html", + "markdown", + "json", + "jsonc", + "yaml" + ] } diff --git a/components/ChooseFood.vue b/components/ChooseFood.vue index 18d248d..c849faf 100644 --- a/components/ChooseFood.vue +++ b/components/ChooseFood.vue @@ -1,6 +1,6 @@