Whenever I was opening a file at the root of the repo, like cypress.config.ts, VS Code would notify me to properly configure excluded files in tsconfig.json.
I used this technique to find out which files were included by the root tsconfig.json. Since we didn't use to specify include or exclude, the defaults applied as expected, which meant that node_modules folders were properly excluded but not build folders.
Keeping with our approach of using include over exclude to specify files to type-check, I add an include array in the root tsconfig.json that includes all the files that are not included by other tsconfig.json files:
* = root TS/JS files
apps/*/*, packages/*/* = files at the root of every project directory (e.g. .eslintrc.cjs)
cypress = files in the Cypress folder
Technically, the Cypress files are already included by their own tsconfig.json, but I had to include them in the root tsconfig.json as well because of ESLint.
While I was debugging included files, I also noticed that the apps/storybook/.storybook folder was neither linted nor type-checked. This comment helped me solve the issue.
For future reference:
to list files included by TS, use flag --listFilesOnly
to list files linted by ESLint, use environment variable DEBUG=eslint:cli-engine
Whenever I was opening a file at the root of the repo, like
cypress.config.ts
, VS Code would notify me to properly configure excluded files intsconfig.json
.I used this technique to find out which files were included by the root
tsconfig.json
. Since we didn't use to specifyinclude
orexclude
, the defaults applied as expected, which meant thatnode_modules
folders were properly excluded but not build folders.Keeping with our approach of using
include
overexclude
to specify files to type-check, I add aninclude
array in the roottsconfig.json
that includes all the files that are not included by othertsconfig.json
files:*
= root TS/JS filesapps/*/*
,packages/*/*
= files at the root of every project directory (e.g..eslintrc.cjs
)cypress
= files in the Cypress folderWhile I was debugging included files, I also noticed that the
apps/storybook/.storybook
folder was neither linted nor type-checked. This comment helped me solve the issue.