Open hugop95 opened 3 weeks ago
@azat-io This is fixed by #324, but that PR will be available in the next major version.
I don't think that this bug appears that often in practice: this requires two imports to be separated by more than the required number of newlines and the additional whitespace, so should not be a recurring issue. I don't think that a hotfix in v3.9 is mandatory, but I can make a PR for that if you want as well.
Describe the bug
Newline auto-fixes can in very specific configurations result in code that does not compile. See code example.
Code example
Configuration:
"newlinesBetween": "always"
or"never"
.Code:
Notice the whitespace before the second import.
The resulting code is:
ESLint version
8.57.0
ESLint Plugin Perfectionist version
3.9.1
Additional comments
No response
Validations