Does it still make sense to run ESLint using the pre-commit hook and manually manage the required dependencies? #2197
-
Right now we use pre-commit to configure ESLint. This requires us to duplicate our ESLint dependencies (and update the versions in two places) by hand. I believe we originally did this so that it would be easy to run ESLint on our several repositories with some shared baseline configuration. However, now that we have all our JavaScript in the monorepo, does this still make sense? I can see that it is probably nice that ESLint can run without needing to run If that is the case, then we could switch the ESLint hook in our pre-commit configuration to a local hook and run ESLint directly. This would remove the need to manually duplicate the dependencies in two places. Pinging @dhruvkb specifically for advice regarding the monorepo stuff and because you were foundational in getting the nice pre-commit configuration we have now. Does anything about this stand out to you? Can it be done or would it cause other issues that are better avoided? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Using ESLint as a local hook makes sense (maybe even the same for Prettier), and I am all for deduplication anywhere possible. There are other local hooks that run when JS/TS files have changed and so installing the Node.js dependencies is already a requirement at this point. The only obstacle I can imagine with this is, will we need to install ESLint and its dependencies in all individual workspaces? |
Beta Was this translation helpful? Give feedback.
In that case, this works for me. Let's make an issue out of this discussion and get it done 🚀!