tleunen / eslint-import-resolver-babel-module

Custom eslint resolve for babel-plugin-module-resolver
https://github.com/tleunen/babel-plugin-module-resolver
MIT License
248 stars 31 forks source link

Update plugin key name - improved #76

Closed fatfisz closed 6 years ago

fatfisz commented 6 years ago

This is a continuation of #75 that contains a compat change for babel-core 7.0.0-beta.3.

fatfisz commented 6 years ago

@tleunen Hi, do you think you'll have time to check it out this week?

tleunen commented 6 years ago

Yep definitely. Will do later today. I'm free this weekend :) But it will be a bit more complicated since we'll probably need to manage both babel-* and @babel/* packages since v6 uses the first syntax and v7 the new one :/

tleunen commented 6 years ago

So I pushed a commit. I removed babel 6 completely and decided to set @babel/core as a direct dependency, so we can be sure to use the one we want.

fatfisz commented 6 years ago

Shouldn't we preserve compatibility with Babel 6? We could soft-deprecate for now and deprecate completely in the next major version.

I see that the tests are not passing, will look into that after work today.

tleunen commented 6 years ago

Because I moved Babel core as a direct dependency, Babel 6 is not really needed anymore.

Yep I noticed it for the tests. I must have used the wrong plugin for the spread operator. Will fix it

tleunen commented 6 years ago

So we cannot really use babel 7 internally because jest is still using babel 6. So when running the tests, it fails because we go from babel-core to @babel/* packages and they are not compatible.

So we can only revert everything related to babel 7 for the testing, and hope it works fine I guess :/

TypeError: Cannot read property 'useBuiltIns' of undefined

      at _default (node_modules/@babel/plugin-proposal-object-rest-spread/lib/index.js:13:31)
      at Function.memoisePluginContainer (node_modules/babel-core/lib/transformation/file/options/option-manager.js:113:13)
      at Function.normalisePlugin (node_modules/babel-core/lib/transformation/file/options/option-manager.js:146:32)
fatfisz commented 6 years ago

Oops 😛 If the internals are that incompatible, then there's nothing we can do. We can always drop the support in the next major release 🙂

tleunen commented 6 years ago

Closing in favor of #78