eslint-plugin-diff
eslint-plugin-diff copied to clipboard
potential bug - only running once?
I'm trying to debug why the diff plugin isn't working and it seems it "works" once... and then the second time you call it it has a different code path.
Is the cache causing a problem potentially?
I'm still trying to debug what's happening but it should be the same path each time but the first run takes a different path and doesnt' call getPreProcessor and shouldBeProcessed isn't applied.
confirmed that the cache breaks this and causes non-determinstic behavior.
especially if you change ESLINT_PLUGIN_DIFF_COMMIT to an earlier commit like the git init checksum.
It won't show the updated output unless you clear the cache.
I think this could potentially be fixed by moving ESLINT_PLUGIN_DIFF_COMMIT into the eslint config.
I think the problem is that eslint doesn't realize that the ESLINT_PLUGIN_DIFF_COMMIT has changed (why would it?) and then can't invalidate the cache.