AtomLinter / linter-stylelint

A plugin for Atom Linter providing an interface to stylelint.
https://atom.io/packages/linter-stylelint
115 stars 37 forks source link

Plugin not working with stylelint-config-sass-guidelines #583

Open abogacki opened 3 years ago

abogacki commented 3 years ago

After adding .stylelintrc configuration (listed below) that extends stylelint-config-sass-guidlines (available here) linter throws error on top of each scss file

{
  "extends": [
    "stylelint-config-sass-guidelines",
    "stylelint-config-prettier"
  ],
  "plugins": [
    "stylelint-scss",
    "stylelint-prettier"
  ],
  "rules": {
    "prettier/prettier": true,
    "max-nesting-depth": null,
    "scss/at-import-partial-extension-blacklist": null,
    "order/order": [
      [
        "custom-properties",
        "dollar-variables",
        {
          "type": "at-rule",
          "name": "extend"
        },
        {
          "type": "at-rule",
          "name": "include"
        },
        "declarations",
        "rules",
        {
          "type": "at-rule",
          "name": "media"
        }
      ]
    ]
  }
}

image

The issue is related to declaration-property-value-disallowed-list which is defined by stylelint-config-sass-guidelines like:

"declaration-property-value-disallowed-list": {
      "border": ["none"],
      "border-top": ["none"],
      "border-right": ["none"],
      "border-bottom": ["none"],
      "border-left": ["none"]
    },

The above seems to ok with official docs. Configuration works perfectly fine with VS Code. Is there a solution to this?

matteobertoldo commented 3 years ago

@abogacki I have this isse too..

Always reproduced on macOS Catalina, macOS Big Sur with latest version of Atom.

alexrudd2 commented 3 years ago

Occurs for me too, M1 Mac Big Sur 11.5.2 and linter-stylelint 4.5.1

It appears to me the problem is the old version of stylelint itself. https://github.com/AtomLinter/linter-stylelint/blob/a81cfcd43a374b0df86e955234259598568f6454/package.json#L64

If I delete or upgrade the local install in ~/.atom/packages/linter-stylelint/node_modules/stylelint the problem goes away as the global stylelint (I have 13.13.1) is used instead. @abogacki @matteobertoldo I'm curious if this works for you.