Skip to content

Commit 28b7616

Browse files
fix(frontend): configure vscode to import all files from root (~) (#386)
1 parent b5b01f2 commit 28b7616

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

frontend/.vscode/settings.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,21 @@
1313
// Tailwind Regex List
1414
// see: https://github.com/paolotiu/tailwind-intellisense-regex-list?tab=readme-ov-file#classnames
1515
"tailwindCSS.experimental.classRegex": [
16-
// clsx and cn
1716
["clsx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"],
1817
["cn\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"],
19-
// JavaScript string variable with keywords
2018
[
19+
// JavaScript string that likely contains tailwind classes.
20+
// This regex looks for lines of JavaScript code that:
21+
//
22+
// 1. Optionally start with `const`, `let`, or `var`.
23+
// 2. Have a variable name, that:
24+
// 3. End with `styles`, `classes`, or `classnames`.
25+
// 4. Have an equals sign (=) or +=.
26+
// 5. Have a string in single or double quotes.
2127
"(?:\\b(?:const|let|var)\\s+)?[\\w$_]*(?:[Ss]tyles|[Cc]lasses|[Cc]lassnames)[\\w\\d]*\\s*(?:=|\\+=)\\s*['\"]([^'\"]*)['\"]"
2228
]
2329
],
30+
// always import files from the root (~) of the project
31+
"typescript.preferences.importModuleSpecifier": "non-relative",
2432
"vitest.disableWorkspaceWarning": true
2533
}

0 commit comments

Comments
 (0)