multiple eslint config files?

we have different eslint config files for different file types:

By the looks of things this isn't supported? I've seen post about people that had different configuration files in different folders (which i believe isn't supported) but this is a little bit different. I've been messing with eslint settings but it seems like only have one configuration file which will apply to every file type you specify:

Any help would be appreciated.

thanks….

 

0

The IDE uses the ESLint logic here. As it's written in https://eslint.org/docs/latest/use/configure/configuration-files#configuration-file-formats, if there are multiple configuration files in the same directory, ESLint only uses one. The priority order is as follows:

  1. .eslintrc.js
  2. .eslintrc.cjs
  3. .eslintrc.yaml
  4. .eslintrc.yml
  5. .eslintrc.json
  6. package.json

Multiple configs are supported, but they have to be placed in different folders as explained in https://eslint.org/docs/latest/use/configure/configuration-files#cascading-and-hierarchy

0

Elena Pogorelova thank you for the response. That explains everything. I will give it a try…..

0

请先登录再写评论。