File tree Expand file tree Collapse file tree 1 file changed +1
-20
lines changed Expand file tree Collapse file tree 1 file changed +1
-20
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import type {
8
8
import type { ESLintProgram , Token } from "../src/ast"
9
9
import type { ParserOptions } from "../src/common/parser-options"
10
10
import * as escope from "eslint-scope"
11
+ import { getFallbackKeys } from "../src/ast"
11
12
12
13
/**
13
14
* Remove `parent` properties from the given AST.
@@ -128,24 +129,4 @@ export function analyze(
128
129
} )
129
130
130
131
return result
131
-
132
- function getFallbackKeys ( node : any ) {
133
- return Object . keys ( node ) . filter ( fallbackKeysFilter , node )
134
- }
135
-
136
- function fallbackKeysFilter ( key : string ) {
137
- const value = null
138
- return (
139
- key !== "comments" &&
140
- key !== "leadingComments" &&
141
- key !== "loc" &&
142
- key !== "parent" &&
143
- key !== "range" &&
144
- key !== "tokens" &&
145
- key !== "trailingComments" &&
146
- typeof value === "object" &&
147
- // @ts -expect-error -- ignore
148
- ( typeof value . type === "string" || Array . isArray ( value ) )
149
- )
150
- }
151
132
}
You can’t perform that action at this time.
0 commit comments