Skip to content

Commit ac0c075

Browse files
committed
Modern tsconfig setup #11812
Copied from a brand new Angular app
1 parent 805d3c1 commit ac0c075

4 files changed

Lines changed: 17 additions & 9 deletions

File tree

client/tsconfig.app.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"extends": "../tsconfig.json",
33
"compilerOptions": {
44
"outDir": "../out-tsc/app",
5-
"types": ["node"]
5+
"types": []
66
},
7-
"files": ["main.ts"],
8-
"include": ["**/*.d.ts"]
7+
"include": ["./**/*.ts"],
8+
"exclude": ["./**/*.spec.ts"]
99
}

client/tsconfig.spec.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
"extends": "../tsconfig.json",
33
"compilerOptions": {
44
"outDir": "../out-tsc/spec",
5-
"types": ["jasmine", "node", "@angular/localize"],
6-
"skipLibCheck": true
5+
"types": ["jasmine"]
76
},
8-
"include": ["**/*.spec.ts", "**/*.d.ts"]
7+
"include": ["./**/*.ts"]
98
}

e2e/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* To learn more about this file see: https://angular.io/config/tsconfig. */
21
{
3-
"extends": "../tsconfig.json"
2+
"extends": "../tsconfig.json",
3+
"include": ["./**/*.ts"]
44
}

tsconfig.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,14 @@
3232
}
3333
},
3434
// Otherwise, eslint parses our temp files and crashes, see https://github.com/typescript-eslint/typescript-eslint/issues/1192
35-
"exclude": ["data/", "htdocs/"]
35+
"exclude": ["data/", "htdocs/"],
36+
"files": [],
37+
"references": [
38+
{
39+
"path": "./client/tsconfig.app.json"
40+
},
41+
{
42+
"path": "./client/tsconfig.spec.json"
43+
}
44+
]
3645
}

0 commit comments

Comments
 (0)