Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QUA-517: add multiple babel plugins (eslint-8) #578

Closed

Conversation

dantevvp
Copy link
Contributor

This PR installs the following babel plugins to the eslint-8 channel:

  • babel-plugin-macros
  • @babel/preset-typescript
  • @babel/plugin-proposal-optional-chaining
  • @babel/plugin-syntax-dynamic-import
  • @babel/plugin-transform-destructuring
  • @babel/plugin-proposal-class-properties
  • @babel/plugin-proposal-private-methods
  • @babel/plugin-proposal-private-property-in-object
  • @babel/plugin-proposal-object-rest-spread
  • @babel/plugin-transform-regenerator

https://codeclimate.atlassian.net/browse/QUA-517

@dantevvp dantevvp requested review from a team, f-moya and camillof and removed request for a team June 13, 2022 18:41
@camillof
Copy link

camillof commented Jun 14, 2022

Lot of questions over here, this is a new world for me:

  • Not sure which criteria do we use to bump the version here but may be a good opportunity to do it? 🤔
  • In the description the babel-plugin-macros is listed as added, is it actually?

And I would also like to bring up this comment in the original issue: #567 (comment)

Ah. I see the problem. Our lead developer is requiring individual plugins from @babel/preset-env in the process of specifying the babel configuration.
This appears to be the issues he is trying to resolve:
Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-property-in-object since the "loose" mode option was set to "true" for @babel/plugin-proposal-private-methods.
Is it possible to make Codeclimate not choke when individual plugins are required that are included in @babel/preset-env?

Is this issue solved just by adding the plugin-proposal-private-methods ? According to the official docs it's already included on @babel/preset-env, which is the benefit of adding it explicitly? Don't we need to specify the loose option?

  • wouldn't using the include option in preset-env have the same effect?

Sorry if there are too many questions!

@dantevvp
Copy link
Contributor Author

Lot of questions over here, this is a new world for me:
...

@camillof I added babel-plugin-macros and it looks like another plugin was suggested in place for the other ones I added here, so I'll analyze adding babel-plugin-transform-react-remove-prop-types.

Regarding the "loose" warning, it looks like it's solved by adding only plugin-proposal-private-methods like you're saying, so I'll be trying that out

@dantevvp
Copy link
Contributor Author

Closing this in favor of #579

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants