Issue correct completions in 'as' operator#5019
Conversation
There was a problem hiding this comment.
Would be nice if our linter told us about side effect-free statements!
There was a problem hiding this comment.
no-unused-expression - I'll add it.
There was a problem hiding this comment.
Actually we use this pattern in the checker to short-circuit error reporting. Also, apparently the services sources aren't linted?
There was a problem hiding this comment.
Actually we use this pattern in the checker to short-circuit error reporting
What's an example of this? Just curious
There was a problem hiding this comment.
// Grammar checking; stop grammar-checking if checkGrammarTypeArguments return true
checkGrammarTypeArguments(node, node.typeArguments) || checkGrammarArguments(node, node.arguments);There was a problem hiding this comment.
That should be fine -- I want a rule that says every expression statement must contain a function call or assignment operation.
There was a problem hiding this comment.
@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.
|
👍 |
Issue correct completions in 'as' operator
Fixes #4731