File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ class BooleanTriviaWalker extends Lint.RuleWalker {
1818
1919 visitCallExpression ( node : ts . CallExpression ) {
2020 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 ) ) {
2222 const targetCallSignature = this . checker . getResolvedSignature ( node ) ;
2323 if ( ! ! targetCallSignature ) {
2424 const targetParameters = targetCallSignature . getParameters ( ) ;
Original file line number Diff line number Diff line change @@ -267,6 +267,9 @@ namespace ts {
267267 // find the child that contains 'position'
268268 for ( let i = 0 , n = current . getChildCount ( sourceFile ) ; i < n ; i ++ ) {
269269 const child = current . getChildAt ( i ) ;
270+ if ( position < child . getFullStart ( ) || position > child . getEnd ( ) ) {
271+ continue ;
272+ }
270273 const start = allowPositionInLeadingTrivia ? child . getFullStart ( ) : child . getStart ( sourceFile ) ;
271274 if ( start <= position ) {
272275 const end = child . getEnd ( ) ;
You can’t perform that action at this time.
0 commit comments