paleite / eslint-plugin-diff

Run ESLint on your changes only
https://npm.im/eslint-plugin-diff
MIT License
172 stars 13 forks source link

Add --no-ext-diff to git diff commands #23

Closed flupke closed 2 years ago

flupke commented 2 years ago

Note: I haven't been able to test this because I couldn't get yarn v3 to install a local package and ran out of time, but I checked that removing difft from my git config fixes the issue.

An external tool configured in git's diff.external setting can break eslint-plugin-diff.

For example difft seems to always take over regular git diff output, even in non interactive sessions. This results in eslint-plugin-diff not being able to parse the diff output and exiting with no errors.

This change adds --no-ext-diff to the git diff commands, which overrides the diff.external setting.

paleite commented 2 years ago

This is great and (in case of a bug report) would've been really hard for me to reproduce without someone else's setup. Thanks a bunch! 🙂