From ccde8caf06bebfc7284674c228c3cbfa7e7cbf30 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Fri, 27 Dec 2024 13:44:30 +0100 Subject: [PATCH 1/3] [code-infra] Polish VS Code DX --- .editorconfig | 14 ++++++++++++++ .vscode/extensions.json | 19 ++++++++++++++++++- .vscode/settings.json | 21 ++++++++++----------- examples/core/auth-vite/.gitignore | 2 -- 4 files changed, 42 insertions(+), 14 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000000..94027c57cac --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +# EditorConfig is awesome: https://editorconfig.org/ + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +trim_trailing_whitespace = true +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +insert_final_newline = true +max_line_length = 100 diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 1d7ac851ea8..5ed5faf9be7 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,3 +1,20 @@ { - "recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"] + "recommendations": [ + // Formating + "esbenp.prettier-vscode", // Prettier + "editorconfig.editorconfig", // EditorConfig + + // Highlighting + "bradlc.vscode-tailwindcss", // Tailwind CSS + "unifiedjs.vscode-mdx", // MDX + "shardulm94.trailing-spaces", // Trailing spaces + "styled-components.vscode-styled-components", // styled() + + // Lint + "dbaeumer.vscode-eslint", // ESLint + "yoavbls.pretty-ts-errors", // TypeScript + "stylelint.vscode-stylelint", // Stylelint + "davidanson.vscode-markdownlint", // markdownlint + "chrischinchilla.vale-vscode", // Vale + ], } diff --git a/.vscode/settings.json b/.vscode/settings.json index f7bb824b314..e18e7f26d13 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,15 +1,14 @@ { - "typescript.preferences.importModuleSpecifier": "relative", - "editor.autoSurround": "never", "editor.defaultFormatter": "esbenp.prettier-vscode", - "eslint.format.enable": true, - "editor.codeActionsOnSave": { - "source.fixAll.eslint": "explicit" - }, - "editor.formatOnSave": true, - "files.associations": { - "**/docs/public/_redirects": "plaintext" - }, + "files.trimTrailingWhitespace": true, + + // Root workspace only "typescript.tsdk": "node_modules/typescript/lib", - "cSpell.words": ["Toolpad"] + "typescript.surveys.enabled": false, + "grammarly.selectors": [ + { + "language": "markdown", + "scheme": "file" + } + ] } diff --git a/examples/core/auth-vite/.gitignore b/examples/core/auth-vite/.gitignore index a547bf36d8d..8b7e50214df 100644 --- a/examples/core/auth-vite/.gitignore +++ b/examples/core/auth-vite/.gitignore @@ -13,8 +13,6 @@ dist-ssr *.local # Editor directories and files -.vscode/* -!.vscode/extensions.json .idea .DS_Store *.suo From 72d796b803398825ee1caa075f35e63929703111 Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Fri, 27 Dec 2024 14:33:39 +0100 Subject: [PATCH 2/3] prettier --- .vscode/extensions.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 5ed5faf9be7..aa647b30ad5 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -15,6 +15,6 @@ "yoavbls.pretty-ts-errors", // TypeScript "stylelint.vscode-stylelint", // Stylelint "davidanson.vscode-markdownlint", // markdownlint - "chrischinchilla.vale-vscode", // Vale - ], + "chrischinchilla.vale-vscode" // Vale + ] } From d39c088545286ac0013616655bbb789dbaa865ec Mon Sep 17 00:00:00 2001 From: Olivier Tassinari Date: Fri, 3 Jan 2025 22:40:47 +0100 Subject: [PATCH 3/3] Update .vscode/settings.json Signed-off-by: Olivier Tassinari --- .vscode/settings.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index e18e7f26d13..9656d60e0f4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,7 +3,6 @@ "files.trimTrailingWhitespace": true, // Root workspace only - "typescript.tsdk": "node_modules/typescript/lib", "typescript.surveys.enabled": false, "grammarly.selectors": [ {