-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
chore(replay): Align and clean up tsconfig.json
s
#6308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
3369af8
remove `tsconfig.base.json`
Lms24 92813ba
merge `tsconfig` and `tsconfig.core`
Lms24 882d6f8
add `tsconfig.test.json` and adjust lint/jest
Lms24 16b9ea5
move `tsconfig.worker.json` to root
Lms24 3847195
extend replay tsconfig from global tsconfig
Lms24 300ec73
fix resulting type errors
Lms24 a6ecebf
remove redundant compilerOptions
Lms24 f566993
set target to es6 (default)
Lms24 12a90b6
fix test tsconfig and jest config
Lms24 450d16d
worker es5->es6
Lms24 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
---|---|---|
@@ -1,23 +1,24 @@ | ||
import type { Config } from '@jest/types'; | ||
import { pathsToModuleNameMapper } from 'ts-jest'; | ||
import { jsWithTs as jsWithTsPreset } from 'ts-jest/presets'; | ||
|
||
import { compilerOptions } from './tsconfig.json'; | ||
import { compilerOptions } from './tsconfig.test.json'; | ||
|
||
export default async (): Promise<Config.InitialOptions> => { | ||
return { | ||
...jsWithTsPreset, | ||
verbose: true, | ||
preset: 'ts-jest/presets/js-with-ts', // needed when import worker.js | ||
globals: { | ||
'ts-jest': { | ||
tsconfig: '<rootDir>/tsconfig.test.json', | ||
}, | ||
__DEBUG_BUILD__: true, | ||
}, | ||
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { | ||
prefix: '<rootDir>/', | ||
}), | ||
setupFilesAfterEnv: ['./jest.setup.ts'], | ||
testEnvironment: 'jsdom', | ||
testMatch: ['<rootDir>/test/**/*(*.)@(spec|test).ts'], | ||
globals: { | ||
'ts-jest': { | ||
tsconfig: '<rootDir>/tsconfig.json', | ||
}, | ||
__DEBUG_BUILD__: true, | ||
}, | ||
}; | ||
}; |
This file contains hidden or 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 hidden or 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
Empty file.
This file contains hidden or 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 hidden or 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,8 @@ | ||
// TODO Once https://github.com/microsoft/TypeScript/issues/33094 is done (if it ever is), this file can disappear, as | ||
// it's purely a placeholder to satisfy VSCode. | ||
|
||
{ | ||
"extends": "../tsconfig.test.json", | ||
|
||
"include": ["./**/*"] | ||
} |
This file contains hidden or 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 hidden or 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 |
---|---|---|
@@ -1,12 +1,25 @@ | ||
{ | ||
"extends": "./config/tsconfig.core.json", | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"paths": { | ||
"@test": ["./test"], | ||
"@test/*": ["./test/*"] | ||
}, | ||
"types": ["node", "jest"] | ||
"baseUrl": ".", | ||
"rootDir": ".", | ||
"types": ["node", "jest"], | ||
"module": "esnext", | ||
"noImplicitAny": true, | ||
"noEmitOnError": false, | ||
"esModuleInterop": true, | ||
"resolveJsonModule": true, | ||
"allowJs": true, | ||
"declaration": true, | ||
"declarationMap": true, | ||
"declarationDir": "./types", | ||
"strictNullChecks": true, | ||
"outDir": "./build/npm/dist" | ||
}, | ||
"include": ["src/**/*.ts", "test/**/*.ts", "rollup.config.ts", "jest.config.ts", "jest.setup.ts"], | ||
"include": ["src/**/*.ts"], | ||
"exclude": ["node_modules"] | ||
} |
This file contains hidden or 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,20 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
|
||
"include": ["test/**/*.ts", "jest.config.ts", "jest.setup.ts"], | ||
|
||
"compilerOptions": { | ||
"paths": { | ||
"@test": ["./test"], | ||
"@test/*": ["./test/*"] | ||
}, | ||
"baseUrl": ".", | ||
"rootDir": ".", | ||
"types": ["node", "jest"], | ||
"noImplicitAny": false, | ||
"noImplicitThis": false, | ||
"strictPropertyInitialization": false, | ||
"resolveJsonModule": true, | ||
"allowJs": true | ||
} | ||
} |
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
l: Is it on purpose that we keep
es5
as target here? Just making sure :DThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, we should probably change it to ES6