-
-
Notifications
You must be signed in to change notification settings - Fork 209
Allow eslint to define the babylon plugins #523
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great start, but what I really need is to read my babelrc and use the plugins list from there
Yeah, I think there's a path forward there. If we land babel/babel#6332 and add a |
I agree with @ljharb. Since parser plugins aren't configurable by the user, I don't think we should force users to keep track of this configuration for themselves. I'm going to try to find some time to look into this. |
WIP PR is open here: #711 All feedback welcome :) |
#711 has now landed |
Going to close since ^ landed! |
Fixes: eslint/eslint#7534 Stage 3 Proposal: https://github.com/tc39/proposal-class-fields Babel plugin: https://babeljs.io/docs/en/babel-plugin-proposal-class-properties This does not yet support private class properties yet as that would require upgrading to babel-eslint@^11 which would require a bunch of other changes. See: babel/babel-eslint#523
Fixes: eslint/eslint#7534 Stage 3 Proposal: https://github.com/tc39/proposal-class-fields Babel plugin: https://babeljs.io/docs/en/babel-plugin-proposal-class-properties This does not yet support private class properties yet as that would require upgrading to babel-eslint@^11 which would require a bunch of other changes. See: babel/babel-eslint#523
If you want to use
babel-eslint
, currently that means opting into every syntax feature that babylon offers. This allows you to provide your own array of babylon plugins in the eslintparserOptions
. For us, this will allow us to enable stage-3 syntax features, but still make things like do-expressions a syntax error. If you don't define plugins, it'll default to enabling them all.