- 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.
46 lines
982 B
JavaScript
46 lines
982 B
JavaScript
const { resolve } = require('node:path');
|
|
|
|
const project = resolve(process.cwd(), 'tsconfig.json');
|
|
|
|
/*
|
|
* This is a custom ESLint configuration for use with
|
|
* typescript packages.
|
|
*
|
|
* This config extends the Vercel Engineering Style Guide.
|
|
* For more information, see https://github.com/vercel/style-guide
|
|
*
|
|
*/
|
|
|
|
module.exports = {
|
|
extends: [
|
|
'plugin:storybook/recommended',
|
|
'plugin:mdx/recommended',
|
|
...[
|
|
'@vercel/style-guide/eslint/node',
|
|
'@vercel/style-guide/eslint/typescript',
|
|
'@vercel/style-guide/eslint/browser',
|
|
'@vercel/style-guide/eslint/react',
|
|
].map(require.resolve),
|
|
],
|
|
parserOptions: {
|
|
project,
|
|
},
|
|
plugins: ['only-warn'],
|
|
globals: {
|
|
React: true,
|
|
JSX: true,
|
|
},
|
|
settings: {
|
|
'import/resolver': {
|
|
typescript: {
|
|
project,
|
|
},
|
|
},
|
|
},
|
|
ignorePatterns: ['node_modules/', 'dist/'],
|
|
// add rules configurations here
|
|
rules: {
|
|
'import/no-default-export': 'off',
|
|
},
|
|
};
|