hudochenkov / stylelint-order

A plugin pack of order related linting rules for Stylelint.
MIT License
916 stars 61 forks source link

No error message #69

Closed SuperEngineer64 closed 6 years ago

SuperEngineer64 commented 6 years ago

Thanks for your work!

My code is marked red, if the order I configured is wrong. But there is no error message, so I can not know, where the error is coming from while working in the project.

How can I add a message? This isnt working: https://stylelint.io/user-guide/configuration/#custom-messages

Thanks! :)

hudochenkov commented 6 years ago

There is always an error message. What is your configuration? How do you use it? Screenshot?

SuperEngineer64 commented 6 years ago

Hey!

Iam using Sublime with stylelint and stylelint-order. In my project root I have the .stylelintrs.json file. And in it:


{  
  "extends": "stylelint-config-recommended",
  "extends": "stylelint-config-standard",

  "plugins": [
    "stylelint-order"
  ],

  "rules": {
    "order/order": [
      "custom-properties",
      "declarations"

    ],

    "order/properties-order": [
      "color",
      "display",
      "padding",
      "margin"
    ]
  }
}
hudochenkov commented 6 years ago

Check SublimeLinter settings. I use it as well and I see an error message when hover over errored area.

image

image

SuperEngineer64 commented 6 years ago

Hm.. I only get "Definitions" and "References" on hover. And my SublimeLinter settings are on default.

hudochenkov commented 6 years ago

Do you see error messages when there are other violations? For example, you should have see an error message with the following CSS:

.a {}
.a {}

BTW, there is an problem with your stylelint config:

  "extends": "stylelint-config-recommended",
  "extends": "stylelint-config-standard",

Should be:

  "extends": [
    "stylelint-config-recommended",
    "stylelint-config-standard",
  ],
SuperEngineer64 commented 6 years ago

Solution:

Removing all settings after "extend", save, restart, open and past the settings again. Now its working....

And as I discovered, all stylelint messages were away. No there back again. Thats the kind of bug nobody wants. :p

Thanks!

Edit: Ah ok, I already wonder if the extend stuff was correct. :)