-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ts): switch tsconfig based on typescript version
Signed-off-by: Lexus Drumgold <[email protected]>
- Loading branch information
1 parent
2efbb22
commit f280fcb
Showing
11 changed files
with
106 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -216,12 +216,6 @@ jobs: | |
- id: debug | ||
name: Print environment variables and event payload | ||
uses: hmarr/[email protected] | ||
- id: tsconfig | ||
name: Prepare tsconfig.json | ||
if: matrix.typescript-version != needs.metadata.outputs.version-typescript | ||
run: echo $(jq 'del(.compilerOptions.ignoreDeprecations)' $TSCONFIG) > $TSCONFIG | ||
env: | ||
TSCONFIG: tsconfig.json | ||
- id: typecheck | ||
name: Run typecheck | ||
run: yarn typecheck | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"compilerOptions": { | ||
"noEmitOnError": true, | ||
"skipLibCheck": false, | ||
"target": "es2020" | ||
}, | ||
"exclude": ["**/__mocks__", "**/__tests__"], | ||
"extends": "./tsconfig.json", | ||
"include": ["../../../dist/*", "../../../src/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"allowUnreachableCode": false, | ||
"alwaysStrict": false, | ||
"baseUrl": "../../..", | ||
"checkJs": false, | ||
"declaration": true, | ||
"declarationMap": true, | ||
"emitDecoratorMetadata": true, | ||
"esModuleInterop": true, | ||
"exactOptionalPropertyTypes": true, | ||
"experimentalDecorators": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"importsNotUsedAsValues": "error", | ||
"isolatedModules": true, | ||
"lib": ["es2020"], | ||
"module": "esnext", | ||
"moduleDetection": "force", | ||
"moduleResolution": "node", | ||
"newLine": "lf", | ||
"noEmit": true, | ||
"noErrorTruncation": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"noImplicitAny": true, | ||
"noImplicitOverride": true, | ||
"noImplicitReturns": true, | ||
"noUncheckedIndexedAccess": true, | ||
"noUnusedLocals": false, | ||
"noUnusedParameters": false, | ||
"outDir": "../../../dist", | ||
"paths": { | ||
"#src": ["src/index"], | ||
"#src/*": ["src/*"], | ||
"#tests/*": ["__tests__/*"] | ||
}, | ||
"preserveConstEnums": true, | ||
"preserveSymlinks": true, | ||
"pretty": true, | ||
"resolveJsonModule": true, | ||
"rootDir": "../../..", | ||
"skipLibCheck": true, | ||
"sourceMap": true, | ||
"strict": true, | ||
"strictNullChecks": true, | ||
"strictPropertyInitialization": true, | ||
"target": "esnext", | ||
"useDefineForClassFields": true, | ||
"useUnknownInCatchVariables": true | ||
}, | ||
"exclude": ["**/coverage", "**/dist", "**/node_modules"], | ||
"include": ["**/**.cjs", "**/**.mjs", "**/**.ts", "**/.*.cjs"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es2020" | ||
}, | ||
"extends": "./tsconfig.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
# Postbuild Typecheck Workflow | ||
|
||
# set initial tsconfig file | ||
TSCONFIG='tsconfig.build.json' | ||
|
||
# change tsconfig file if typescript version is not at least 5 | ||
[[ ! $(jq .devDependencies.typescript package.json -r) = 5* ]] && TSCONFIG=config/ts/v4/$TSCONFIG | ||
|
||
# run typecheck | ||
tsc -p $TSCONFIG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters