mohammadsiyou / prettier-plugin-twin.macro

Sort Tailwind and Twin classes based on recommended class order of Tailwind using Prettier.
11 stars 1 forks source link

Compatibility issue with `@tailwindcss/container-queries` #8

Open rdgr opened 1 year ago

rdgr commented 1 year ago

After adding the @tailwindcss/container-queries package, now I'm having the following issue:

TypeError: Cannot create property 'ruleId' on string 'TypeError: matchVariant is not a function
    at containerQueries (/Users/rdgr/app/node_modules/@tailwindcss/container-queries/dist/index.js:34:5)
    at nhe (/Users/rdgr/app/node_modules/prettier-plugin-twin.macro/dist/index.js:105:9518)
    at CA (/Users/rdgr/app/node_modules/prettier-plugin-twin.macro/dist/index.js:105:12450)
    at whe (/Users/rdgr/app/node_modules/prettier-plugin-twin.macro/dist/index.js:114:4073)
    at Object.parse (/Users/rdgr/app/node_modules/prettier-plugin-twin.macro/dist/index.js:114:5488)
    at Object.parse (/Users/rdgr/app/node_modules/prettier/index.js:7334:23)
    at coreFormat (/Users/rdgr/app/node_modules/prettier/index.js:8645:18)
    at formatWithCursor2 (/Users/rdgr/app/node_modules/prettier/index.js:8837:18)
    at /Users/rdgr/app/node_modules/prettier/index.js:37229:12

Any ideas?

AlexanderArvidsson commented 1 year ago

Any update on this? I am also receiving this error:

["ERROR" - 1:31:59 PM] matchVariant is not a function
TypeError: matchVariant is not a function
    at containerQueries (/home/void/dev/ha-dashboard/node_modules/@tailwindcss/container-queries/dist/index.js:34:5)
    at A_e (/home/void/dev/ha-dashboard/node_modules/prettier-plugin-twin.macro/dist/index.js:105:9531)
    at tD (/home/void/dev/ha-dashboard/node_modules/prettier-plugin-twin.macro/dist/index.js:105:12478)
    at K_e (/home/void/dev/ha-dashboard/node_modules/prettier-plugin-twin.macro/dist/index.js:131:3732)
    at Object.parse (/home/void/dev/ha-dashboard/node_modules/prettier-plugin-twin.macro/dist/index.js:131:5150)
    at Object.parse (/home/void/dev/ha-dashboard/node_modules/prettier/index.js:7515:23)
    at coreFormat (/home/void/dev/ha-dashboard/node_modules/prettier/index.js:8829:18)
    at formatWithCursor2 (/home/void/dev/ha-dashboard/node_modules/prettier/index.js:9021:18)
    at /home/void/dev/ha-dashboard/node_modules/prettier/index.js:38183:12
    at Object.format (/home/void/dev/ha-dashboard/node_modules/prettier/index.js:38197:12)
    at t.PrettierMainThreadInstance.format (/home/void/.vscode/extensions/esbenp.prettier-vscode-9.16.0/dist/extension.js:1:17561)
    at t.default.format (/home/void/.vscode/extensions/esbenp.prettier-vscode-9.16.0/dist/extension.js:1:15652)
    at t.PrettierEditProvider.provideEdits (/home/void/.vscode/extensions/esbenp.prettier-vscode-9.16.0/dist/extension.js:1:12274)
    at U.provideDocumentFormattingEdits (/opt/visual-studio-code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:101:45790)
mohammadsiyou commented 1 year ago

@rdgr @AlexanderArvidsson Sorry for inconvenience, will be tackled very soon