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

/* stylelint-disable */ usage prevents --fix from working on entire file in v13 #5282

Closed
ryanbarkernz opened this issue May 11, 2021 · 2 comments

Comments

@ryanbarkernz
Copy link

ryanbarkernz commented May 11, 2021

Say we run fix on the below:

body {
/* stylelint-disable */
color: red !important;
/* stylelint-enable */
background: green



}

The whitespace and missing semicolon will not automatically fix, though will display as errors in the console.

Declaring the actual rule seems to still allow fixing to work. EG

body {
// stylelint-disable declaration-no-important
color: red !important;
background: green



}

Downgrading to v12 fixed the issue.

@ybiquitous
Copy link
Member

@ryanbarkernz The behavior seems due to auto-fix limitation since 13.12.0. See also:

@jeddy3
Copy link
Member

jeddy3 commented May 12, 2021

Downgrading to v12 will reintroduce the unsafe behaviour of autofix making changes even if stylelint-disable is being used.

Please consider contributing to #2643 if you have time.

@jeddy3 jeddy3 closed this as completed May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants