bmatcuk / stylelint-lsp

A stylelint Language Server
MIT License
46 stars 4 forks source link

Bug: new rule not supported (`lightness-notation`) #45

Closed chrisgrieser closed 8 months ago

chrisgrieser commented 8 months ago

Recently, I started getting this error in the first line of every file:

Unknown rule lightness-notation. stylelintplus: lightness-notation

Looking into it, the rule does exist, but appears to be rather new.

Manually running stylint 16.1.0, reports no issue. I am on stylelint-lsp 2.0.0.


While some delay for new rules in stylint to appear in the stylelint-lsp is no big deal, the fact that a new rule results in errors in the stylelint-lsp is indeed somewhat annoying, and something that you should be able to at least deactivate? Looking at the docs, there seems to be no way to disable the unknown-rule-error, at least as far as I can tell. Maybe the stylelint-lsp could add a small stopgap here or something?

bmatcuk commented 8 months ago

Hmm, I would guess that the issue is that stylelint-lsp is using the built-in stylelint dependency, which is on v15, instead of your project's dependency, which must be on 16.1.0. Are you using something other than npm as your package manager?

chrisgrieser commented 8 months ago

Yeah, I am using npm.

though I just figured out that the error comes from stylelint-config-standard adding lightness-notation, and that explicitly disabling the rule in my config via lightness-notation: null is a simple solution for this already