ES Lint in Webstorm is not applying rules from the config files
Have followed the setup https://www.jetbrains.com/help/webstorm/eslint.html but on opening a file with known linting issues, Webstorm is clearly not running eslint as none of the warnings are being shown. I tried opening the same file using vscode, which then opens the same file to immediately show a whole load of linting warnings in the inbuilt terminal of their IDE.
Is ESLint support actually broken in Webstorm, and does it not work? I mean for the same project and setup, opening in VS Code shows linting warnings, but opening the same file in WebStorm shows no linting warnings.
Please sign in to leave a comment.
I just read the webstorm small print.
Also note that WebStorm does not apply rules from the configuration files listed in the extends field or rules from plugins.
If Webstorm is not supporting ES Lint, or plugins, thats very poor.
I do like Webstorm, but think it may be time to move on and change IDE's, will be checking out VS Code this weekend.
>Also note that WebStorm does not apply rules from the configuration files listed in the extends field or rules from plugins
This note refers to importing code style preferences from .eslintrc, not to showing ESLint errors in the editor. Rules from extended configs are used fot linting
>Is ESLint support actually broken in Webstorm, and does it not work?
it's not broken, and it does work.
Please provide your package.json, ESLint configuration file(s), screenshot of Settings | Languages & Frameworks | JavaScript | Code Quality Tools | ESLint page and idea.log (https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files)
@ElenaPogorelova
Thanks. I have got it to work, but I did this by going into Code, and running Inspection on the current file. It seems in other ide's such as visual code, the inspector runs immediately on any open files.
That said, there is still one issue I am facing, in WebStorm it is showing as Errors, however it is declared as a Warning in the ES Linting file.
Why would Webstorm be showing a Warning as an Error? In VS Code it correctly shows the same problem in the file as a Warning. Is there some setting that changes warnings to an Error? I am asking this as it is potentially misleading to say it is an error when it is only a warning.
@ElenaPogorelova
Another point, is there some setting to get Webstorm to immediately run a code inspection on any open file in the editor
> I have got it to work, but I did this by going into Code, and running Inspection on the current file. It seems in other ide's such as visual code, the inspector runs immediately on any open files.
ESLint inspections should work on-the-fly, and your should see the errors/warnings right in the editor.
Please provide the info I asked for im my previous comment
>That said, there is still one issue I am facing, in WebStorm it is showing as Errors, however it is declared as a Warning in the ES Linting file.
Known issue - 'offline' inspections (run via Inspect Code action) don't use severity level specified in .eslintrc. Please follow https://youtrack.jetbrains.com/issue/WEB-22548 for updates