-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add eslint.js for WebStorm compat #24
Conversation
Thanks for the pull request. This means that WebStorm is doing the wrong thing. They shouldn't make assumptions about the internal structure of the ESLint package. But the workaround is easy enough, so yeah, we can add this. Two minor things though: If you want to add a screenshot, please make it part of the PR and link to it with a relative URL to the image instead of some hash. Alternatively, a text description would also do. Secondly, please replace the compatibility note with something like "You need at least eslint_d 2.4.0 for WebStorm support." instead of linking to your fork - that branch in your fork will most likely not receive future patches ;-) Thanks! |
'use strict'; | ||
|
||
var client = require('../lib/client'); | ||
var useStdIn = (process.argv.indexOf('--stdin') > -1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The stdin option is already supported. This file could simply require('./eslint_d.js');
.
Update README to include WebStorm setup
I updated the PR and simplified the readme. I am not sure what version you will publish so if you want to add a reference to the version number, I will give you the liberty to do so. |
Add eslint.js for WebStorm compat
Thanks! Released in |
This is broken again in newer IntelliJs.
|
@SimenB D'oh! Do you know how to solve it? |
I don't think it's possible, but the newer intellij uses the api more directly out of the box, so not as needed as before, maybe? https://blog.jetbrains.com/webstorm/2017/02/webstorm-2017-1-eap-171-3224/ I still use eslint_d for auto-fix on save, though 😄 |
Atom always did it this way and it absolutely makes sense for IDEs. I think we don't have to open a new issue then. Would you care to put a note into the Readme stating the version range where eslint_d works? |
By adding a symlink, we can take advantage of the eslint_d inside of the WebStorm IDE
This does not add eslint to the npm bin, but just make sure
eslint.js
exists for tools and plugins that look for it.Add eslint_d to WebStorm's ESLint config
Without this patch, we get the following error.
With the patch, the linter is faster than ever!