Skip to content

Instantly share code, notes, and snippets.

@Mrtly
Last active February 6, 2025 20:08
Show Gist options
  • Save Mrtly/2114c44f5e1e3039072d6b0fd5f49b9c to your computer and use it in GitHub Desktop.
Save Mrtly/2114c44f5e1e3039072d6b0fd5f49b9c to your computer and use it in GitHub Desktop.
vscode settings

settings.json for singleton or monorepo projects (these can get messy & unreadable so adding comments helps remember what each one does :))

recommended extensions.json for projects with React, TypeScript, Prettier, Eslint, Tailwind, Git etc.

{
"recommendations": [
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"bradlc.vscode-tailwindcss",
"ms-playwright.playwright",
"yoavbls.pretty-ts-errors",
"eamodio.gitlens"
]
}
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"[mdx]": {
"editor.formatOnSave": false //do not format mdx
},
"editor.tabSize": 2,
"editor.detectIndentation": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"emmet.includeLanguages": {
"javascript": "javascriptreact"
},
"prettier.requireConfig": true,
"editor.quickSuggestions": {
"strings": true
},
"editor.inlineSuggest.enabled": true,
"eslint.workingDirectories": [{ "pattern": "./packages/*/" }, { "pattern": "./apps/*/" }],
//exclude sources/files/patterns from automatic import suggestions
"typescript.preferences.autoImportFileExcludePatterns": [
"**/dist/",
"**/build/",
"@radix-ui/*",
"react-aria-components"
],
//fixes warning squiggly on @tailwind, @apply, @import etc in .css files
"files.associations": {
"*.css": "tailwindcss"
},
//enable TW suggestions in text consts named somethingStyles or styles
"tailwindCSS.classAttributes": ["className", ".*Styles", ".*styles"],
//enable TW suggestions in cva and cn
"tailwindCSS.emmetCompletions": true,
"tailwindCSS.experimental.classRegex": [
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
["cn\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
]
}
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.detectIndentation": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"emmet.includeLanguages": {
"javascript": "javascriptreact"
},
"prettier.requireConfig": true,
"editor.quickSuggestions": {
"strings": true
},
"editor.inlineSuggest.enabled": true,
//exclude sources/files/patterns from automatic import suggestions
"typescript.preferences.autoImportFileExcludePatterns": [".next"],
//fixes warning squiggly on @tailwind, @apply, @import etc in .css files
"files.associations": {
"*.css": "tailwindcss"
},
//enable TW suggestions in text consts named somethingStyles or styles
"tailwindCSS.classAttributes": ["className", ".*Styles", ".*styles"],
//enable TW suggestions in cva and cn
"tailwindCSS.emmetCompletions": true,
"tailwindCSS.experimental.classRegex": [
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
["cn\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment