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

Throw errors for invalid TSEmptyBodyFunctionExpression node #12982

Merged
merged 6 commits into from Jun 14, 2022

Conversation

fisker
Copy link
Sponsor Member

@fisker fisker commented Jun 6, 2022

Description

Fixes #12963

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

throwErrorForInvalidDecorator(tsNode, esTreeNode, tsNodeToESTreeNodeMap);
throwErrorForInvalidAbstractProperty(tsNode, esTreeNode);
});
}

module.exports = { throwErrorForInvalidNodes };
module.exports = { throwErrorForInvalidNodes, throwSyntaxError };
Copy link
Member

Choose a reason for hiding this comment

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

Can we move throwSyntaxError to other file like a parse/postprocess/throw-syntax-error.js?

throwErrorForInvalidDecorator(tsNode, esTreeNode, tsNodeToESTreeNodeMap);
throwErrorForInvalidAbstractProperty(tsNode, esTreeNode);
});
}

module.exports = { throwErrorForInvalidNodes };
module.exports = { throwErrorForInvalidNodes, throwSyntaxError };
Copy link
Member

Choose a reason for hiding this comment

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

Can we move throwSyntaxError to other file like a parse/postprocess/throw-syntax-error.js?

@fisker fisker merged commit d2bcaea into prettier:main Jun 14, 2022
@fisker fisker deleted the ts-empty-body-function branch June 14, 2022 04:33
medikoo pushed a commit to medikoo/prettier-elastic that referenced this pull request Jan 4, 2024
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.

Prettier parses ({ methodName() }) incorrectly
2 participants