-
Notifications
You must be signed in to change notification settings - Fork 31
Babel 7 + monorepo #100
Comments
Hmm.. I wonder if this is because the eslint config is not in the same directory as the babel config. You could try to play with the |
I tried both Also tried to make the root |
I'd try to see the output of these lines in your case. Maybe you can find what needs to be fixed. I never tried to setup the plugin in a monorepo, so it might as well be a valid issue ;) |
Yes, the babel plugin itself runs as expected - resolves the aliases and transpiles the code. Only the ESlint has this issue. Ok, I'll try to look into this later. |
It affects my monorepo setup, i now get warnings every time i run eslint. Is there any chance to resolve this anytime soon? |
Passes the correct cwd to babel's OptionManager to determine the babelrc location. Fixes #100
I still get the eslint error despite the fix commit. Can you provide a more specific example so that I can follow? What I did is that I add : ./projects/ui/.babelrc
./.eslintrc
and I still get
The babel-module-resolver work well but this lint error is like an annoying itch |
The minimal setup would be something like this:
{
"plugins": [
["module-resolver", {
"alias": {
"~": "./src"
}
}]
]
}
{
"parser": "babel-eslint",
"settings": {
"import/resolver": {
"babel-module": {}
}
}
} (the |
After updating to babel 7 in our monorepo project, I noticed that running ESlint from root directory the aliases fail. Thought running ESlint from the
./packages/my-lib
it validates as expected.(The code runs and transpiles via babel fine)
Dependencies:
Also
yarn - 1.13.0
and"lerna": "^3.10.6",
<project-root>/.eslintrc.json
:<project-root>/packages/my-lib/.babelrc
:The error:
Unable to resolve path to module '~/app/constants' import/no-unresolved
I'd be happy to submit a MR if someone would provide a hint :)
The text was updated successfully, but these errors were encountered: