forked from freeCodeCamp/freeCodeCamp
-
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.
feat(typescript): Add typescript support for UI components library (f…
…reeCodeCamp#43541) * Add TS configs and improve dir structure * Add TS configs and improve dir structure * Fix components exports from index * chore: prettier * Add tsconfig and then fix the linter warnings * Add @babel/preset-typescript * Fix eslint rule and update btn component to fix storybook * Fix TS and Jest configs Converted all remaining files to TS as well * Remove TS ignored rules and fixed some TS & jest stuff * Revert to old directory structure * Use absolute versions in package.json * enable ts strict to infer types Co-authored-by: Hamza Waleed <[email protected]>
- Loading branch information
1 parent
cc13291
commit ebec670
Showing
15 changed files
with
480 additions
and
142 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
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
module.exports = { babelrcRoots: ['./api-server', './client'] }; | ||
module.exports = { | ||
babelrcRoots: ['./api-server', './client'] | ||
}; |
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 |
---|---|---|
|
@@ -8,7 +8,8 @@ const babelOptions = { | |
} | ||
} | ||
], | ||
'@babel/react' | ||
'@babel/react', | ||
'@babel/preset-typescript' | ||
] | ||
}; | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
7 changes: 4 additions & 3 deletions
7
tools/ui-components/.babelrc.json → tools/ui-components/.babelrc.js
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 |
---|---|---|
@@ -1,14 +1,15 @@ | ||
{ | ||
module.exports = { | ||
"presets": [ | ||
"@babel/preset-react", | ||
"@babel/preset-typescript", | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"browsers": [">0.25%", "not dead"] | ||
} | ||
} | ||
], | ||
"@babel/preset-react" | ||
] | ||
], | ||
"plugins": [["transform-react-remove-prop-types", { "removeImport": true }]] | ||
} |
Oops, something went wrong.