Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use two different .eslintrc.json in VS Code?

How can I use one eslint ruleset for Node.js side Javascript and another ruleset for clientside Javascript in VS Code?

like image 452
Oliver Kötter Avatar asked Jan 01 '23 04:01

Oliver Kötter


1 Answers

  • use ./.eslintrc at root folder for your back-end
  • use ./client/.eslintrc. Add root: true in your ./client/.eslintrc if you want to fully dissociate client linting from back-end linting.

ESLint configuration files follow "first found" rules

ESLint will automatically look for them in the directory of the file to be linted, and in successive parent directories all the way up to the root directory of the filesystem (unless root: true is specified)

like image 113
Al-un Avatar answered Jan 05 '23 18:01

Al-un