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

Fix autofix for !important annotation in declaration-block-semicolon-space-before #4016

lennontu opened this issue Apr 11, 2019 · 1 comment


2 participants
Copy link

commented Apr 11, 2019

Clearly describe the bug

'declaration-block-semicolon-space-before': 'never' autofix failed

Which rule, if any, is the bug related to?


What CSS is needed to reproduce the bug?

div {
  width: 50% !important   ;

What stylelint configuration is needed to reproduce the bug?

module.exports = {
  'rules': {
     'declaration-block-semicolon-space-before': 'never',

Which version of stylelint are you using?


How are you running stylelint: CLI, PostCSS plugin, Node.js API?

"CLI with stylelint --fix "**/*.css" --config myconfig.json"

Does the bug relate to non-standard syntax (e.g. SCSS, Less etc.)?


What did you expect to happen?

"autofix success, width: 50% !important ; => width: 50% !important;"

What actually happened (e.g. what warnings or errors did you get)?

"autofix failed, width: 50% !important ; not change"

@jeddy3 jeddy3 changed the title 'declaration-block-semicolon-space-before': 'never' autofix failed Fix autofix for !important annotation in declaration-block-semicolon-space-before Apr 11, 2019


This comment has been minimized.

Copy link

commented Apr 11, 2019

@lennontu Thanks for the report and for using the template.

I can reproduce this. It appears to be related to the !important annotation and unrelated to the primary option i.e. "always" or "never".

As the issue has been labelled "help wanted", please consider contributing a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.