While working on dependency update #1225 I observed many linting errors in the Atom editor.
These errors do not appear when linting from the terminal, only in Atom.
The errors first appear in 98f2d0d feat(core): Move to Jest for testing (#980)
Atom: 1.11.2
linter-eslint 8.0.0
OS X 10.11.6
To reproduce:
Open /app/app.js (or other .js files) in editor

A solution that is working for me is make package.json conform to this #980 comment
The original works (provided webpack.test.babel.js is restored):
package.json
json
"import/resolver": {
"webpack": {
"config": "./internals/webpack/webpack.test.babel.js"
}
}
The recommended change works:
package.json
json
"import/resolver": {
"webpack": {
"config": "./internals/webpack/webpack.prod.babel.js"
}
}
The way it ended up in #980 _does not_ work. It produces the errors listed in the OP:
package.json
json
"import/resolver": {
"webpack": {
"config": "./internals/webpack/webpack.dev.babel.js"
}
}
This make no sense to me, I'm not a webpack wizard. webpack.test.babel.js (removed in #980) is the only file with a resolve key which I (obviously wrongly) assume is the reason for the import/resolver key in the blocks above.
I have tried:
webpack.test.babel.js one at a time, to webpack.dev.babel.js.resolve key from webpack.test.babel.js directly into package.jsonsettings key from package.jsonNone of these actions had any effect on the errors listed in the OP.
I have opened PR #1261 with this change.
I'm also not a webpack wizard 馃槃 and don't have Atom installed, but have one idea, what if you replace:
const pkg = require(path.resolve(process.cwd(), 'package.json'));
with
const pkg = require(path.resolve(__dirname, '../..', 'package.json'));
And if that doesn't help, replace process.cwd() everywhere in webpack.dev.babel.js. IMO process.cwd's are nasty, I always avoid them and prefer __dirname instead.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.