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

Update babel parser options #4688

Merged
merged 2 commits into from Oct 7, 2016
Merged

Conversation

existentialism
Copy link
Member

Q A
Bug fix? yes
Breaking change? no
New feature? no
Deprecations? no
Spec compliancy? no
Tests added/pass? yes
Fixed tickets #4571
License MIT
Doc PR --

Should we also support strictMode (noted as TODO in https://github.com/babel/babylon/blob/master/src/options.js#L27)?

@codecov-io
Copy link

codecov-io commented Oct 6, 2016

Current coverage is 88.83% (diff: 100%)

Merging #4688 into master will not change coverage

@@             master      #4688   diff @@
==========================================
  Files           195        195          
  Lines         13794      13794          
  Methods        1427       1427          
  Messages          0          0          
  Branches       3176       3176          
==========================================
  Hits          12254      12254          
  Misses         1540       1540          
  Partials          0          0          

Powered by Codecov. Last update 33eb56a...cbb25a7

Copy link
Member

@danez danez left a comment

Choose a reason for hiding this comment

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

Thanks. I added one comment that I'm not sure about

plugins: []
allowImportExportEverywhere: this.opts.allowImportExportEverywhere,
allowReturnOutsideFunction: this.opts.allowReturnOutsideFunction,
allowSuperOutsideMethod: this.opts.allowSuperOutsideMethod,
Copy link
Member

@danez danez Oct 7, 2016

Choose a reason for hiding this comment

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

did you try if you can set this options? I think that the OptionsManager would throw an Error when trying to set these options in e.g babel.transform(code, { allowImportExportEverywhere: true }) because it does not know the options. So maybe we should only set sourceType, sourceFilename and plugins here because the rest of the options could now be set via the new parserOpts option anyway. https://github.com/babel/babel/blob/master/CHANGELOG.md#rocket-new-feature-1

Copy link
Member

Choose a reason for hiding this comment

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

Same also applies for the strictMode I think.

Copy link
Member Author

Choose a reason for hiding this comment

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

You're right, not sure why I thought it worked before. Updated!

Copy link
Member

Choose a reason for hiding this comment

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

Yep I was going to mention that too - if there are invalid might as well not use them and get everyone to use parserOpts instead

@danez danez added the PR: Polish 💅 A type of pull request used for our changelog categories label Oct 7, 2016
sourceType?: "module" | "script";
filename?: string;
features?: Object;
plugins?: Object;
Copy link
Member

Choose a reason for hiding this comment

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

I guess plugins is an Array here - Array<Object>?

@hzoo hzoo merged commit 0aa3ac2 into babel:master Oct 7, 2016
@existentialism existentialism deleted the babylon-parser-opts branch December 3, 2016 18:59
panagosg7 pushed a commit to panagosg7/babel that referenced this pull request Jan 17, 2017
* Update babel parser options
@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 PR: Polish 💅 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants