Skip to content

Commit beded4b

Browse files
committed
Fix TypeScript config for Storybook 10.x compatibility
This commit updates TypeScript compiler options in Storybook-related configuration files to support Storybook 10.x's module resolution requirements. Problem: Storybook 10.x changed its package structure to use subpath exports (e.g., 'storybook/manager-api', 'storybook/theming'). These subpath exports require modern TypeScript module resolution strategies to work correctly. The legacy 'node' module resolution strategy doesn't understand package.json 'exports' fields, causing TypeScript to fail resolving Storybook imports. Changes: - Changed moduleResolution from 'node' to 'bundler' in both .storybook/tsconfig.json and src/stories/tsconfig.json - Added 'allowImportingTsExtensions: true' to support TypeScript extension imports in bundler mode - Added 'noEmit: true' since these configs are for type-checking only, not compilation This fixes the underlying module resolution issues that were causing ESLint's TypeScript parser to fail during the lint-ci step. Files modified: - extensions/ql-vscode/.storybook/tsconfig.json - extensions/ql-vscode/src/stories/tsconfig.json
1 parent 51fe5c3 commit beded4b

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

extensions/ql-vscode/.storybook/tsconfig.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
"module": "esnext",
4-
"moduleResolution": "node",
4+
"moduleResolution": "bundler",
55
"target": "es2021",
66
"outDir": "out",
77
"lib": ["ES2021", "dom"],
@@ -13,7 +13,9 @@
1313
"noImplicitReturns": true,
1414
"noFallthroughCasesInSwitch": true,
1515
"experimentalDecorators": true,
16-
"skipLibCheck": true
16+
"skipLibCheck": true,
17+
"allowImportingTsExtensions": true,
18+
"noEmit": true
1719
},
1820
"exclude": ["node_modules"]
1921
}

extensions/ql-vscode/src/stories/tsconfig.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
"module": "esnext",
4-
"moduleResolution": "node",
4+
"moduleResolution": "bundler",
55
"target": "es2021",
66
"outDir": "out",
77
"lib": ["ES2021", "dom"],
@@ -14,7 +14,9 @@
1414
"noFallthroughCasesInSwitch": true,
1515
"experimentalDecorators": true,
1616
"resolveJsonModule": true,
17-
"skipLibCheck": true
17+
"skipLibCheck": true,
18+
"allowImportingTsExtensions": true,
19+
"noEmit": true
1820
},
1921
"exclude": ["node_modules"]
2022
}

0 commit comments

Comments
 (0)