Update linting to avoid typechecking for booleanTriviaRule#15021
Merged
Conversation
ajafff
reviewed
Apr 5, 2017
|
|
||
| const targetCallSignature = checker.getResolvedSignature(node); | ||
| if (!targetCallSignature) { | ||
| if (!node.arguments) { |
Contributor
There was a problem hiding this comment.
Is it possible for CallExpression.arguments to ever be undefined?
As long as you don't handle NewExpression here you shouldn't need to worry about undefined.
ghost
reviewed
Apr 5, 2017
| // trigger synchronization to make sure that LSHost will try to find 'f2' module on disk | ||
| project.getLanguageService().getSemanticDiagnostics(imported.name); | ||
| assert.isTrue(false, `should not find file '${imported.name}'`); | ||
| assert.fail(false, `should not find file '${imported.name}'`); |
There was a problem hiding this comment.
assert.fail takes actual and expected as parameters. Doesn't seem like there's an overload that just takes a message. assert(false, msg) is probably best.
sandersn
approved these changes
Apr 5, 2017
Member
sandersn
left a comment
There was a problem hiding this comment.
Typescript you say? Why not named arguments?
🦀 👽
| } | ||
|
|
||
| public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] { | ||
| // Cheat to get type checker |
Member
There was a problem hiding this comment.
I don't think we're cheating OR getting a type checker any more.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I fell down a bit of a rabbit hole! 🐇
Our boolean trivia rule was... interesting
masterversion of TS LintSo given all these things, the new boolean trivia rule
As well I fixed all the lint errors that the next version of TS Lint will give us on release since I was
npm link'd anyway