Skip to content

Commit 45c2497

Browse files
committed
fix: resolve npm install and test failures after package upgrades
- Downgrade TypeScript from 6.0.2 to 5.9.3 (@typescript-eslint doesn't support TS6 yet) - Add react, react-dom, @testing-library/dom as devDependencies for test execution - Fix tsconfig ignoreDeprecations value from "6.0" to "5.0" - Remove corrupted duplicate content from eslint.config.js - Use --legacy-peer-deps for eslint-plugin-import/eslint@10 peer dep mismatch Signed-off-by: Yi Nuo <218099172+yi-nuo426@users.noreply.github.com>
1 parent a2118db commit 45c2497

5 files changed

Lines changed: 166 additions & 808 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ dist/**
2525
packages/dist/**
2626
packages/design-system/node_modules/**
2727

28-
**/storybook-static/**
2928
pub.sh
3029
.eslintcache
3130

31+
.DS_Store.eslintcache
32+
3233
.DS_Store

eslint.config.js

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
1-
const { FlatCompat } = require("@eslint/eslintrc");
21
const js = require("@eslint/js");
32
const tsParser = require("@typescript-eslint/parser");
43
const react = require("eslint-plugin-react");
54
const reactHooks = require("eslint-plugin-react-hooks");
65
const typescript = require("@typescript-eslint/eslint-plugin");
7-
const storybook = require("eslint-plugin-storybook");
86
const importPlugin = require("eslint-plugin-import");
97
const globals = require("globals");
108

11-
const compat = new FlatCompat({
12-
baseDirectory: __dirname,
13-
recommendedConfig: js.configs.recommended,
14-
allConfig: js.configs.all
15-
});
16-
179
module.exports = [
1810
// Global ignores
1911
{
@@ -36,11 +28,11 @@ module.exports = [
3628
"**/coverage/**",
3729
]
3830
},
39-
31+
4032
// Test files configuration
4133
{
4234
files: ["**/*.test.{js,jsx,ts,tsx}", "**/__tests__/**/*.{js,jsx,ts,tsx}"],
43-
35+
4436
languageOptions: {
4537
globals: {
4638
...globals.browser,
@@ -66,21 +58,12 @@ module.exports = [
6658
"react-hooks": reactHooks,
6759
"@typescript-eslint": typescript,
6860
"import": importPlugin,
69-
storybook,
7061
},
7162

7263
rules: {
73-
// ESLint recommended rules
7464
...js.configs.recommended.rules,
75-
76-
// TypeScript recommended rules
7765
...typescript.configs.recommended.rules,
78-
79-
// React hooks recommended rules
8066
...reactHooks.configs.recommended.rules,
81-
82-
// Storybook recommended rules
83-
...storybook.configs.recommended.rules,
8467
"import/first": "error",
8568
},
8669

@@ -95,11 +78,11 @@ module.exports = [
9578
},
9679
},
9780

98-
// Main configuration - matches old .eslintrc.js
81+
// Main configuration
9982
{
10083
files: ["**/*.{js,jsx,ts,tsx}"],
10184
ignores: ["**/*.test.{js,jsx,ts,tsx}", "**/__tests__/**/*.{js,jsx,ts,tsx}"],
102-
85+
10386
languageOptions: {
10487
globals: {
10588
...globals.browser,
@@ -124,21 +107,12 @@ module.exports = [
124107
"react-hooks": reactHooks,
125108
"@typescript-eslint": typescript,
126109
"import": importPlugin,
127-
storybook,
128110
},
129111

130112
rules: {
131-
// ESLint recommended rules
132113
...js.configs.recommended.rules,
133-
134-
// TypeScript recommended rules
135114
...typescript.configs.recommended.rules,
136-
137-
// React hooks recommended rules
138115
...reactHooks.configs.recommended.rules,
139-
140-
// Storybook recommended rules
141-
...storybook.configs.recommended.rules,
142116
"import/first": "error",
143117
},
144118

0 commit comments

Comments
 (0)