-
Notifications
You must be signed in to change notification settings - Fork 1k
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
refactor: Replace husky & lint-staged by lefthook #330
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commands that modify stuff running in parallel is probably a bad idea
Depends on how they synchronize the updated files, I did not see issue like that. But yeah, need to take a long in a long term and modified base. But normally, you shouldn't have stuff being modified by lefthook since your dev workspace should be setup and lint/format on each files update 🫣 |
there is no synchronization, that's the problem
I don't understand this sentence
then we should switch these tools to their "check-only" mode, but as far as I'm concerned, I do rely on pre-commit to format the files and I'm not sure to see why I should not |
I kinda agree with @ramnes. Some developers will lint on save some rely on the pre commit hook. |
Alright, I haven't come across anyone encountering problems with it. However, if you still have concerns, what about grouping these by file types?
Sorry, I also didn't quite understand my sentence initially, haha. I meant that we should consider the long-term usage of these tools and see if any issues arise :)
Pre-commit is, to me, a way to ensure that I don't commit poor-quality code to the repository. As a developer, it's advisable to have tools like Prettier, linters, Black, and isort set up to automatically run whenever you save your files. This practice ensures that your code remains properly formatted and compliant with coding standards throughout your work. Embracing these practices offers benefits, and pre-commit serves as a final checkpoint, verifying the quality of your code before commits. However, it's possible that my perspective is unique, and others may have differing opinions. In my view, you shouldn't just rely on pre-commit. |
Ok, I ended up with something like this. Let me know @ramnes @willydouhard |
Running pre-commit fast, concurrently and only on staged files! (Even for mypy now 🔥)