File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ class BooleanTriviaWalker extends Lint.RuleWalker {
18
18
19
19
visitCallExpression ( node : ts . CallExpression ) {
20
20
super . visitCallExpression ( node ) ;
21
- if ( node . arguments ) {
21
+ if ( node . arguments && node . arguments . some ( arg => arg . kind === ts . SyntaxKind . TrueKeyword || arg . kind === ts . SyntaxKind . FalseKeyword ) ) {
22
22
const targetCallSignature = this . checker . getResolvedSignature ( node ) ;
23
23
if ( ! ! targetCallSignature ) {
24
24
const targetParameters = targetCallSignature . getParameters ( ) ;
Original file line number Diff line number Diff line change @@ -267,6 +267,9 @@ namespace ts {
267
267
// find the child that contains 'position'
268
268
for ( let i = 0 , n = current . getChildCount ( sourceFile ) ; i < n ; i ++ ) {
269
269
const child = current . getChildAt ( i ) ;
270
+ if ( position < child . getFullStart ( ) || position > child . getEnd ( ) ) {
271
+ continue ;
272
+ }
270
273
const start = allowPositionInLeadingTrivia ? child . getFullStart ( ) : child . getStart ( sourceFile ) ;
271
274
if ( start <= position ) {
272
275
const end = child . getEnd ( ) ;
You can’t perform that action at this time.
0 commit comments