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

Add asyncToGenerator to the babelHelper #22058

Closed
wants to merge 3 commits into from
Closed

Add asyncToGenerator to the babelHelper #22058

wants to merge 3 commits into from

Conversation

nicholaslee119
Copy link
Contributor

This is an existing problem which is discussed in this issue

Release Notes:

Help reviewers and the release process by writing your own release notes. See below for an example.

[GENERAL] [ENHANCEMENT] [Polyfills] - Add asyncToGenerator to the babelHelper

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 1, 2018
Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

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

Code analysis results:

  • eslint found some issues.

// ### asyncToGenerator ###

function _asyncToGenerator(fn) {
return function () {

Choose a reason for hiding this comment

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

prettier/prettier: Delete ·

function _asyncToGenerator(fn) {
return function () {
var gen = fn.apply(this, arguments);
return new Promise(function (resolve, reject) {

Choose a reason for hiding this comment

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

prettier/prettier: Delete ·

if (info.done) {
resolve(value);
} else {
return Promise.resolve(value).then(function (value) {

Choose a reason for hiding this comment

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

prettier/prettier: Replace function· with ⏎············function

if (info.done) {
resolve(value);
} else {
return Promise.resolve(value).then(function (value) {

Choose a reason for hiding this comment

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

no-shadow: 'value' is already declared in the upper scope.

resolve(value);
} else {
return Promise.resolve(value).then(function (value) {
step('next', value);

Choose a reason for hiding this comment

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

prettier/prettier: Insert ··

} else {
return Promise.resolve(value).then(function (value) {
step('next', value);
}, function (err) {

Choose a reason for hiding this comment

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

prettier/prettier: Replace },·function· with ··},⏎············function

return Promise.resolve(value).then(function (value) {
step('next', value);
}, function (err) {
step('throw', err);

Choose a reason for hiding this comment

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

prettier/prettier: Insert ··

step('next', value);
}, function (err) {
step('throw', err);
});

Choose a reason for hiding this comment

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

prettier/prettier: Replace } with ··},⏎··········

return step('next');
});
};
};

Choose a reason for hiding this comment

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

no-extra-semi: Unnecessary semicolon.

return step('next');
});
};
};

Choose a reason for hiding this comment

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

prettier/prettier: Delete ;

@pull-bot
Copy link

pull-bot commented Nov 1, 2018

Warnings
⚠️

📋 Test Plan - This PR appears to be missing a Test Plan.

Generated by 🚫 dangerJS

Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

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

Code analysis results:

  • eslint found some issues.

}

if (info.done) {
resolve(value);

Choose a reason for hiding this comment

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

no-shadow: 'value' is already declared in the upper scope.

@newyankeecodeshop
Copy link
Contributor

I don't think this is necessary now that RN 0.57 uses the babel runtime instead of the helpers in this file. See #21283.

@cpojer
Copy link
Contributor

cpojer commented Feb 4, 2019

Closing as per the last comment, agree this shouldn't be necessary.

@cpojer cpojer closed this Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants