Skip to content

Commit 83423d3

Browse files
author
HeroKwon
authored
chore: Update dependencies and environment configurations (#88)
* chore(deps): Update to latest version * chore(vitest): Add `src/main.tsx` to exclude file pattern * chore(eslint): Update config to use `defineConfig` * chore(eslint): fix type-ware lint errors after config changes * refactor(types): Update `ContainerHtmlTag` for improved type safety * chore(vitest): Add `src/App.tsx` to exclude file patterns * remove(test): test file for `main.tsx` * remove(test): test file for `App.tsx` * chore(eslint): Fix typo in comment for relaxed type-aware rules * chore(deps): Update `storybook` depdencies to latest version * chore(deps): Remove unused esbuild dependencies from lockfile * style(tests/Switch): Format `getSwitchElement` function for consistency
1 parent 350df7f commit 83423d3

51 files changed

Lines changed: 1227 additions & 1473 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.storybook/main.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ const config: StorybookConfig = {
2626
reactDocgenTypescriptOptions: {
2727
shouldExtractLiteralValuesFromEnum: true,
2828
propFilter: prop =>
29-
prop.parent ? !/node_modules/.test(prop.parent.fileName) : true,
29+
prop.parent ? !prop.parent.fileName.includes('node_modules') : true,
3030
},
3131
},
32-
viteFinal: async config => {
32+
viteFinal: config => {
3333
config.plugins?.push(tsconfigPaths());
3434
return config;
3535
},

‎eslint.config.js‎

Lines changed: 0 additions & 51 deletions
This file was deleted.

‎eslint.config.mjs‎

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
import eslintConfigPrettier from 'eslint-config-prettier/flat';
2+
import jsxA11y from 'eslint-plugin-jsx-a11y';
3+
import react from 'eslint-plugin-react';
4+
import reactHooks from 'eslint-plugin-react-hooks';
5+
import reactRefresh from 'eslint-plugin-react-refresh';
6+
import storybook from 'eslint-plugin-storybook';
7+
import { defineConfig, globalIgnores } from 'eslint/config';
8+
9+
import eslint from '@eslint/js';
10+
11+
import globals from 'globals';
12+
import tseslint from 'typescript-eslint';
13+
14+
export default defineConfig([
15+
globalIgnores(['dist', 'node_modules', 'coverage', '!.storybook']),
16+
eslint.configs.recommended,
17+
tseslint.configs.recommendedTypeChecked,
18+
tseslint.configs.stylisticTypeChecked,
19+
{
20+
files: ['**/*.{js,cjs,mjs}'],
21+
extends: [tseslint.configs.disableTypeChecked],
22+
},
23+
{
24+
languageOptions: {
25+
parser: tseslint.parser,
26+
parserOptions: {
27+
projectService: {
28+
allowDefaultProject: ['eslint.config.mjs'],
29+
},
30+
},
31+
globals: {
32+
...globals.browser,
33+
...globals.node,
34+
...globals.vitest,
35+
},
36+
},
37+
settings: {
38+
react: {
39+
version: 'detect',
40+
},
41+
},
42+
rules: {
43+
// Strict rules recommended
44+
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
45+
'@typescript-eslint/explicit-module-boundary-types': 'warn',
46+
'@typescript-eslint/no-misused-promises': [
47+
'error',
48+
{ checksVoidReturn: false },
49+
],
50+
'@typescript-eslint/require-await': 'error',
51+
52+
// Useful for React component stability and DX
53+
'react/jsx-no-useless-fragment': 'warn',
54+
'react/no-unstable-nested-components': 'warn',
55+
'react/self-closing-comp': 'warn',
56+
'react-hooks/rules-of-hooks': 'error',
57+
'react-hooks/exhaustive-deps': 'warn',
58+
59+
// Relaxed rules to avoid overly strict type-aware friction
60+
'@typescript-eslint/no-explicit-any': 'off',
61+
'@typescript-eslint/no-unsafe-assignment': 'off',
62+
'@typescript-eslint/no-unsafe-call': 'off',
63+
'@typescript-eslint/no-unsafe-return': 'off',
64+
'@typescript-eslint/no-unsafe-member-access': 'off',
65+
'@typescript-eslint/no-floating-promises': 'warn',
66+
67+
// Stylistic
68+
'@typescript-eslint/consistent-type-imports': 'warn',
69+
},
70+
},
71+
{
72+
files: ['**/*.stories.{ts,tsx}'],
73+
rules: {
74+
'react/no-unstable-nested-components': 'off',
75+
'@typescript-eslint/explicit-module-boundary-types': 'off',
76+
},
77+
},
78+
react.configs.flat.recommended,
79+
react.configs.flat['jsx-runtime'],
80+
reactHooks.configs.flat['recommended-latest'],
81+
reactRefresh.configs.vite,
82+
jsxA11y.flatConfigs.recommended,
83+
...storybook.configs['flat/recommended'],
84+
eslintConfigPrettier,
85+
]);

‎package.json‎

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -45,61 +45,61 @@
4545
},
4646
"dependencies": {
4747
"clsx": "^2.1.1",
48-
"lucide-react": "^0.554.0",
49-
"react": "^19.2.0",
50-
"react-dom": "^19.2.0",
51-
"tailwind-merge": "^3.3.1",
52-
"tailwindcss": "^4.1.16"
48+
"lucide-react": "^0.555.0",
49+
"react": "^19",
50+
"react-dom": "^19",
51+
"tailwind-merge": "^3.4.0",
52+
"tailwindcss": "^4"
5353
},
5454
"peerDependencies": {
55-
"lucide-react": "^0.554.0",
55+
"lucide-react": "^0.555.0",
5656
"react": "^19",
5757
"react-dom": "^19",
5858
"tailwindcss": "^4"
5959
},
6060
"devDependencies": {
6161
"@changesets/changelog-git": "^0.2.1",
62-
"@changesets/cli": "^2.29.7",
63-
"@chromatic-com/storybook": "^4.1.1",
64-
"@eslint/js": "^9.38.0",
65-
"@storybook/addon-a11y": "^9.1.15",
66-
"@storybook/addon-designs": "^10.0.2",
67-
"@storybook/addon-docs": "^9.1.15",
68-
"@storybook/addon-themes": "^9.1.15",
69-
"@storybook/addon-vitest": "^9.1.15",
70-
"@storybook/react-vite": "^9.1.15",
71-
"@tailwindcss/vite": "^4.1.16",
62+
"@changesets/cli": "^2.29.8",
63+
"@chromatic-com/storybook": "^4.1.3",
64+
"@eslint/js": "^9.39.1",
65+
"@storybook/addon-a11y": "^10.1.4",
66+
"@storybook/addon-designs": "^11.0.3",
67+
"@storybook/addon-docs": "^10.1.4",
68+
"@storybook/addon-themes": "^10.1.4",
69+
"@storybook/addon-vitest": "^10.1.4",
70+
"@storybook/react-vite": "^10.1.4",
71+
"@tailwindcss/vite": "^4.1.17",
7272
"@testing-library/jest-dom": "^6.9.1",
7373
"@testing-library/react": "^16.3.0",
7474
"@testing-library/user-event": "^14.6.1",
7575
"@trivago/prettier-plugin-sort-imports": "^6.0.0",
7676
"@types/jest": "^30.0.0",
77-
"@types/node": "^24.9.1",
78-
"@types/react": "^19.2.2",
79-
"@types/react-dom": "^19.2.2",
80-
"@vitejs/plugin-react-swc": "^4.2.0",
81-
"@vitest/browser-playwright": "^4.0.4",
82-
"@vitest/coverage-v8": "^4.0.4",
83-
"@vitest/ui": "^4.0.4",
84-
"eslint": "^9.38.0",
77+
"@types/node": "^24",
78+
"@types/react": "^19",
79+
"@types/react-dom": "^19",
80+
"@vitejs/plugin-react-swc": "^4.2.2",
81+
"@vitest/browser-playwright": "^4.0.14",
82+
"@vitest/coverage-v8": "^4.0.14",
83+
"@vitest/ui": "^4.0.14",
84+
"eslint": "^9.39.1",
8585
"eslint-config-prettier": "^10.1.8",
8686
"eslint-plugin-jsx-a11y": "^6.10.2",
8787
"eslint-plugin-react": "^7.37.5",
8888
"eslint-plugin-react-hooks": "^7.0.1",
8989
"eslint-plugin-react-refresh": "^0.4.24",
90-
"eslint-plugin-storybook": "^9.1.15",
91-
"globals": "^16.4.0",
92-
"jsdom": "^27.0.1",
93-
"playwright": "^1.56.1",
94-
"prettier": "^3.6.2",
90+
"eslint-plugin-storybook": "^10.1.4",
91+
"globals": "^16.5.0",
92+
"jsdom": "^27.2.0",
93+
"playwright": "^1.57.0",
94+
"prettier": "^3.7.2",
9595
"prettier-plugin-tailwindcss": "^0.7.1",
96-
"storybook": "^9.1.15",
97-
"typescript": "^5.9.3",
98-
"typescript-eslint": "^8.46.2",
99-
"vite": "^7.1.12",
96+
"storybook": "^10.1.4",
97+
"typescript": "^5",
98+
"typescript-eslint": "^8.48.0",
99+
"vite": "^7.2.4",
100100
"vite-plugin-dts": "^4.5.4",
101101
"vite-tsconfig-paths": "^5.1.4",
102-
"vitest": "^4.0.4"
102+
"vitest": "^4.0.14"
103103
},
104104
"author": {
105105
"name": "HeroKwon",

0 commit comments

Comments
 (0)