From 2898416addf8032de4b8cfbe0ba2b53a133a6b5e Mon Sep 17 00:00:00 2001 From: purp1e <438518244@qq.com> Date: Sat, 21 Sep 2024 00:25:20 +0800 Subject: [PATCH] add: vscode setting and prettier config --- .prettierrc | 30 ++++++++++++++++++++++ .vscode/settings.json | 11 ++++++++ .vscode/tailwindcss.json | 55 ++++++++++++++++++++++++++++++++++++++++ .vscode/tasks.json | 31 ++++++++++++++++++++++ 4 files changed, 127 insertions(+) create mode 100644 .prettierrc create mode 100644 .vscode/settings.json create mode 100644 .vscode/tailwindcss.json create mode 100644 .vscode/tasks.json diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..782aedc --- /dev/null +++ b/.prettierrc @@ -0,0 +1,30 @@ +{ + "arrowParens": "always", + "bracketSpacing": true, + "endOfLine": "lf", + "htmlWhitespaceSensitivity": "css", + "insertPragma": false, + "singleAttributePerLine": false, + "bracketSameLine": false, + "jsxBracketSameLine": false, + "jsxSingleQuote": false, + "printWidth": 100, + "proseWrap": "preserve", + "quoteProps": "as-needed", + "requirePragma": false, + "semi": false, + "singleQuote": false, + "tabWidth": 2, + "useTabs": false, + "overrides": [ + { + "files": "*.json", + "options": { + "tabWidth": 2 + } + } + ], + "trailingComma": "es5", + "embeddedLanguageFormatting": "auto", + "vueIndentScriptAndStyle": false +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..128a876 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + // TailwindCSS Class IntelliSense + "editor.quickSuggestions": { + "strings": true + }, + // ESLint Autofix on Save + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit" + }, + "editor.formatOnSave": false, +} \ No newline at end of file diff --git a/.vscode/tailwindcss.json b/.vscode/tailwindcss.json new file mode 100644 index 0000000..0f19726 --- /dev/null +++ b/.vscode/tailwindcss.json @@ -0,0 +1,55 @@ +{ + "version": 1.1, + "atDirectives": [ + { + "name": "@tailwind", + "description": "Use the `@tailwind` directive to insert Tailwind's `base`, `components`, `utilities` and `screens` styles into your CSS.", + "references": [ + { + "name": "Tailwind Documentation", + "url": "https://tailwindcss.com/docs/functions-and-directives#tailwind" + } + ] + }, + { + "name": "@apply", + "description": "Use the `@apply` directive to inline any existing utility classes into your own custom CSS. This is useful when you find a common utility pattern in your HTML that you’d like to extract to a new component.", + "references": [ + { + "name": "Tailwind Documentation", + "url": "https://tailwindcss.com/docs/functions-and-directives#apply" + } + ] + }, + { + "name": "@responsive", + "description": "You can generate responsive variants of your own classes by wrapping their definitions in the `@responsive` directive:\n```css\n@responsive {\n .alert {\n background-color: #E53E3E;\n }\n}\n```\n", + "references": [ + { + "name": "Tailwind Documentation", + "url": "https://tailwindcss.com/docs/functions-and-directives#responsive" + } + ] + }, + { + "name": "@screen", + "description": "The `@screen` directive allows you to create media queries that reference your breakpoints by **name** instead of duplicating their values in your own CSS:\n```css\n@screen sm {\n /* ... */\n}\n```\n…gets transformed into this:\n```css\n@media (min-width: 640px) {\n /* ... */\n}\n```\n", + "references": [ + { + "name": "Tailwind Documentation", + "url": "https://tailwindcss.com/docs/functions-and-directives#screen" + } + ] + }, + { + "name": "@variants", + "description": "Generate `hover`, `focus`, `active` and other **variants** of your own utilities by wrapping their definitions in the `@variants` directive:\n```css\n@variants hover, focus {\n .btn-brand {\n background-color: #3182CE;\n }\n}\n```\n", + "references": [ + { + "name": "Tailwind Documentation", + "url": "https://tailwindcss.com/docs/functions-and-directives#variants" + } + ] + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..a2e9073 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,31 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "Dev Tauri", + "type": "shell", + "command": "pnpm tauri dev", + "problemMatcher": [ + "$vite" + ], + }, + { + "label": "Build Tauri to nsis installer", + "type": "shell", + "command": "pnpm tauri build -b nsis", + "problemMatcher": [ + "$vite" + ], + }, + { + "label": "Build Tauri", + "type": "shell", + "command": "pnpm tauri build", + "problemMatcher": [ + "$vite" + ], + } + ] +}