stylelint-validator icon indicating copy to clipboard operation
stylelint-validator copied to clipboard

Compound interpolated expressions throw "Invalid prelude for @media csstree/validator"

Open pinkhominid opened this issue 2 years ago • 1 comments

With version 2.1.0, using the postcss-lit custom syntax, compound interpolated expressions like this error

    @media (min-width: 500px) and ${namedMedia.css.mobile} {
        /* ... */
    }

whereas this doesn't

    @media ${namedMedia.css.mobile} {
        /* ... */
    }

pinkhominid avatar Feb 17 '23 00:02 pinkhominid

I believe that isStandardSyntaxAtRule is now gone from Stylelint@16:

Error: Cannot find module '/.../node_modules/stylelint/lib/utils/isStandardSyntaxAtRule.js'
    at createEsmNotFoundErr (node:internal/modules/cjs/loader:1181:15)
    at finalizeEsmResolution (node:internal/modules/cjs/loader:1169:15)
    at resolveExports (node:internal/modules/cjs/loader:591:14)
    at Module._findPath (node:internal/modules/cjs/loader:668:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1130:27)
    at Module._load (node:internal/modules/cjs/loader:985:27)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (.../node_modules/stylelint-csstree-validator/cjs/index.cjs:4:32)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
$ npm list stylelint-csstree-validator stylelint
├─┬ [email protected] overridden
│ └── [email protected] deduped
└── [email protected]

Mentioning this here because in the previous ticket this method was mentioned as the source of my issue. If this should be a new ticket let me know and I will create one.

rgant avatar Dec 13 '23 00:12 rgant