Skip to content

Commit

Permalink
Target ES2022 as is done in Angular 17 new projects (#1802)
Browse files Browse the repository at this point in the history
* Target ES2022 as is done in Angular 17 new projects

* Centralize tsconfig

To avoid duplicates and make it easier to see if we are synced with
Angular default values
  • Loading branch information
PowerKiKi authored Jan 31, 2024
1 parent b945381 commit e67c9cc
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 61 deletions.
23 changes: 2 additions & 21 deletions apps/ng2-charts-demo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
{
"compilerOptions": {
"target": "es2022",
"useDefineForClassFields": false,
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"esModuleInterop": true,
},
"files": [],
"include": [],
"extends": "../../tsconfig.base.json",
"references": [
{
"path": "./tsconfig.app.json"
Expand All @@ -22,12 +10,5 @@
{
"path": "./tsconfig.editor.json"
}
],
"extends": "../../tsconfig.base.json",
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
]
}
1 change: 0 additions & 1 deletion apps/ng2-charts-demo/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"target": "es2016",
"types": ["jest", "node"]
},
"files": ["src/test-setup.ts"],
Expand Down
10 changes: 1 addition & 9 deletions libs/ng2-charts-schematics/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"module": "commonjs",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
"module": "commonjs"
},
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
Expand Down
2 changes: 0 additions & 2 deletions libs/ng2-charts-schematics/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"target": "es2015",
"outDir": "../../dist/out-tsc",
"declaration": true,
"types": ["node"]
Expand Down
20 changes: 1 addition & 19 deletions libs/ng2-charts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
{
"compilerOptions": {
"target": "es2022",
"useDefineForClassFields": false,
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
},
"files": [],
"include": [],
"extends": "../../tsconfig.base.json",
"references": [
{
"path": "./tsconfig.lib.json"
Expand All @@ -19,11 +8,4 @@
"path": "./tsconfig.spec.json"
}
],
"extends": "../../tsconfig.base.json",
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}
1 change: 0 additions & 1 deletion libs/ng2-charts/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"declaration": true,
"declarationMap": true,
"inlineSources": true,
"types": []
},
"exclude": [
"src/**/*.spec.ts",
Expand Down
1 change: 0 additions & 1 deletion libs/ng2-charts/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"target": "es2016",
"types": ["jest", "node"]
},
"files": ["src/test-setup.ts"],
Expand Down
28 changes: 21 additions & 7 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,27 @@
"compileOnSave": false,
"compilerOptions": {
"rootDir": ".",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"skipLibCheck": true,
"esModuleInterop": true,
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"module": "esnext",
"target": "ES2022",
"module": "ES2022",
"useDefineForClassFields": false,
"emitDecoratorMetadata": true,
"lib": [
"es2020",
"ES2022",
"dom"
],
"skipLibCheck": true,
"skipDefaultLibCheck": true,
"baseUrl": ".",
"paths": {
Expand All @@ -29,5 +37,11 @@
"exclude": [
"node_modules",
"tmp"
]
],
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
}

0 comments on commit e67c9cc

Please sign in to comment.