-
-
Notifications
You must be signed in to change notification settings - Fork 209
Conversation
969f3d9
to
8ac09b7
Compare
149e643
to
038f828
Compare
038f828
to
133f838
Compare
For anyone coming across this - I'm just waiting for babel/babel#8986 to be merged and released to finish this up. |
@kaicataldo it is merged 💯 |
@sibelius @kaicataldo And it is released https://github.com/babel/babel/releases/tag/v7.2.0 👍 |
Planning to pick this up again this week. Here's an interesting edge case that I don't think was considered with this change: eslint/eslint#11189 (comment). Thoughts? |
I don’t think it’s reasonable to be concerned with a flagged, experimental feature in node that is still highly subject to a lot of change; nor do i think babel-eslint needs to be concerned with non-babel-users. |
I agree with @ljharb here 👍 |
I can't tell from the PR. Is there a way to configure the location of the babel configuration as one of the |
382e29c
to
7a97f15
Compare
@kentcdodds This was discussed elsewhere (trying to find it and am failing - might've been on Slack 😅) and I hadn't gotten around to it yet. Added here. This was also useful for testing! |
c99c3ae
to
d781b53
Compare
This is ready for review/discussion. I'd love to figure out how to make these tests easier to manage, but I think the implementation here is reasonable and we can iterate in the future. Let me know how you feel. Would also love to get the team's feelings about throwing when the required version of
Edit: Looks like it's working now. I was missing passing through the filename that's now required since babel.config.js allows for overrides. |
dd5cd20
to
a342401
Compare
Great! Will make some issues for us to discuss. Thanks for the input, everyone - it's been super helpful 👍 |
Issue to discuss how to handle missing config files here: #738 I'm not going to make an issue for my first question because I now think the current behavior is the best way to go. Feel free to comment if you disagree though. |
The README changes added here implies this change has already been released (or that is me optimistically reading into the description). Are these changes published anywhere? |
It hasn't been released yet. We just decided on a path forward for this last issue today and, pending landing that, we should be able to get a release out! |
Published these changes as |
What if I have no |
@the-spyke Hey, not sure I understand - how would you be using a custom preset without a .babelrc file? |
@kaicataldo Often you manually pass options to |
When using [email protected] I got this error -> Parsing error: params is not iterable |
@hadnet Please create a new issue. Thanks! |
@kaicataldo I think somebody already did it (#749) |
Hi, I'm late to the party here, but we have a setup where we have tools that read our babel config from a custom file which is outside of the babel config file process, kind of akin to a custom preset as mentioned by @the-spyke. Could we please add support in version
If I'm not mistaken, this should be a fairly simple change to make and I'd be willing to attempt a PR. This would still allow the babel config to be custom specified, but just takes away the requirement that a babel config file has to exist in a specific location/format. |
When will it be released as stable??? |
refs #573
This PR updates babel-eslint to require
@babel/core
as a peer dependency and to use the user's Babel configuration when parsing files for ESLint. Up until now, babel-eslint has manually enabled all plugins (with the list falling out of date frequently). It also meant that babel-eslint could parse syntax that a configured instance of Babel itself didn't allow at compile time.This change makes it so that the same Babel configuration is used for the parser both for linting and for compilation, and should eliminate a whole class of bugs as well as give the end user more fine-grained control over what the parser can and cannot parse.
Note that this is a breaking change, as using babel-eslint will now require
@babel/core@>=7.2.0
and a valid Babel configuration file to run (see #711 (comment) for some discussion around this).