简体   繁体   中英

WebStorm different ESLint config for each folder

I have JavaScript project which contain front-end and back-end folders. Each of those folders holds different ESLint config file. Problem is that I cannot setup WebStorm to auto detect ESLint for current folder. Is that possible or not? As I can see, it can be set only one ESLint per project which makes WebStorm unusable for JavaScript full-stack development. Is there any workaround?

In Languages and Frameworks > JavaScript > Code Quality Tools > ESLint > "ESLint package" points to eslintrc file in back-end folder. "Configuration file" is set to Automatic search option.

When I open file from front-end folder it did not apply lint from it's eslintrc, but from back-end folder. There is an error which shows that it search for plugin in back-end node_modules eslint folder instead of front-end one.

This means that "WebStorm first looks for a .eslintrc or package.json in the folder with the file to be linted, then in its parent folder, and so on up to the project root" is not working !

WebStorm 2019.1 EAP构建中增加了支持https://youtrack.jetbrains.com/issue/WEB-25561

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM