Webstorm: Fix current file with ESLint no longer in menu

I have been successfully running ESLint with WebStorm until recently. My current WS is 2017.2.3, WS-172.3968.27 on OSX10.12.6. I notice this was built recently and ESLint may have broken when I upgraded but I'm not sure about that.

I believe my configuration is correct because I do get the red squiggles and tooltips with prettier errors. However clicking Alt-Enter on the squiggly no longer has the 'Fix current file with ESLint' option in the menu. I see 'Edit ESLint settings', 'Edit .eslintignore' and some Suppress rule entries.

eslint is in the node_modules directory of our project. We have .eslintrc.js files at various points in the project. I also notice when I open one of .eslintrc.jc I do not get the new feature to import some of the rules into the project.

 

4
17 comments

Do you have white spaces/special characters in project path? If not, please can you provide a project I can use to recreate the issue?

0

No special characters. I just reinstalled Version 2017.1, and with the same project/files, I am seeing 'ESLint: Fix current file' in menu as I expect. My project is a huge Adobe website so I will not be able to share it with you.

0

sorry, but I can hardly help unless I have a way to recreate the issue. Is the problem specific to certain files/file type? can you recreate it in a new project using your eslint config?

0
Avatar
Permanently deleted user

I had this issue as well. I fixed it by upgrading to the latest version of babel-eslint and eslint and the problem went away. Interestingly, I had another project where it *was* working. I just copied the versions from there and all good. Here are my versions and eslintrc.json

"babel-eslint": "^8.0.0",
"eslint": "^4.7.1",

{
"extends": [
"standard",
"standard-react"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 8,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"experimentalObjectRestSpread": true
}
},
"env": {
"browser": true
}
}
0
Avatar
Permanently deleted user

I have the same issue, I tried to upgrade the version of babel and eslint like said before but it still doesnt' work. It's working on another project with the same versions of eslint and babel. If somebody find a solution I'll be happy to try it.

0
Avatar
Permanently deleted user

I have encountered the same problem, I use the terminal in webstorm to install dependent libraries. After the end of the webstorm indexing can be used. hope this helps!

0

As I said I work on a large project and the package versions, while always relatively current, are locked and not something I can individually change. Webstorm broke something between Version 2017.1 and Version 2017.2. For now, I've reverted to Version 2017.1 but that is not a permanent solution.

1

I'm facing the same issue (2017.2.4).

When invalidating caches/restarting, the entry re-appears in ALT+Enter dialog but it doesn't seem to work.

0

Update: it only doesn't seem to work for max-len rule.

0
Avatar
Permanently deleted user

I have the same issue with:

WebStorm 2017.2.4
Build #WS-172.4155.35, built on September 11, 2017

It worked with 2017.1.x

0

Does the problem persist after caches invalidation? If yes, project that shows up the issue would be appreciated

2
Avatar
Permanently deleted user

yes, invalidating cache helped.

3

I was experiencing the same issue on the version below.  Invalidating the cache and restarting WebStorm did the trick for me. 

WebStorm 2017.2.5
Build #WS-172.4343.25, built on October 20, 2017
JRE: 1.8.0_152-release-915-b12 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.6

0
Avatar
Permanently deleted user

Invalidating cache did the trick for me too.

How to invalidate cache?
Webstorm -> File -> Invalidate Caches / Restart

2
Avatar
Permanently deleted user

Invalidating cache/restart didn't work. i tried reinstalling the plugin and still nothing.

0

@Shannon Thrasher please create a new thread describing your issue and configuration

0
Avatar
Permanently deleted user

Invalidating cache works for me also.

1

Please sign in to leave a comment.