Support --fix-dry-run
option in programmatic API
#15877
-
I'm wondering if supporting this flag in programmatic API is possible. I think it would be useful to use this option in eslint wrapper libraries like References
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Can you elaborate more on what would be the functionality of this flag in ESLint API? Linting and saving the changes are already two separate steps: Lines 295 to 307 in ee69cd3
If you want to get the fixed versions (with the remaining unfixable problems) without modifying the files, you can just call |
Beta Was this translation helpful? Give feedback.
Can you elaborate more on what would be the functionality of this flag in ESLint API?
Linting and saving the changes are already two separate steps:
eslint/lib/cli.js
Lines 295 to 307 in ee69cd3
eslint --fix
callseslint.lintFiles
, and thenESLint.outputFixes
.eslint --fix-dry-run
only callseslint.lintFiles
.If you want to get the fixed versions (with…