File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
javascript/ql/lib/semmle/javascript/frameworks Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 33 */
44
55import javascript
6+ private import semmle.javascript.internal.paths.PathMapping
67
78module Babel {
89 /**
@@ -138,7 +139,7 @@ module Babel {
138139 /**
139140 * An import path expression that may be transformed by `babel-plugin-root-import`.
140141 */
141- private class BabelRootTransformedPathExpr extends PathExpr , Expr {
142+ deprecated private class BabelRootTransformedPathExpr extends PathExpr , Expr {
142143 RootImportConfig plugin ;
143144 string prefix ;
144145 string mappedPrefix ;
@@ -166,7 +167,7 @@ module Babel {
166167 /**
167168 * An import path transformed by `babel-plugin-root-import`.
168169 */
169- private class BabelRootTransformedPath extends PathString {
170+ deprecated private class BabelRootTransformedPath extends PathString {
170171 BabelRootTransformedPathExpr pathExpr ;
171172
172173 BabelRootTransformedPath ( ) { this = pathExpr .getValue ( ) }
@@ -202,4 +203,12 @@ module Babel {
202203 )
203204 }
204205 }
206+
207+ private class BabelPathMapping extends PathMapping , RootImportConfig {
208+ override File getAnAffectedFile ( ) { result = this .getConfig ( ) .getAContainerInScope ( ) }
209+
210+ override predicate hasPrefixPathMapping ( string pattern , Container newContext , string newPath ) {
211+ newPath = this .getRoot ( pattern ) and newContext = this .getFolder ( )
212+ }
213+ }
205214}
You can’t perform that action at this time.
0 commit comments