When type validation runs via npm run typecheck (for example in the github actions pipeline) we're pointing it to tsconfig.eslint.json. However, VS Code will only run Typescript using tsconfig.json, and there is no way (at least from what I could find out) to configure it to use tsconfig.eslint.json instead. This means that the includes/excludes are different, causing unexpected validation errors when you set up a PR.
Most notably, all story files get ignored by VS Code, but this is then overwritten when using tsconfig.eslint.json,
// tsconfig.json
"exclude": [
"__mocks__",
"cypress",
"coverage",
"**/*.test.ts",
"**/*.test.tsx",
"**/test/*.ts",
"**/test/*.tsx",
"**/*.stories.tsx"
],
// tsconfig.eslint.json
"exclude": [
"coverage",
"dist",
"docs",
"example-data",
"node_modules",
"./package-lock.json"
]
Is there any particular reason the configs have been set up like this? Do we actually need tsconfig.eslint.json, or can we just merge it into the base config?
When type validation runs via
npm run typecheck(for example in the github actions pipeline) we're pointing it totsconfig.eslint.json. However, VS Code will only run Typescript usingtsconfig.json, and there is no way (at least from what I could find out) to configure it to usetsconfig.eslint.jsoninstead. This means that the includes/excludes are different, causing unexpected validation errors when you set up a PR.Most notably, all story files get ignored by VS Code, but this is then overwritten when using
tsconfig.eslint.json,Is there any particular reason the configs have been set up like this? Do we actually need
tsconfig.eslint.json, or can we just merge it into the base config?