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

Closed
lennontu opened this issue Apr 11, 2019 · 1 comment · Fixed by #4050
Closed

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

lennontu opened this issue Apr 11, 2019 · 1 comment · Fixed by #4050
Labels
good first issue is good for newcomers status: ready to implement is ready to be worked on by someone type: bug a problem with a feature or rule

Comments

@lennontu
Copy link

lennontu 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?

declaration-block-semicolon-space-before

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?

9.10.1

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.)?

"No"

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
@jeddy3 jeddy3 added good first issue is good for newcomers status: ready to implement is ready to be worked on by someone type: bug a problem with a feature or rule labels Apr 11, 2019
@jeddy3
Copy link
Member

jeddy3 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
Labels
good first issue is good for newcomers status: ready to implement is ready to be worked on by someone type: bug a problem with a feature or rule
Development

Successfully merging a pull request may close this issue.

2 participants