ESLint-Formatter
ESLint-Formatter copied to clipboard
run script on temp file
Previously it would only run on the saved file, meaning if you ran it and had unsaved changes, those changes would be lost. This copies the text to a temp file, runs eslint --fix on that, and returns the results
This would cause ESLint to be running on the file from tmp
, right? Since eslint configs can be set using overrides, this could cause files to be linted with the wrong configuration since it might no longer match the correct glob, right?
oh yeah good point, give me a bit
Ok check it now, fixed the issue
Hey, any updates or comments on this PR?
It seems to me like there's a risk that the eslint configuration will ignore certain patterns of files, and that it's difficult to guarantee that the temporary file created will match that pattern. What do you think about fixing this via #34 instead?