-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
exclude __tests__ from tsc #2628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,5 +35,5 @@ | |
| "checkJs": false, | ||
| }, | ||
| "include": ["src/**/*.ts"], | ||
| "exclude": ["node_modules"] | ||
| "exclude": ["node_modules", "src/__tests__/**"] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Excluding Consider creating a separate Prompt for AI agents |
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type-aware ESLint will likely break for test files with this exclusion.
Because ESLint uses
parserOptions.project: "./tsconfig.json"while lint targetssrc/**/*.ts, excludingsrc/__tests__/**here can cause parser project-inclusion errors on test files duringnpm run lint. Keep this exclusion fortsc, but add a dedicated ESLint tsconfig that includes tests (or point ESLint to a separate project file).Suggested config split
# tsconfig.json (typecheck/build) "exclude": ["node_modules", "src/__tests__/**"]🤖 Prompt for AI Agents