Conflicting eslint after running yarn install
alde opened this issue · comments
After doing a clean yarn install
, when running yarn start
I get:
ERROR in Loader node_modules/sagui/node_modules/eslint/lib/api.js didn't return a function
@ multi index
So it appears sagui install it's own node_modules that conflicts with the project ones.
Running rm -rf node_modules/sagui/node_modules
makes it all work again, so for the time being I just added that to my Makefile.
So you have your own ESLint configuration? Do you mind sharing your .eslintrc
and dependencies in the packages.json
?
Thanks!
.eslintrc
{
"extends": "sagui",
globals": {
"fetch": true,
"describe": true,
"it": true,
"localStorage": true,
"atob": true,
"btoa": true
},
"env": {
"browser": true,
"node": true
}
}
deps in packages.json
"devDependencies": {
"chai": "^3.5.0",
"chai-enzyme": "^0.6.0",
"cheerio": "^0.22.0",
"cross-env": "^3.1.3",
"enzyme": "^2.6.0",
"react-addons-test-utils": "^15.4.0",
"redux-mock-store": "^1.2.1",
"standard": "^8.5.0"
},
"dependencies": {
"@klarna/ui": "^2.2.0",
"babel-polyfill": "^6.16.0",
"babel-preset-es2015": "^6.18.0",
"js-md5": "^0.4.1",
"normalize.css": "^5.0.0",
"rc-progress": "^2.0.3",
"history": "^4.6.0",
"react": "^15.4.0",
"react-dom": "^15.4.0",
"react-logger": "^1.1.0",
"react-motion": "^0.4.5",
"react-progressbar.js": "^0.2.0",
"react-promise": "^1.1.2",
"react-redux": "^4.4.5",
"react-router": "^3.0.0",
"react-router-redux": "^4.0.7",
"redux": "^3.6.0",
"redux-actions": "^0.13.0",
"redux-auth-wrapper": "^0.8.0",
"redux-logger": "^2.7.4",
"redux-promise": "^0.5.3",
"redux-thunk": "^2.1.0",
"reselect": "^2.5.4",
"sagui": "^8.0.2",
"whatwg-fetch": "^1.0.0"
}
Hi @alde, first, sorry for the long time it took for me to reply.
On the upcoming v9 release we are dropping support for the .eslintrc
file and will instead only support Sagui defaults.
The good news by looking at your custom configuration is that you can access all those "globals" via the window
object, meaning you wouldn't need the ESLint configuration.
So for example, accessing fetch
would be window.fetch
.
Makes sense?
Can you try the new beta release with npm install --save-dev sagui@beta
and see if the problem persists?
I'm closing this issue. Please ping us if you still have the problem.
Cheers,