eslint-plugin-sort-class-members icon indicating copy to clipboard operation
eslint-plugin-sort-class-members copied to clipboard

Eslint needs multiple runs to fix all errors

Open Fuzzyma opened this issue 4 years ago • 3 comments

Usually, one run of eslint --fix will resolve all fixable erros. However, this plugin needed 4 or 5 runs in my codebase to finally be able to put all methods in the correct spot. This is partly because it also messes up other rules while fixing the ordering. This is not of immediate concern for me since I can just hit ctrl+s multiple times. However, for other people using this plugin it would be good to solve this issue.

PS: Thank you for this!

Fuzzyma avatar May 11 '20 04:05 Fuzzyma

Hi, its not only about this plugin but for example import order or another family: stylelint needs more runs to finish the sort. We use 2 repeats by default with lint-staged and while true; do ...lint_fix_cmd...; done to fix big multirepos. However some IDE like vscode and it's eslint plugin is able to fix everything on single save. Hope it helps

crysadrak avatar Oct 06 '20 18:10 crysadrak

I am using vscode and there is where this happened so it wasnt working there :/

Fuzzyma avatar Oct 07 '20 00:10 Fuzzyma

Whoa, just spent a day bashing my head against this, thinking I was having some weird async issue, painful!

In my case im running this via an npm script and finding I need to run it twice atleast - whats is the recommended way of running it until its done?

linearza avatar May 11 '23 14:05 linearza