Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command line option to enable/disable the plugin #24

Closed
n-studio opened this issue Jul 22, 2022 · 3 comments · Fixed by #26
Closed

Command line option to enable/disable the plugin #24

n-studio opened this issue Jul 22, 2022 · 3 comments · Fixed by #26
Labels
enhancement New feature or request

Comments

@n-studio
Copy link

On my CI I want to lint only the diff lines, but when I run lint locally I want to be able to scan my whole project.

Is it possible to add a command line option, for example eslint src/** --disable-diff to restore the default behaviour?

@paleite paleite added the enhancement New feature or request label Jul 28, 2022
@paleite
Copy link
Owner

paleite commented Jul 28, 2022

That's a great idea! I'll look into it in the next few days.

@paleite paleite linked a pull request Aug 1, 2022 that will close this issue
@paleite
Copy link
Owner

paleite commented Aug 1, 2022

@n-studio I've release a pre-release of this feature. It's pre-released as version 2.0.2-0 and if you like, you could try it out right now. It's completely automatic, so you don't have to specify if you're running in CI or not.

Please note: There's no new command-line option (ESLint doesn't allow that), but since I added auto-detection instead, it should work by simply changing your config from "plugin:diff/diff" to "plugin:diff/ci".

@paleite paleite closed this as completed Aug 1, 2022
@internetstaff
Copy link

This is a nice idea, but 1) it's not released and 2) it seems to force prefixing origin to ESLINT_PLUGIN_DIFF_COMMIT so it can't reference anything but a branch?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants