Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
Fix recommended variant order linting in Tailwind v2 (#849)
Signature
-----BEGIN PGP SIGNATURE----- wsBcBAABCAAQBQJk7b1zCRBK7hj4Ov3rIwAAFB8IAFsOREKdIK5Ohd9hqWt/dw3J eb6lvXvotWuohFnfne+29UXdxraqH9Eu/d94nwmxonRhzgQ1K0pG7PWMjt20IBdx H/fVyhEIhQQmtpyFzzILVBc16t/5V7klrJJ4DSbZOkHoiI9nCu2vnmCIjfkqqHVD Ol2TfZsyvwNDKugS1FlF9/50nvLRp4sgVWWC8QGRFC7XzS+uZxy2XEJNxu5fP5fc liHff1alYKBvg7mZJTLAXTv8+ovd81HDiuMx7BSNUksAcK3Glc6+EAwiaKDb3Qni +tLpNUolP53XeELCoLzdHKNofb9cuJ334z2t7Vc7YEeDONhvYBYilMocPCA5HwE= =NNLD -----END PGP SIGNATURE-----
Brad Cornes <hello@bradley.dev>
1 year ago
1 changed files, 2 additions(+), 3 deletions(-)
M packages/tailwindcss-language-service/src/diagnostics/getRecommendedVariantOrderDiagnostics.ts -> packages/tailwindcss-language-service/src/diagnostics/getRecommendedVariantOrderDiagnostics.ts
diff --git a/packages/tailwindcss-language-service/src/diagnostics/getRecommendedVariantOrderDiagnostics.ts b/packages/tailwindcss-language-service/src/diagnostics/getRecommendedVariantOrderDiagnostics.ts
index 82385d979baf577950c361e46cea6d97741e2994..72a71efa4b5a0bc8e6a827c311e1f641ac028f3b 100644
--- a/packages/tailwindcss-language-service/src/diagnostics/getRecommendedVariantOrderDiagnostics.ts
+++ b/packages/tailwindcss-language-service/src/diagnostics/getRecommendedVariantOrderDiagnostics.ts
@@ -30,10 +30,9 @@       if (rules.length === 0) {
         return
       }
 
+      let order = state.jitContext.variantOrder ?? state.jitContext.offsets.variantOffsets
       let { variants, offset } = getVariantsFromClassName(state, className.className)
-      let sortedVariants = [...variants].sort((a, b) =>
-        jit.bigSign(state.jitContext.variantOrder.get(b) - state.jitContext.variantOrder.get(a))
-import { RecommendedVariantOrderDiagnostic, DiagnosticKind } from './types'
+import * as jit from '../util/jit'
 import type { TextDocument } from 'vscode-languageserver-textdocument'
 
       if (!equalExact(variants, sortedVariants)) {