0

Hi sorry if this is a dumb question, I'm not so familiar with webpack and packages.

So I updated my Stylelint from 7.2.0 to 8.0.0 , but ever since I get this error when trying to run my project

enter image description here

edit: I reverted my project to before the update but now I keep seeing this in atom, since I updated stylelint there too - https://i.stack.imgur.com/R9QOB.jpg

HoyHym Ho
  • 79
  • 1
  • 10

2 Answers2

1

You face the problem, that stylelint is not backwards-compatible. Sometimes rules are renamed, moved to plugins or completely removed. If your stylelint-config (or the config you extend) contains one of those abandoned rules, you will receive the mentioned error.

Another problem is, that the atom stylelint integration only supportes the latest stylelint version and does NOT use the projects stylelint version. This issue has (unfortunately) been open on github for ages. Therefore I wouldn't expect it to be solved anytime soon: https://github.com/AtomLinter/linter-stylelint/issues/51

Solution: Update your stylelint-config (or the extended config - e.g. "stylelint-config-standard") and remove the mentioned rule "rule-empty-line-before".

Btw, you might take into consideration using an editor, that supports using the projects styleint version, e.g. vscode with the corresponding stylelint plugin. This way you're no longer forced to upgrade stylelint all the time.

MattDiMu
  • 4,873
  • 1
  • 19
  • 29
  • 1
    Oh ok thanks for explaining, good to know it's not all me being bad. For now I reverted everything to older versions that do work now. If I do update my stylelints again, I'll use your solution. – HoyHym Ho Jul 25 '17 at 19:42
0

Rather than just removing the "undefined" rule that is giving you the error, check out the changelog for Stylelint, it will tell you if the deprecated rule has been replaced with something else, so you can use that instead.

VTRGnW2uxM
  • 96
  • 2
  • 6