Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning occurring on all sass files: Unknown rule declaration-property-value-disallowed-list , Unknown rule at-rule-disallowed-list #111

Closed
waldronmatt opened this issue Nov 9, 2020 · 7 comments

Comments

@waldronmatt
Copy link

Screenshot_20201109_153459

This is my .stylelintrc.js configuration:

module.exports = {
  extends: [
    "stylelint-config-standard",
    "stylelint-config-sass-guidelines",
    "stylelint-config-prettier",
  ],
  plugins: [
    "stylelint-scss",
    "stylelint-order",
  ],
  ignoreFiles: ["dist/**"],
  rules: {
    "at-rule-no-unknown": null,
    "scss/at-rule-no-unknown": true,
    "at-rule-disallowed-list": [],
    "declaration-property-value-disallowed-list": {},
  },
};

@bjankord is there any way to disable these last two rules? In my config above I tried setting them to null, false, and assigning empty array/object, but to no success. I'm entirely sure why these errors are cropping up.

https://github.com/bjankord/stylelint-config-sass-guidelines/blob/main/index.js#L4

https://github.com/bjankord/stylelint-config-sass-guidelines/blob/main/index.js#L21

As far as ordering goes, I tried switching stylelint-config-sass-guidelines above and below stylelint-config-standard to see if there were any conflicts, but still getting the same result. I tried removing everything except stylelint-config-sass-guidelines and the errors are still present.

@waldronmatt
Copy link
Author

Sorry for opening this up I think this is fixed.

I ended up deleting package-lock.json, node_modules, and upon reinstall of dependencies everything seems to be working fine now.

@cxspxr
Copy link

cxspxr commented Dec 10, 2020

Have the very same config, issue still persists after removing node_modules, package-lock.json

@dmongeau
Copy link

dmongeau commented Jan 4, 2021

I'm having the same issue for months now. The only thing that fixes the issue is to remove "stylelint-config-sass-guidelines".

@alexrudd2
Copy link

I had the same issue and found two fixes.

The naive fix is to remove the line containing the rule entirely:

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

I don't see anything malformed about it, but it does allow keeping the rest of the package intact.

However, in my case I'm using atom with the linter-stylelint packagewhich appears to be the source of this bug. See AtomLinter/linter-stylelint#583

I believe the problem is that the linter-stylelint is using an old version of stylelint itself (13.3.3), which gets installed into its local node_modules. Replacing ~/.atom/packages/linter-stylelint/node_modules/stylelint with a more modern version (or just deleting it entirely and using a global install) worked for me.

@cxspxr and @dmongeau If you're using the atom plugin perhaps this will fix things for you.

@rgranger
Copy link

I had the same issue when upgrading to version 7.1.0.

Downgrading to 7.0.0 fixes the issue.

@alexrudd2
Copy link

I had the same issue when upgrading to version 7.1.0.

Downgrading to 7.0.0 fixes the issue.

Are you using Atom? I'm curious if my fork of linter-stylelint works for you.

@rgranger
Copy link

Are you using Atom? I'm curious if my fork of linter-stylelint works for you.

No i'm only using stylelint with the CLI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants