Skip to content

Commit 8dd4d35

Browse files
committed
JS: use tsconfig root dir in JSPaths
1 parent 8239611 commit 8dd4d35

File tree

1 file changed

+2
-6
lines changed
  • javascript/ql/lib/semmle/javascript/internal/paths

1 file changed

+2
-6
lines changed

javascript/ql/lib/semmle/javascript/internal/paths/JSPaths.qll

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,11 @@ module JSPaths {
4343
//
4444
// { include: ["foo"], compilerOptions: { outDir: "./bar" }}
4545
//
46-
exists(TSConfig tsconfig, Container includeTarget |
46+
exists(TSConfig tsconfig |
4747
name =
4848
tsconfig.getCompilerOptions().getPropStringValue("outDir").regexpReplaceAll("^\\./", "") and
4949
base = tsconfig.getFolder() and
50-
includeTarget = tsconfig.getAnIncludePathTarget()
51-
|
52-
result = includeTarget.(Folder)
53-
or
54-
result = includeTarget.(File).getParentContainer()
50+
result = tsconfig.getEffectiveRootDir()
5551
)
5652
or
5753
// Heuristic version of the above based on commonly used source and build folder names

0 commit comments

Comments
 (0)