Skip to content

Issue correct completions in 'as' operator#5019

Merged
RyanCavanaugh merged 1 commit into
microsoft:masterfrom
RyanCavanaugh:fix4731
Sep 30, 2015
Merged

Issue correct completions in 'as' operator#5019
RyanCavanaugh merged 1 commit into
microsoft:masterfrom
RyanCavanaugh:fix4731

Conversation

@RyanCavanaugh

Copy link
Copy Markdown
Member

Fixes #4731

Comment thread src/services/services.ts

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Would be nice if our linter told us about side effect-free statements!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

no-unused-expression - I'll add it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Actually we use this pattern in the checker to short-circuit error reporting. Also, apparently the services sources aren't linted?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Actually we use this pattern in the checker to short-circuit error reporting

What's an example of this? Just curious

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

// Grammar checking; stop grammar-checking if checkGrammarTypeArguments return true
checkGrammarTypeArguments(node, node.typeArguments) || checkGrammarArguments(node, node.arguments);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That should be fine -- I want a rule that says every expression statement must contain a function call or assignment operation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@DanielRosenwasser Yeah I tried that rule and it wasn't usable with some of our patterns. And yeah services is not linted because I didn't turn on linting for any files I didn't clean up yet.

@DanielRosenwasser

Copy link
Copy Markdown
Member

👍

RyanCavanaugh added a commit that referenced this pull request Sep 30, 2015
Issue correct completions in 'as' operator
@RyanCavanaugh RyanCavanaugh merged commit a4db4be into microsoft:master Sep 30, 2015
@RyanCavanaugh RyanCavanaugh deleted the fix4731 branch September 30, 2015 20:11
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
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.

4 participants