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

handling for spec/loose default changes for template literals and class properties #47

Closed
wants to merge 2 commits into from
Closed

Conversation

noahlemen
Copy link
Member

@noahlemen noahlemen commented Mar 2, 2018

as discussed in #10

attempts to transform options for @babel/plugin-transform-template-literals and @babel/plugin-proposal-class-properties:

  • if provided without options, adds loose: true
  • if provided with spec: true, removes spec flag and does not add loose

currently, this logs to the console in any instance where these plugins were not explicitly included in config

only handles spec for old template literals transform -- should it do anything with the old loose flag as well?

after working in this file a bit, i've got some ideas for refactors, but i'll do that in a separate PR if i find the time

} else {
plugins.splice(i, 1);
i--;
}
}
} else {
if (plugin.indexOf('babel-plugin') !== 0 && plugin[0].indexOf('@babel/') !== 0) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plugin[0].indexOf looked like a bug -- was preventing @babel/ prefixes from being recognized correctly

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

submitting this as a separate PR with updated tests in #48

@noahlemen
Copy link
Member Author

noahlemen commented Mar 3, 2018

submitted said refactor in #50, will need to rebase this PR on that if it gets merged

@noahlemen
Copy link
Member Author

closing this for now, have some ideas for a new approach i want to play with

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.

1 participant