vscode-stylelint: "Undefined rule unicode-bom" prevents linting

This one prevents any linting in VSCode. The same happened with original extension from @shinnn . The problem must be with the extension because stylelint detects unicode-bom rule as expected:

To reproduce:
- NPM local packages:
"stylelint": "^12.0.0",
"stylelint-config-twbs-bootstrap": "^1.0.0",
.stylelintrc.json:
{
"extends": "stylelint-config-twbs-bootstrap/scss"
}
or simple rule without bootstrap config:
{
"rules": {
"unicode-bom": "never"
}
}
vscode-stylelintv.0.51.0
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 19
- Comments: 17 (5 by maintainers)
Hey @SharakPL 👋 thanks for reporting this, with plenty of info.
Yes, the problem is with the extension. Currently the extension includes its own version of stylelint, which is v10.1.0 as of now. This rule has only been introduced in stylelint v11.0.0.
This is one of the big shortcomings of the current implementation, and ideally I think it would make more sense to auto-magically load the locally-installed version of stylelint that each project has.
This is quite a big undertaking though, so in the meantime it might be easier to just update the
stylelintthat ships with the extension to a more recent version.I’m currently working on bringing most of the extension’s dependencies directly in this repository, once that’s over I’ll have a go at upgrading to stylelint v11 or v12 and this should hopefully be solved (even if in a way that’s not ideal).
Thanks, I’ll be taking a look at this on the weekend, work has been a busy this week
I find this VSCode extentsion stylelint-stzhang use the locally-installed stylelint and it works fine. The feature commit is here
Note: the extension has renamed. If you installed the old version (like 0.51) it won’t be updated automatically. You have to uninstall the old one and search
stylelintin vscode marketplace.You also need to upgrade your stylelint package to 12.0.0+. If your project has multiple node_modules folders, make sure every stylelint package is updated.
v0.70.0 is released and resolves this issue
v0.70.0 (2019-12-28)
https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint
I’d suggest to change it to WITHOUT QUALITY OF ANY KIND
i’m having the same issue with
stylelint.vscode-stylelint 0.80.0though I havestylelint version ^13.0.0installed locally and no other versions showing withnpm ls stylelintthis issue is a perfect example about why the javascript tooling ecosystem is completely broken. why was this extension renamed? who needs two extensions with the same name? clearly the bug isn’t fixed in the
0.80.0version.what a frustrating mess