ota-meshi / eslint-plugin-yml

This ESLint plugin provides linting rules for YAML.
https://ota-meshi.github.io/eslint-plugin-yml/
MIT License
115 stars 13 forks source link

Need to run multiple time --fix #273

Closed adelin-b closed 11 months ago

adelin-b commented 11 months ago

when there is keys inside a list inside a list then only the first level is going to be fixe, so we need to run --fix multiple times.

ota-meshi commented 11 months ago

Thank you for posting the issue. However, it is a known limitation. Since rules report for each key and have a fix for each report, it is necessary to repeat the autofix many times, but ESLint repeats the autofix 10 times with a single lint of the file, and anything that cannot be fixed is reported as is. A fix to sort the entire file at once might solve the problem, but I won't do that because it might ignore the suppression by the eslint-disable comment.

Thank you for understanding.