-
-
Notifications
You must be signed in to change notification settings - Fork 929
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 introducing new violations #3853
Comments
@wKich Thanks for the clear report and for using the template.
This is, unfortunately, a known limitation. We don't yet have a robust way to avoid introducing violations for rules that have already been run. As a workaround, you can see if adding the
There is some further discussion on this limitation, but help is needed to resolve it in a robust way. I'll keep this issue open, but rename it so that we can draw attention to this limitation and hopefully galvantise support to fix it. |
declaration-colon-newline-after
lead to another issue
I think stylelint cli should run fixer multiple times, like what eslint does.
|
SGTM. Feel free to contribute a proof of concept PR. |
Is this about rolling back to the state before the last fix—and skip that error—if a new error has been detected or is it about introducing a new flag (e.g. PRO of the former: you only have to run it a second time at the end (to rollback specific hunk of code)
CONS of the latter:
|
The latter. Although, it's less of an issue these days now that we're moving away from stylistic rules as the rules that avoid errors and enforce convention tend not to introduce new violations. |
Are all the Is I am asking all of this for the projected tests. |
This issue is older than one month. Please ask before opening a pull request, as it may no longer be relevant. |
Some rule ignore
indentation
rule and as result after auto fix I receive error about indentation and should call auto fix second time to fix my files. If I try to useprettier-stylelint
than I get unfixable indentation error, because stylelint is called once.declaration-colon-newline-after
or maybevalue-list-comma-newline-after
. I think this happen because of PR #3588CLI with
stylelint "./**/*.less" --fix
I think No.
Correctly formatted file:
After first auto fix I receive:
The text was updated successfully, but these errors were encountered: