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>
This commit is contained in:
@@ -1,8 +1,17 @@
|
||||
module.exports = {
|
||||
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.js'],
|
||||
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.tsx'],
|
||||
addons: [
|
||||
'@storybook/addon-links',
|
||||
'@storybook/addon-essentials',
|
||||
'@storybook/addon-postcss'
|
||||
]
|
||||
],
|
||||
typescript: {
|
||||
check: false,
|
||||
checkOptions: {},
|
||||
reactDocgen: 'react-docgen-typescript',
|
||||
reactDocgenTypescriptOptions: {
|
||||
shouldExtractLiteralValuesFromEnum: true,
|
||||
propFilter: (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
Reference in New Issue
Block a user