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:
Firman Ramdhani
2026-01-09 18:26:12 +07:00
parent ed949e4174
commit 554c5fbee3
83 changed files with 63031 additions and 42 deletions
+38
View File
@@ -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;