mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Merge pull request #18622 from asgerf/js/typescript-tsconfig-names
JS: Treat more file patterns as tsconfig-like files
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
export function main(foo: string) {
|
||||
let x = foo;
|
||||
console.log(x);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
types
|
||||
| (...data: any[]) => void |
|
||||
| (foo: string) => void |
|
||||
| Console |
|
||||
| any |
|
||||
| any[] |
|
||||
| string |
|
||||
| void |
|
||||
jsonFiles
|
||||
@@ -0,0 +1,5 @@
|
||||
import javascript
|
||||
|
||||
query predicate types(Type type) { any() }
|
||||
|
||||
query predicate jsonFiles(File file) { file.getExtension() = "json" }
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"include": [
|
||||
"src"
|
||||
],
|
||||
"compilerOptions": {
|
||||
"composite": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"include": [],
|
||||
"files": [],
|
||||
"references": [
|
||||
{ "path": "./tsconfig.foo.json" },
|
||||
],
|
||||
}
|
||||
Reference in New Issue
Block a user