|
| 1 | +{ |
| 2 | + // Disable the default formatter, use eslint instead |
| 3 | + "prettier.enable": false, |
| 4 | + "editor.formatOnSave": false, |
| 5 | + // Auto fix |
| 6 | + "editor.codeActionsOnSave": { |
| 7 | + "source.fixAll.eslint": "explicit", |
| 8 | + "source.organizeImports": "never" |
| 9 | + }, |
| 10 | + // Reuse diagnostics collected while editing instead of linting the whole file again on save. |
| 11 | + "eslint.codeActionsOnSave.mode": "problems", |
| 12 | + // This is a single-package workspace; keep config and dependency resolution at its root. |
| 13 | + "eslint.workingDirectories": [ |
| 14 | + { |
| 15 | + "mode": "location" |
| 16 | + } |
| 17 | + ], |
| 18 | + // https://github.com/tailwindlabs/tailwindcss/discussions/5258 |
| 19 | + "css.customData": [ |
| 20 | + ".vscode/tailwind.json" |
| 21 | + ], |
| 22 | + "tailwindCSS.experimental.classRegex": [ |
| 23 | + // https://github.com/lukeed/clsx?tab=readme-ov-file#tailwind-support |
| 24 | + [ |
| 25 | + "clsx\\(([^)]*)\\)", |
| 26 | + "(?:'|\"|`)([^']*)(?:'|\"|`)" |
| 27 | + ], |
| 28 | + // https://cva.style/docs/getting-started/installation |
| 29 | + [ |
| 30 | + "cva\\(([^)]*)\\)", |
| 31 | + "[\"'`]([^\"'`]*).*?[\"'`]" |
| 32 | + ], |
| 33 | + [ |
| 34 | + "cx\\(([^)]*)\\)", |
| 35 | + "(?:'|\"|`)([^']*)(?:'|\"|`)" |
| 36 | + ] |
| 37 | + ], |
| 38 | + // Mini Program rpx arbitrary text sizes, for example text-[24rpx], |
| 39 | + // can be misreported as conflicting with text color utilities. |
| 40 | + "tailwindCSS.lint.cssConflict": "ignore", |
| 41 | + // Silent the stylistic rules in you IDE, but still auto fix them |
| 42 | + "eslint.rules.customizations": [ |
| 43 | + { |
| 44 | + "rule": "style/*", |
| 45 | + "severity": "off" |
| 46 | + }, |
| 47 | + { |
| 48 | + "rule": "format/*", |
| 49 | + "severity": "off" |
| 50 | + }, |
| 51 | + { |
| 52 | + "rule": "*-indent", |
| 53 | + "severity": "off" |
| 54 | + }, |
| 55 | + { |
| 56 | + "rule": "*-spacing", |
| 57 | + "severity": "off" |
| 58 | + }, |
| 59 | + { |
| 60 | + "rule": "*-spaces", |
| 61 | + "severity": "off" |
| 62 | + }, |
| 63 | + { |
| 64 | + "rule": "*-order", |
| 65 | + "severity": "off" |
| 66 | + }, |
| 67 | + { |
| 68 | + "rule": "*-dangle", |
| 69 | + "severity": "off" |
| 70 | + }, |
| 71 | + { |
| 72 | + "rule": "*-newline", |
| 73 | + "severity": "off" |
| 74 | + }, |
| 75 | + { |
| 76 | + "rule": "*quotes", |
| 77 | + "severity": "off" |
| 78 | + }, |
| 79 | + { |
| 80 | + "rule": "*semi", |
| 81 | + "severity": "off" |
| 82 | + } |
| 83 | + ], |
| 84 | + // Validate source languages only. Stylelint owns CSS/SCSS in the editor. |
| 85 | + "eslint.validate": [ |
| 86 | + "javascript", |
| 87 | + "javascriptreact", |
| 88 | + "typescript", |
| 89 | + "typescriptreact", |
| 90 | + "vue" |
| 91 | + ], |
| 92 | + "css.validate": false, |
| 93 | + "less.validate": false, |
| 94 | + "scss.validate": false, |
| 95 | + "stylelint.validate": [ |
| 96 | + "vue", |
| 97 | + "css", |
| 98 | + "scss" |
| 99 | + ] |
| 100 | +} |
0 commit comments