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

properties-order: null causes: Unknown severity: "ignore" #164

Closed
snebjorn opened this issue Oct 18, 2022 · 5 comments
Closed

properties-order: null causes: Unknown severity: "ignore" #164

snebjorn opened this issue Oct 18, 2022 · 5 comments

Comments

@snebjorn
Copy link

Turning properties-order off by setting it to null

"rules": {
  "order/properties-order": null
}

causes this error to be thrown when something is not sorted correctly.

Error: Unknown severity: "ignore"
    at ~\myproject\node_modules\stylelint\lib\formatters\stringFormatter.js:288:12
    at Array.reduce (<anonymous>)
    at stringFormatter (~\myproject\node_modules\stylelint\lib\formatters\stringFormatter.js:258:19)
    at Object.apply (~\myproject\node_modules\import-lazy\index.js:16:20)
    at prepareReturnValue (~\myproject\node_modules\stylelint\lib\prepareReturnValue.js:52:23)
    at standalone (~\myproject\node_modules\stylelint\lib\standalone.js:271:17)

A workaround is to

"rules": {
  "order/properties-order": [[], { "severity": "warning" }]
}

Also see

order doesn't seem to have this issue.

"rules": {
  "order/order": null
}

It's common practice in stylelint to set something to null to disable it.
Please fix this error for when order/properties-order is set to null

@hudochenkov
Copy link
Owner

Could you make a repository with reproducible issue?

@snebjorn
Copy link
Author

I'll cook something up :)
Gimmi a few days

@maxming2333
Copy link

I also encountered this problem, order/properties-order using null to disable is invalid, css file still prompts order/properties-order error

"rules": {
  "order/properties-order": null
}

Please ask the maintainer to fix this issue

@hudochenkov
Copy link
Owner

If you use stylelint-config-rational-order you need to switch to something else. It's very outdated package and uses very old stylelint and stylelint-order: https://github.com/constverum/stylelint-config-rational-order/blob/843a487338a25de246fd2d346fd1caf63f1de8a5/package.json#L32-L35

@snebjorn
Copy link
Author

snebjorn commented Mar 17, 2023

I was able to reproduce the error in a minimal setup. See setup in the playground (note the playground fails because of the error)

It is indeed caused by stylelint-config-rational-order

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

3 participants