File tree Expand file tree Collapse file tree 1 file changed +0
-36
lines changed Expand file tree Collapse file tree 1 file changed +0
-36
lines changed Original file line number Diff line number Diff line change 1
- export function getFilename ( context ) {
2
- if ( 'filename' in context ) {
3
- return context . filename ;
4
- }
5
-
6
- return context . getFilename ( ) ;
7
- }
8
-
9
- export function getPhysicalFilename ( context ) {
10
- if ( context . getPhysicalFilename ) {
11
- return context . getPhysicalFilename ( ) ;
12
- }
13
-
14
- return getFilename ( context ) ;
15
- }
16
-
17
1
export function getSourceCode ( context ) {
18
2
if ( 'sourceCode' in context ) {
19
3
return context . sourceCode ;
@@ -31,23 +15,3 @@ export function getScope(context, node) {
31
15
32
16
return context . getScope ( ) ;
33
17
}
34
-
35
- export function getAncestors ( context , node ) {
36
- const sourceCode = getSourceCode ( context ) ;
37
-
38
- if ( sourceCode && sourceCode . getAncestors ) {
39
- return sourceCode . getAncestors ( node ) ;
40
- }
41
-
42
- return context . getAncestors ( ) ;
43
- }
44
-
45
- export function getDeclaredVariables ( context , node ) {
46
- const sourceCode = getSourceCode ( context ) ;
47
-
48
- if ( sourceCode && sourceCode . getDeclaredVariables ) {
49
- return sourceCode . getDeclaredVariables ( node ) ;
50
- }
51
-
52
- return context . getDeclaredVariables ( node ) ;
53
- }
You can’t perform that action at this time.
0 commit comments