http://eslint.org/docs/user-guide/configuring#using-a-shareable-configuration-package
In accordance with the docs linked above, I can't seem to get our shared config working with this VSCode plugin. It works fine in other editors that support eslint (Sublime, for instance).
I have the following (as an example) in my projects config:
"extends": [
"myconfig"
],
I have "myconfig" installed locally eslint-config-myconfig and also have eslint installed globally and locally as well.
I'm running:
Version 1.3.1
Commit e6b4afa53e9c0f54edef1673de9001e9f0f547ae
Date 2016-07-12T13:28:46.761Z
Shell 0.37.6
Renderer 49.0.2623.75
Node 5.10.0
Hi, I have the same issue as of the recent 1.5 release (did not have this plugin installed before that).
I can't reproduce this using the latest eslint plugin. See attached screen short. I have both eslint and eslint-config-myconfig installed locally.
Does this work for you if you execute eslint from a terminal ?
@dbaeumer Thanks for that sanity check - it is actually broken from terminal too. It must be a problem with either the custom config or eslint itself, I'll dig deeper.
@dbaeumer @yomed I can't reproduce this any longer. I'm using Code 1.5.2 and 0.10.18 of the ESLint extension. Changing the inherited config's rules have an immediate affect in the editor.
I have the same issue.
Code 1.5.3, ESLint extension 1.0.7
.eslintrc:
{
"extends": "myconfig",
}
Error: Cannot find module 'eslint-config-myconfig'
I have the 'eslint-config-myconfig' installed locally. The same config is working for other editors.
@joacle does it work from the terminal. eslint and eslint plugins must either all installed locally or all globally.
@dbaeumer I have all the references installed locally. My package.json:
{
...
"eslint": "^3.2.2",
"eslint-config-airbnb": "^10.0.0",
"eslint-plugin-import": "^1.12.0",
"eslint-plugin-jsx-a11y": "^2.0.1",
"eslint-plugin-react": "^6.0.0",
...
}
@joacle executing your setup in a terminal produces the same error as in VS Code. The output is
P:\mseng\VSCode\Playgrounds\bugs\eslint-101>node_modules\.bin\eslint.cmd test.js
Cannot find module 'eslint-config-myconfig'
Referenced from: P:\mseng\VSCode\Playgrounds\bugs\eslint-101\.eslintrc.json
Error: Cannot find module 'eslint-config-myconfig'
Referenced from: P:\mseng\VSCode\Playgrounds\bugs\eslint-101\.eslintrc.json
at Object.resolve (P:\mseng\VSCode\Playgrounds\bugs\eslint-101\node_modules\eslint\lib\util\module-resolver.js:74:19)
at resolve (P:\mseng\VSCode\Playgrounds\bugs\eslint-101\node_modules\eslint\lib\config\config-file.js:478:33)
at load (P:\mseng\VSCode\Playgrounds\bugs\eslint-101\node_modules\eslint\lib\config\config-file.js:495:26)
at P:\mseng\VSCode\Playgrounds\bugs\eslint-101\node_modules\eslint\lib\config\config-file.js:391:36
at Array.reduceRight (native)
at applyExtends (P:\mseng\VSCode\Playgrounds\bugs\eslint-101\node_modules\eslint\lib\config\config-file.js:362:28)
at Object.load (P:\mseng\VSCode\Playgrounds\bugs\eslint-101\node_modules\eslint\lib\config\config-file.js:529:22)
at loadConfig (P:\mseng\VSCode\Playgrounds\bugs\eslint-101\node_modules\eslint\lib\config.js:63:33)
at getLocalConfig (P:\mseng\VSCode\Playgrounds\bugs\eslint-101\node_modules\eslint\lib\config.js:130:29)
at Config.getConfig (P:\mseng\VSCode\Playgrounds\bugs\eslint-101\node_modules\eslint\lib\config.js:256:22)
@joacle adding "eslint-config-myconfig": "^0.2.0"to the dependencies fixes it. Any objection to close?
Thanks! It works, no objection :)
Closing then.
Most helpful comment
Hi, I have the same issue as of the recent 1.5 release (did not have this plugin installed before that).