Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[code-infra] Polish VS Code DX #4562

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -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
Copy link
Member

@Janpot Janpot Jan 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this already defined by prettier config? i.e. you need to set up your editor to format/highlight with a prettier extension instead. feels a bit redundant to define this twice

indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
insert_final_newline = true
max_line_length = 100
19 changes: 18 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -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
]
}
22 changes: 10 additions & 12 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
{
"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,
Copy link
Member Author

@oliviertassinari oliviertassinari Dec 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How mui/material-ui#44865 started, I was annoyed by this setting. It felt too opinionated to be shared with everyone.

"files.associations": {
"**/docs/public/_redirects": "plaintext"
},
"typescript.tsdk": "node_modules/typescript/lib",
"cSpell.words": ["Toolpad"]
"files.trimTrailingWhitespace": true,

// Root workspace only
"typescript.surveys.enabled": false,
"grammarly.selectors": [
{
"language": "markdown",
"scheme": "file"
}
]
}
2 changes: 0 additions & 2 deletions examples/core/auth-vite/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
Expand Down
Loading