added typechecking for all ts files (#6466)
Fixes: #6436 Changes made: - Added typecheck step before twenty-ui build to check stories TS errors - Added a tsconfig.dev.json to add stories and tests to typecheking when in dev mode - Added tsconfig.dev.json to storybook dev command of twenty-ui to typecheck stories while developing - Fixed twenty-ui stories that were broken - Added a serve command to serve front build - Fixed unit test from another PR --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com> Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
committed by
GitHub
parent
12a657ce29
commit
be20a690b3
@ -1,4 +1,6 @@
|
||||
import { StorybookConfig } from '@storybook/react-vite';
|
||||
import * as path from 'path';
|
||||
import checker from 'vite-plugin-checker';
|
||||
|
||||
const config: StorybookConfig = {
|
||||
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx|mdx)'],
|
||||
@ -16,6 +18,19 @@ const config: StorybookConfig = {
|
||||
name: '@storybook/react-vite',
|
||||
options: {},
|
||||
},
|
||||
viteFinal: (config) => {
|
||||
return {
|
||||
...config,
|
||||
plugins: [
|
||||
...(config.plugins ?? []),
|
||||
checker({
|
||||
typescript: {
|
||||
tsconfigPath: path.resolve(__dirname, '../tsconfig.dev.json'),
|
||||
},
|
||||
}),
|
||||
],
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
||||
Reference in New Issue
Block a user