File tree 2 files changed +3
-35
lines changed
2 files changed +3
-35
lines changed Original file line number Diff line number Diff line change 77
77
"ts-node" : " latest" ,
78
78
"tsd" : " latest" ,
79
79
"tslint" : " next" ,
80
- "typescript" : " 2.1.0-dev.20160906 "
80
+ "typescript" : " next "
81
81
},
82
82
"scripts" : {
83
83
"pretest" : " jake tests" ,
Original file line number Diff line number Diff line change @@ -9,44 +9,12 @@ export class Rule extends Lint.Rules.AbstractRule {
9
9
}
10
10
}
11
11
12
- function isBindingPattern ( node : ts . Node ) : node is ts . BindingPattern {
13
- return ! ! node && ( node . kind === ts . SyntaxKind . ArrayBindingPattern || node . kind === ts . SyntaxKind . ObjectBindingPattern ) ;
14
- }
15
-
16
- function walkUpBindingElementsAndPatterns ( node : ts . Node ) : ts . Node {
17
- while ( node && ( node . kind === ts . SyntaxKind . BindingElement || isBindingPattern ( node ) ) ) {
18
- node = node . parent ;
19
- }
20
-
21
- return node ;
22
- }
23
-
24
- function getCombinedNodeFlags ( node : ts . Node ) : ts . NodeFlags {
25
- node = walkUpBindingElementsAndPatterns ( node ) ;
26
-
27
- let flags = node . flags ;
28
- if ( node . kind === ts . SyntaxKind . VariableDeclaration ) {
29
- node = node . parent ;
30
- }
31
-
32
- if ( node && node . kind === ts . SyntaxKind . VariableDeclarationList ) {
33
- flags |= node . flags ;
34
- node = node . parent ;
35
- }
36
-
37
- if ( node && node . kind === ts . SyntaxKind . VariableStatement ) {
38
- flags |= node . flags ;
39
- }
40
-
41
- return flags ;
42
- }
43
-
44
12
function isLet ( node : ts . Node ) {
45
- return ! ! ( getCombinedNodeFlags ( node ) & ts . NodeFlags . Let ) ;
13
+ return ! ! ( ts . getCombinedNodeFlags ( node ) & ts . NodeFlags . Let ) ;
46
14
}
47
15
48
16
function isExported ( node : ts . Node ) {
49
- return ! ! ( getCombinedNodeFlags ( node ) & ts . NodeFlags . Export ) ;
17
+ return ! ! ( ts . getCombinedModifierFlags ( node ) & ts . ModifierFlags . Export ) ;
50
18
}
51
19
52
20
function isAssignmentOperator ( token : ts . SyntaxKind ) : boolean {
You can’t perform that action at this time.
0 commit comments