-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(atomic): fix tsconfig resolution for the e2e folders (#4462)
https://coveord.atlassian.net/browse/KIT-3604 In order to fix this problem, we have to tell the TS server to use `"moduleResolution":"Bundler" & "module": "ES2022"` for the e2e/ folders. They are currently excluded in the atomic root tsconfig which is why we get the error here. <img width="1261" alt="image" src="https://github.com/user-attachments/assets/a1956eda-a88b-4eb6-925d-c5d18cd8227f"> This is the solution I came up with, we would now have a tsconfig for the IDE, a tsconfig for the stencil compilation, a tsconfig for the storybook compilation and a tsconfig for playwright eslint rules 😅 . If anyone has a better idea I am very open to it.
- Loading branch information
1 parent
944d8b2
commit 2a037ff
Showing
3 changed files
with
35 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,10 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"allowSyntheticDefaultImports": true, | ||
"declaration": false, | ||
"experimentalDecorators": true, | ||
"lib": ["dom", "ES2023", "ESNext.Collection"], | ||
"moduleResolution": "Bundler", | ||
"module": "ES2022", | ||
"target": "ES2021", | ||
"resolveJsonModule": true, | ||
"useDefineForClassFields": false, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"jsx": "react", | ||
"jsxFactory": "h" | ||
}, | ||
"references": [ | ||
{ | ||
"path": "./tsconfig.storybook.json" | ||
} | ||
], | ||
"include": ["src", "types/jsx.d.ts"], | ||
"extends": "./tsconfig.stencil.json", | ||
"exclude": [ | ||
"node_modules", | ||
"src/external-builds", | ||
"**/*.stories.tsx", | ||
"**/*.stories.ts", | ||
"**/*.stories.js", | ||
"**/e2e/**/*" | ||
"**/*.stories.js" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"allowSyntheticDefaultImports": true, | ||
"declaration": false, | ||
"experimentalDecorators": true, | ||
"lib": ["dom", "ES2023", "ESNext.Collection"], | ||
"moduleResolution": "Bundler", | ||
"module": "ES2022", | ||
"target": "ES2021", | ||
"resolveJsonModule": true, | ||
"useDefineForClassFields": false, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"jsx": "react", | ||
"jsxFactory": "h" | ||
}, | ||
"references": [ | ||
{ | ||
"path": "./tsconfig.storybook.json" | ||
} | ||
], | ||
"include": ["src", "types/jsx.d.ts"], | ||
"exclude": [ | ||
"node_modules", | ||
"src/external-builds", | ||
"**/*.stories.tsx", | ||
"**/*.stories.ts", | ||
"**/*.stories.js", | ||
"**/e2e/**/*" | ||
] | ||
} |