Skip to content

pr05 Typescript #1: Set up TS dependencies #3533

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

Open
wants to merge 28 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7de0f7a
install typescript 5.8.3
clairep94 Jul 6, 2025
7420fd1
install compatible react types for react 16.14
clairep94 Jul 6, 2025
82973eb
install babel preset-typescript
clairep94 Jul 6, 2025
a105e23
move typescript from deps to dev deps
clairep94 Jul 6, 2025
85d94d6
install node types for node 16
clairep94 Jul 6, 2025
088a38e
set up babel rc
clairep94 Jul 6, 2025
cfcd17b
webpack setup
clairep94 Jul 6, 2025
c44ab95
test lint-staged add ts tsx
clairep94 Jul 6, 2025
e7bf1fb
jest typescript dep
clairep94 Jul 6, 2025
8ebec3a
storybook update included stories
clairep94 Jul 6, 2025
012fefe
set up eslint deps and eslintrc
clairep94 Jul 6, 2025
a5cdbec
update es lint commands manually tested
clairep94 Jul 7, 2025
fa92de3
add ts config for client with ts check
clairep94 Jul 7, 2025
14aa861
add correct eslint version
clairep94 Jul 7, 2025
5c88395
update resolve on config.examples
clairep94 Jul 7, 2025
8c2baeb
add precommit check
clairep94 Jul 7, 2025
198622b
move typecheck to pre-push
clairep94 Jul 7, 2025
116de80
remove pre-commit typecheck, need to discuss
clairep94 Jul 7, 2025
2cb394a
fix typo on webpack config example
clairep94 Jul 7, 2025
760cf05
Merge branch 'develop' into claire/pr05/set_up_ts_dependencies
clairep94 Jul 8, 2025
9330d34
Merge branch 'develop' into claire/pr05/set_up_ts_dependencies
clairep94 Jul 15, 2025
3eed8b8
add ts config settings suggested by typescript docs for babel & tsc c…
clairep94 Jul 15, 2025
0ff68ea
add base tsconfig and update client to extend from base
clairep94 Jul 15, 2025
53ad7a1
test moving typecheck to only lint-staged files, should pass as forma…
clairep94 Jul 15, 2025
67f99ac
update lint-staged command order
clairep94 Jul 15, 2025
d9c7252
remove build info
clairep94 Jul 15, 2025
69410ad
add *.tsbuildinfo to git ignore
clairep94 Jul 15, 2025
963b59a
fix, can't use staging files only while specifying a tscoonfig project
clairep94 Jul 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"presets": [
"@babel/preset-react",
"@babel/preset-env"
"@babel/preset-env",
"@babel/preset-typescript"
],
"env": {
"production": {
Expand Down
7 changes: 6 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@
},
"overrides": [
{
"files": ["*.stories.jsx"],
"files": ["*.ts", "*.tsx"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"]
},
{
"files": ["*.stories.@(js|jsx|ts|tsx)"],
"rules": {
"import/no-extraneous-dependencies": "off"
}
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ terraform/.terraform/
storybook-static
duplicates.json

coverage
coverage

*.tsbuildinfo
16 changes: 8 additions & 8 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type { import('@storybook/react-webpack5').StorybookConfig } */
const config = {
stories: ['../client/**/*.stories.(jsx|mdx)'],
stories: ['../client/**/*.stories.(jsx|md|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
Expand All @@ -18,19 +18,19 @@ const config = {
// https://storybook.js.org/docs/react/builders/webpack
// this modifies the existing image rule to exclude .svg files
// since we want to handle those files with @svgr/webpack
const imageRule = config.module.rules.find(rule => rule.test.test('.svg'))
imageRule.exclude = /\.svg$/
const imageRule = config.module.rules.find((rule) =>
rule.test.test('.svg')
);
imageRule.exclude = /\.svg$/;

// configure .svg files to be loaded with @svgr/webpack
config.module.rules.push({
test: /\.svg$/,
use: ['@svgr/webpack']
})
});

return config
},
return config;
}
};

export default config;


9 changes: 9 additions & 0 deletions client/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"target": "ES6",
"module": "ESNext",
"lib": ["DOM", "ESNext"],
"jsx": "react",
},
}
Loading