I have an eslint file that I use across multiple Nodejs projects with my team. This file is important and I need to use it in every project, so I end up copying it over and over again.
This is a terrible idea because If I make a change to the eslint file, I need to manually copy/paste it into all the other projects and sometimes I forget which projects have the updated file and which projects don't.
My objective here would be to make it automatic. My first idea was to publish the eslint file in NPM, and then manage it via there.
The problem with this approach is that if I do npm install, NPM will place my lint file into the node_modules directory and thus nothing will work.
This file needs to be at the root of the project, side by side with package.json.
How do I share this eslint file across multiple projects automatically?
Turns out that you can use NPM packages to share ESLint files across multiple projects and teams, which was unknown to me:
http://engineering.invisionapp.com/post/sharing-eslint-across-teams/
The official documentation details how this can be done, and which conventions to follow:
http://eslint.org/docs/developer-guide/shareable-configs#creating-a-shareable-config
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With