lint-diff
lint-diff copied to clipboard
lint-diff also lints unstaged files
Love the plugin! Thanks for creating. I have been using it as part of a pre-commit hook, and I noticed that unstaged files are also getting linted. Is that how you intend for it to work? For our project, we only want to lint the diff of the staged files. I made a change so that only staged files would get checked- I'm happy to open a PR for it, but I wasn't sure if you actually would want that.
git diff --cached
Can you add optional flag to enforce git diff show only staged files diff?
@mackclark : I recently released a plugin for ESLint which allows you to do just that (use "extends": ["plugin:diff/staged"]
): https://www.npmjs.com/package/eslint-plugin-diff