Skip to content

Commit 76750c3

Browse files
committed
feat(tsconfig): add support for typescript 4.0.x and angular >= 10.1.0
1 parent 9bea5fc commit 76750c3

File tree

9 files changed

+147
-9
lines changed

9 files changed

+147
-9
lines changed

lib/tsconfig/4.0.x/README.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<h1 align="center">
2+
code style - TypeScript 4.0.x
3+
</h1>
4+
5+
## About
6+
7+
This sub-package hosts the [TypeScript](https://www.typescriptlang.org/) configuration for TypeScript 4.0.x.
8+
9+
## Usage
10+
11+
Adapt the content of your `tsconfig.json` file as follows:
12+
13+
```text
14+
{
15+
"extends": "@nationalbankbelgium/code-style/tsconfig/4.0.x",
16+
"compilerOptions": {
17+
// your configuration
18+
}
19+
}
20+
```

lib/tsconfig/4.0.x/ng10/README.md

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<h1 align="center">
2+
code style - TypeScript 4.0.x + Angular >= 10.1.0
3+
</h1>
4+
5+
## About
6+
7+
This sub-package hosts the [TypeScript](https://www.typescriptlang.org/) configuration for TypeScript 4.0.x. and Angular >= 10.1.0.
8+
9+
## Usage
10+
11+
Adapt the content of your `tsconfig.json` file as follows:
12+
13+
```text
14+
{
15+
"extends": "@nationalbankbelgium/code-style/tsconfig/4.0.x/ng10",
16+
"compilerOptions": {
17+
// your configuration
18+
}
19+
}
20+
```

lib/tsconfig/4.0.x/ng10/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "@nationalbankbelgium/code-style/tsconfig/4.0.x/ng10",
3+
"main": "tsconfig.json"
4+
}

lib/tsconfig/4.0.x/ng10/tsconfig.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"angularCompilerOptions": {
4+
"allowEmptyCodegenFiles": false,
5+
"annotateForClosureCompiler": false,
6+
"annotationsAs": "static fields",
7+
"disableExpressionLowering": true,
8+
"disableTypeScriptVersionCheck": false,
9+
"enableIvy": true,
10+
"enableLegacyTemplate": false,
11+
"enableResourceInlining": false,
12+
"fullTemplateTypeCheck": true,
13+
"generateCodeForLibraries": true,
14+
"preserveWhitespaces": false,
15+
"skipMetadataEmit": false,
16+
"strictMetadataEmit": false,
17+
"skipTemplateCodegen": false,
18+
"strictTemplates": true,
19+
"strictInjectionParameters": true
20+
}
21+
}

lib/tsconfig/4.0.x/package.json

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "@nationalbankbelgium/code-style/tsconfig/4.0.x",
3+
"main": "tsconfig.json"
4+
}

lib/tsconfig/4.0.x/tsconfig.json

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"compilerOptions": {
3+
"allowSyntheticDefaultImports": true,
4+
"allowUmdGlobalAccess": false,
5+
"allowUnreachableCode": false,
6+
"allowUnusedLabels": false,
7+
"alwaysStrict": true,
8+
"charset": "utf8",
9+
"declaration": true,
10+
"diagnostics": false,
11+
"downlevelIteration": true,
12+
"emitBOM": false,
13+
"emitDecoratorMetadata": true,
14+
"emitDeclarationOnly": false,
15+
"experimentalDecorators": true,
16+
"forceConsistentCasingInFileNames": false,
17+
"importHelpers": true,
18+
"incremental": true,
19+
"inlineSourceMap": false,
20+
"inlineSources": true,
21+
"isolatedModules": false,
22+
"listEmittedFiles": false,
23+
"listFiles": false,
24+
"module": "es2020",
25+
"moduleResolution": "node",
26+
"noEmitHelpers": false,
27+
"noEmitOnError": false,
28+
"noFallthroughCasesInSwitch": true,
29+
"noImplicitAny": true,
30+
"noImplicitReturns": true,
31+
"noImplicitThis": true,
32+
"noImplicitUseStrict": false,
33+
"noUnusedLocals": true,
34+
"noUnusedParameters": true,
35+
"preserveConstEnums": true,
36+
"pretty": true,
37+
"removeComments": false,
38+
"sourceMap": true,
39+
"strict": true,
40+
"strictBindCallApply": true,
41+
"strictFunctionTypes": true,
42+
"strictPropertyInitialization": true,
43+
"strictNullChecks": true,
44+
"stripInternal": true,
45+
"skipLibCheck": true,
46+
"suppressImplicitAnyIndexErrors": true,
47+
"suppressExcessPropertyErrors": false,
48+
"useDefineForClassFields": true,
49+
"target": "es2015",
50+
"lib": ["dom", "dom.iterable", "es2020"]
51+
},
52+
"exclude": ["node_modules", "dist"],
53+
"formatCodeOptions": {
54+
"indentSize": 2,
55+
"tabSize": 4,
56+
"newLineCharacter": "\r\n",
57+
"convertTabsToSpaces": false,
58+
"insertSpaceAfterCommaDelimiter": true,
59+
"insertSpaceAfterSemicolonInForStatements": true,
60+
"insertSpaceBeforeAndAfterBinaryOperators": true,
61+
"insertSpaceAfterKeywordsInControlFlowStatements": true,
62+
"insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
63+
"insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
64+
"placeOpenBraceOnNewLineForFunctions": false,
65+
"placeOpenBraceOnNewLineForControlBlocks": false
66+
}
67+
}

lib/tsconfig/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ The following versions are available (based on **TypeScript** version and **Angu
2525
- 3.8.x and Angular >= 9.1.0 - `@nationalbankbelgium/code-style/tsconfig/3.8.x/ng9`
2626
- 3.9.x - `@nationalbankbelgium/code-style/tsconfig/3.9.x`
2727
- 3.9.x and Angular 10 - `@nationalbankbelgium/code-style/tsconfig/3.9.x/ng10`
28+
- 4.0.x - `@nationalbankbelgium/code-style/tsconfig/4.0.x`
29+
- 4.0.x and Angular >= 10.1.0 - `@nationalbankbelgium/code-style/tsconfig/4.0.x/ng10`
2830

2931
## Usage
3032

@@ -34,7 +36,7 @@ For TypeScript >= 3.2
3436

3537
```text
3638
{
37-
"extends": "@nationalbankbelgium/code-style/tsconfig/3.8.x",
39+
"extends": "@nationalbankbelgium/code-style/tsconfig/4.0.x",
3840
"compilerOptions": {
3941
// your configuration
4042
}

package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"release-it": "^14.2.0",
4747
"stylelint": "~13.13.1",
4848
"tslint": "~6.1.0",
49-
"typescript": "~3.9.10"
49+
"typescript": "~4.0.8"
5050
},
5151
"scripts": {
5252
"build": "bash ./build.sh",

0 commit comments

Comments
 (0)