Webstorm doesn't apply ESLint

Hey there,

somehow Webstorm doesn't apply ESLint rules anymore. I'm not sure if I'm missing any configuration or if it's just the IDE itself but no matter what I do my configuration is going to be ignored. First of all I've been assuming it would be a problem with ESLint's extend feature but the IDE also ignores rules within the rule block.

 

Any ideas?

 

23 comments
Comment actions Permalink

What do you mean by applying ESLint rules? Importing code style preferences from eslint config? Or? Please provide the detailed problem description

1
Comment actions Permalink

Hi Elena,

usually, when using ESLint, the IDE itself is looking for the config and showing errors and warnings (note: that's what I mean with appliying the rules) within the editor. Somehow ESLint isn't doing that in this case.

0
Comment actions Permalink

Please provide a screenshot of Settings | Languages & Frameworks | JavaScript | Code Quality Tools | ESLint, your .eslintrc, package.json and idea.log files

1
Comment actions Permalink

Here are my IDE ESLint config

.eslintrc.js 

and package.json

 

Not sure about where to find an idea.log. Doesn't exist in my projects .idea/ directory.

0
Comment actions Permalink

please can you provide .eslintrc.js  and package.json files (not screenshots)? You can upload the files to some file server and provide a link here

>Not sure about where to find an idea.log.

Please see https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files for instructions on locating it; the easiest way to find it is using Help | Show Log in Finder

1
Comment actions Permalink

works fine for me using your ESlint config and package.json... I'm using EAP build 182.569, Node.js 10.4.1:

I can't see any errors frelated to ESLint in your log... But it seems that you have several eslint configs in your project - is it true? can you recreate the issue using the default app generated with Nuxt?

0
Comment actions Permalink

That's weird. I've 3 recently started Nuxt projects which do not provide linting. That said I've already reproduced that 3 times. I've even bootstrapped a new one, just to test - still the same. I only have 1 eslint config in my project. It's just the one provided by Nuxt.

0
Comment actions Permalink

Please try the following:

- enable debug logging for #com.intellij.lang.javascript.service.JSLanguageServiceQueue:trace ( Help | Debug log settings)

- shut down WebStorm, delete all idea.log.* files in log folder

- start webstorm, recreate the issue with the default nuxt app

- provide the generated idea.log file + nuxt project you have used

0
Comment actions Permalink

Default nuxt project: https://github.com/yasin-mesut/nuxt-test 

I've just added the following to .eslintrc.js to force errors

rules: {
quotes: ['error', 'double']
}

idea.log https://www.dropbox.com/s/qb1e6l37wcqy6hu/idea.log?dl=0 

0
Comment actions Permalink

Thank you... It's weird - ESlint works fine for me using this same project, same Node.js version, etc.:

log shows nothing suspicious - the service is up and running

I'll ask the responsible developer to look into this - some additional logging(?) may help...

0
Comment actions Permalink

Hey Elena. I'm using WebStorm 2018.2 EAP Build #WS-182.3684.1 and node.js 10.4.1 if this helps somehow. If I can provide any further information helping you at, just let me know.

What kind of additional logging do you mean?

0
Comment actions Permalink

>I'm using WebStorm 2018.2 EAP Build #WS-182.3684.1 and node.js 10.4.1 if this helps somehow

 

yes, it's clear from the info you provided before; I'm using the same versions of IDE and Node.js.

I have no idea what else to ask you for unfortunately:(

 

 

0
Comment actions Permalink

the log shows that you have .eslintignore file in your workspace dir:

"ignoreFilePath":"/Users/Mesut/workspace/.eslintignore"}

What does it look like?

0
Comment actions Permalink

Interesting. All my projects are in sub directories of workspace. I've no idea how and why the logs show an ignore file at that directory. Yet, I've checked up the directory. There's neither a project nor an ignore file. No idea how my IDE recognized something there.

0
Comment actions Permalink

>All my projects are in sub directories of workspace.

But ESLint integration in WebStorm looks for .eslintingnore files from the current dir up to the disk root, so even the files located outside of the project are picked up (https://youtrack.jetbrains.com/issue/WEB-33883)

Please look for .eslintignore in your /Users/Mesut/workspace folder. Note that this file is likely hidden because of its name, you need to make sure to enable showing hidden files in Finder (or whatever file manage you are using)

0
Comment actions Permalink

Hey Elena,

I've already deleted that file through Terminal. Still the same problem ...

0
Comment actions Permalink

Please provide the new logs (with #com.intellij.lang.javascript.service.JSLanguageServiceQueue:trace enabled)

If they don't give us a clue, we'll create a special build with additional logging and provide it to you

0
Comment actions Permalink

Well, I have no idea how, but! I've just updated my IDE:

WebStorm 2018.2 Build #WS-182.3684.45, built on July 17, 2018

Doing so disabled my ESLint so I just re-enabled it and ... it's working now. Thanks for your help so far. I really appreciate it!

Just a short question regarding automatically fixing ESLint issues through the IDE. Is there any shortcut like reformating code (cmd + alt + L)?

0
Comment actions Permalink

great, thanks for update!

You can assign preferred shortcut to Preferences | Keymap | Plug-ins | JavaScript Support | Fix ESLint Problems

0
Comment actions Permalink

Awesome! Thanks for your patience and help, Elena!

1
Comment actions Permalink

latest build 2019 eslint has totally failed

0
Comment actions Permalink

@Stephen Davies   please start a new thread/create a support ticket, providing the detailed problem description

0

Please sign in to leave a comment.