Oliver Kötter
Oliver Kötter

Reputation: 996

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?

Upvotes: 6

Views: 6077

Answers (1)

Al-un
Al-un

Reputation: 3412

  • 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)

Upvotes: 11

Related Questions