freeCodeCamp/jest.transform.js
Hamza Waleed ebec6705a3
feat(typescript): Add typescript support for UI components library (#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 <hamza.waleed@arbisoft.com>
2021-09-28 14:06:21 +03:00

19 lines
389 B
JavaScript

const babelOptions = {
presets: [
[
'@babel/preset-env',
{
targets: {
node: 14
}
}
],
'@babel/react',
'@babel/preset-typescript'
]
};
// TODO: is there a way to do this without a separate transform? i.e. can we
// just use the existing config?
module.exports = require('babel-jest').default.createTransformer(babelOptions);