Skip to content

[WIP] deprecates unnamed plugins and adds error message#5827

Closed
MarckK wants to merge 1 commit intobabel:6.xfrom
MarckK:deprecate-nameless-plugins
Closed

[WIP] deprecates unnamed plugins and adds error message#5827
MarckK wants to merge 1 commit intobabel:6.xfrom
MarckK:deprecate-nameless-plugins

Conversation

@MarckK
Copy link
Copy Markdown
Member

@MarckK MarckK commented Jun 6, 2017

Q A
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Deprecations? yes
Spec Compliancy?
Tests Added/Pass?
Fixed Tickets #5735
License MIT
Doc PR
Dependency Changes

Deprecates unnamed plugins and adds a deprecation message to Babel 6. Enables us to disallow nameless plugins in Babel 7.

TODO:

  • Create deprecation guide on the Babel website.
  • Write deprecation guide for nameless plugins.
  • Convince @hzoo that requiring plugin names is a good thing.
  • Create PR for Babel 7 that throws an error instead of a deprecation.

let specifiedName = this.take("name");

// List of invalid names.
if ([undefined, null, false].indexOf(specifiedName) !== -1) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just curious, wouldn't it be easier just to check the truthy value of specifiedName?

something like if (specifiedName) { doThis(); } ? Is there any specific advantage to looking for specifically those values that are in the array?

@MarckK MarckK closed this Jul 13, 2017
@MarckK MarckK deleted the deprecate-nameless-plugins branch July 19, 2017 11:19
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 6, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants