File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 13
13
// Tailwind Regex List
14
14
// see: https://github.com/paolotiu/tailwind-intellisense-regex-list?tab=readme-ov-file#classnames
15
15
"tailwindCSS.experimental.classRegex" : [
16
- // clsx and cn
17
16
[" clsx\\ (([^)]*)\\ )" , " (?:'|\" |`)([^']*)(?:'|\" |`)" ],
18
17
[" cn\\ (([^)]*)\\ )" , " (?:'|\" |`)([^']*)(?:'|\" |`)" ],
19
- // JavaScript string variable with keywords
20
18
[
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.
21
27
" (?:\\ b(?:const|let|var)\\ s+)?[\\ w$_]*(?:[Ss]tyles|[Cc]lasses|[Cc]lassnames)[\\ w\\ d]*\\ s*(?:=|\\ +=)\\ s*['\" ]([^'\" ]*)['\" ]"
22
28
]
23
29
],
30
+ // always import files from the root (~) of the project
31
+ "typescript.preferences.importModuleSpecifier" : " non-relative" ,
24
32
"vitest.disableWorkspaceWarning" : true
25
33
}
You can’t perform that action at this time.
0 commit comments