Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

no-parameter-properties: Rewrite to walker function #2663

Merged
merged 2 commits into from
May 24, 2017
Merged

no-parameter-properties: Rewrite to walker function #2663

merged 2 commits into from
May 24, 2017

Conversation

ajafff
Copy link
Contributor

@ajafff ajafff commented May 2, 2017

PR checklist

  • Addresses an existing issue: #0000
  • New feature, bugfix, or enhancement
    • Includes tests
  • Documentation update

Overview of change:

Is there anything you'd like reviewers to focus on?

CHANGELOG.md entry:

[no-log] just refactoring

if (isParameterProperty(parameter)) {
ctx.addFailure(parameter.getStart(ctx.sourceFile),
parameter.name.pos,
Rule.FAILURE_STRING_FACTORY((parameter.name as ts.Identifier).text));
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Use parameter.name.getText() to avoid crashing on a grammar error.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it wouldn't crash, it would just result in undefined. Anyways, I fixed it and added a test to ensure it works

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants