Typescript: Add initial Typescript setup

This commit adds the initial setup for using Typescript in our project.
The tsconfig.json is very minimal at this point, we will introduce
stricter rules as our Typescript migration progresses.
This commit is contained in:
lucasgarfield 2023-06-19 12:24:30 +02:00 committed by Lucas Garfield
parent a4960c02ee
commit c33cc6ef70
4 changed files with 3447 additions and 19575 deletions

View file

@ -3,8 +3,8 @@ module.exports = {
presets: [
// Polyfills
'@babel/env',
// Allow JSX syntax
'@babel/react',
'@babel/typescript',
],
plugins: [
// Put _extends helpers in their own file

23003
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -59,12 +59,14 @@
"@babel/plugin-transform-runtime": "7.21.4",
"@babel/preset-env": "7.22.5",
"@babel/preset-react": "7.22.3",
"@babel/preset-typescript": "^7.21.5",
"@redhat-cloud-services/eslint-config-redhat-cloud-services": "1.3.0",
"@redhat-cloud-services/frontend-components-config": "5.0.1",
"@testing-library/dom": "9.3.0",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "12.1.5",
"@testing-library/user-event": "14.4.3",
"@types/jest": "^29.5.2",
"babel-jest": "29.5.0",
"babel-plugin-dual-import": "1.2.1",
"babel-plugin-transform-imports": "2.0.0",
@ -78,7 +80,7 @@
"git-revision-webpack-plugin": "5.0.0",
"history": "5.3.0",
"identity-obj-proxy": "3.0.0",
"jest": "29.5.0",
"jest": "^29.5.0",
"jest-canvas-mock": "2.5.0",
"jest-environment-jsdom": "29.5.0",
"msw": "^1.2.1",
@ -90,6 +92,7 @@
"sass-loader": "13.3.1",
"stylelint": "14.16.1",
"stylelint-config-recommended-scss": "7.0.0",
"typescript": "5.0.4",
"uuid": "9.0.0",
"webpack-bundle-analyzer": "4.8.0",
"whatwg-fetch": "^3.6.2"

12
tsconfig.json Normal file
View file

@ -0,0 +1,12 @@
{
"compilerOptions": {
"outDir": "./dist/",
"noImplicitAny": true,
"module": "es6",
"target": "es5",
"jsx": "react-jsx",
"allowJs": true,
"moduleResolution": "node",
"strictNullChecks": true
}
}