-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Linting problems with javascript layer #10131
Comments
Is there a way to overwrite the executable of a checker in Flycheck ? |
flycheck/flycheck#272 seems to suggest that this is possible. |
@heyarne I don't know if it is related but have you tried setting this in your
|
@zer09 Nice! That solves a part of the problem. It now uses the local
|
I can't remember if I experience this before, but when I fully move from vscode to I will try tomorrow if I can reproduced this by installing eslint locally. |
The problem with installing it globally is that all modules referenced in the config need to be installed globally as well. This can quickly become a problem when working with different teams and running into dependency-conflicts. |
Ok I am able to reproduced your issue, if eslint installed locally. |
There is this suggested solution that's using projectile to find the local |
Maybe this issue can help flycheck/flycheck#1087 specially the 2nd to the last comment. |
Nice, that solved it! Thanks a lot. |
@heyarne can you post your solution? I tried the solutions suggested in flycheck/flycheck#1087, but couldn't get it to work, perhaps b/c I'm not configuring it correctly for spacemacs. Thanks! |
Sure: In my spacemacs config I added If you're still having trouble, you can check your flycheck config via |
In addition to all of the above (credit goes to those folks).... for Spacemacs users ...
1-a. then
Then, while in the "Javascript IDE" |
Is this still a viable solution? I'm reading that |
@samuy The security risk you linked to was referring the adding a relative path the the shell $PATH variable, "especially at the beginning". Looking at the source code of |
Description
I'm having problems with the javascript layer not properly finding my local
eslint
config. I've discussed the issue in greater detail here, but what it boils down to is this:SPC e v
shows me thatjavascript-eslint
is enabled forflycheck
, thejs2-mode
checker is used still. Linter output ofeslint .
in my shell is different from the one I see in emacs.eslint
installed in$PROJECT_ROOT/node_modules/.bin/eslint
is not found andjavascript-eslint
is shown as automatically disabledThe warnings I see in emacs:
Reproduction guide 🪲
syntax-checking
andjavascript
layers.eslintrc
to your project root with content{ "extends": "standard" }
npm i -D eslint eslint-config-standard eslint-plugin-import eslint-plugin-node eslint-plugin-promise eslint-plugin-standard
Observed behaviour: 👀 💔
See above.
Expected behaviour: ❤️ 😄
I'd expect the output to be identical to what my local
eslint
install provied.System Info 💻
The text was updated successfully, but these errors were encountered: