feat: add initial TypeScript and ESLint configurations for library and React applications
- Created TypeScript configuration files for library and React applications. - Added ESLint configurations for library, React, and Storybook. - Implemented a basic Button component in the UI package. - Set up Vite for the docs development environment.
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
import { dirname, join, resolve } from 'path';
|
||||
|
||||
function getAbsolutePath(value) {
|
||||
return dirname(require.resolve(join(value, 'package.json')));
|
||||
}
|
||||
|
||||
const config = {
|
||||
stories: ['../stories/*.stories.tsx', '../stories/**/*.stories.tsx'],
|
||||
addons: [getAbsolutePath('@storybook/addon-links'), getAbsolutePath('@storybook/addon-essentials')],
|
||||
framework: {
|
||||
name: getAbsolutePath('@storybook/react-vite'),
|
||||
options: {},
|
||||
},
|
||||
|
||||
core: {},
|
||||
|
||||
async viteFinal(config, { configType }) {
|
||||
// customize the Vite config here
|
||||
return {
|
||||
...config,
|
||||
define: { 'process.env': {} },
|
||||
resolve: {
|
||||
alias: [
|
||||
{
|
||||
find: 'ui',
|
||||
replacement: resolve(__dirname, '../../../packages/ui/'),
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
docs: {
|
||||
autodocs: true,
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
Reference in New Issue
Block a user