eslint-plugin-diff icon indicating copy to clipboard operation
eslint-plugin-diff copied to clipboard

ESLINT_PLUGIN_DIFF_COMMIT does not support commit hash without origin anymore

Open aljazfarkas opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. We are using plugin:diff/ci in v2.0.3 to lint code differences in our CI pipeline. But sometimes, master gets ahead of current branch. If someone deletes code lines in master, that had eslint errors, it will cause the eslint to fail in the CI on the current branch, as the code lines appear as added in the current branch. Since this library automatically prepends origin/ to our process.env.ESLINT_PLUGIN_DIFF_COMMIT, there is no way to easily use git merge-base origin/master HEAD as diff commit to only diff with the common ancestor. This makes us use the [email protected], where this is not a problem.

Describe the solution you'd like Do not automatically prepend /origin to ESLINT_PLUGIN_DIFF_COMMIT.

Describe alternatives you've considered I have considered using the older version of this library, which seems to be the only simple solution.

Additional context No context needed.

aljazfarkas avatar Nov 05 '24 12:11 aljazfarkas

I found a workaround by installing [email protected] instead of 2.0.3 as this one support lint:diff with a commit hash.

menocomp avatar Jan 25 '25 13:01 menocomp