Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install eslint in frontend, backend & deploy folders separately, or once in root?

I'm working on a tutorial project that has backend, frontend and deploy folders in the project root. Each of them has a package.json and thus a node_modules folder. The frontend is a create-react-app and I just spent a half hour dialing in the eslint config. Then I realized there is no eslint installed in the backend or deploy folders.

Should I install eslint separately in each of those then copy my .eslintrc file over, or nuke it from the front end and install it once in the root (one lint to rule them all)?

My fear with the latter is that there will be lingering eslint settings in my [un-ejected] create-react-app that will fight with any installation in the parent (root) folder.

like image 383
Kirk Ross Avatar asked Dec 09 '25 02:12

Kirk Ross


1 Answers

If you develop a back-end under NodeJS runtime, you could use ESlint, and preferably use a separate ESlint config files, thus you could define your rules as you want, may you will use an Airbnb javascript style guide on your frontend, so you will be comfortable later.

like image 57
Momo Setti Avatar answered Dec 11 '25 21:12

Momo Setti



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!