paleite / eslint-plugin-diff

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

Feature/fix vscode eslint #19

Closed tony-go closed 2 years ago

tony-go commented 2 years ago

Hi there 👋

I submit this little PR aiming to resolve issue #14

I dug a bit and noticed that the VSCODE_PID was available in the context of the Vscode plugin but not in the context of the classic CLI command (eslint <options>). Then I used it to bypass the preprocess check. Let me know WDYT?

I tried locally with my sources files and it seems to work, but I'm not sure at all... I think we should try with an alpha release or something like that.

⚠️ I faced a few devx issues when I started my contribution

  • node_modules was not ignored from git
  • I add a bunch of typescript/eslint errors (the chaining operation was not work 👶)
Screenshot 2022-02-15 at 10 07 47

I tried to fix them as I can to submit something.

Moreover, this test fail in my local environment:

Screenshot 2022-02-15 at 12 11 39

tony-go commented 2 years ago

I make more tests and I think I made a wrong assumptions ... I'll try back later

paleite commented 2 years ago

Thanks for your effort, @tony-go ! I really appreciate that 🙂 I've pushed tag https://github.com/paleite/eslint-plugin-diff/tree/v1.0.13-3 and I think I did something similar to you:

https://github.com/paleite/eslint-plugin-diff/blob/v1.0.13-3/src/git.ts#L5

Could you check if version 1.0.13-3 fixes the VSCode-issues for you?

Thanks again for taking the time to work on this!

maxerbox commented 2 years ago

tag 1.0.13-3 is not fixing it with the plugin:react/recommended