New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix syntax inference with processors #5117
Comments
@yaymukund Thanks for the clear report and for using the template. I've dug into this and it looks like an oversight on my behalf in #4729. It's only autofix that is incompatible with processors, not custom syntaxes outright. We already have a check for that: stylelint/lib/getPostcssResult.js Lines 86 to 97 in a9db12a
I've labelled the issue as a bug and ready to implement. |
hello @jeddy3 ...i just notice this issue too while willing to upgrade to v15 ... is there some work around ? or plan? thanks a lot :) |
@eMerzh You should use a custom syntax rather than processor. See the migration guide. Thanks for drawing my attention to this issue. I'll close it as it's no longer relevant since we removed processors in |
If your config contains a processor, stylelint no longer uses
postcss-syntax
to infer the syntax and defaults to the css parser. The change appeared in version 13.4.0. It's not clear to me if it was an oversight or an intended change in behavior, but here's the relevant line:https://github.com/stylelint/stylelint/pull/4729/files#diff-5383a0a864da5a5ad24b4bae8f44c5574601bd4d145999b1ddc211d3900dd68bL89
I know that there's discussion of deprecating the
processor
option, but in the meantime I think this could be better documented. I'm happy to submit a docs PR if that sounds good.Not related to a specific rule.
// In an scss file, add double slash comments.
13.4.1
$ stylelint "**/*.scss" --config myconfig.json
Yes, it's related to scss syntax in my case, but in theory would apply to any syntax that a CSS parser would reject.
Expected no warnings.
Thank you for taking a look :)
The text was updated successfully, but these errors were encountered: