-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Explicitly set strict: false for project tests, eval tests, and more programmatic fourslash tests
#63024
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
Conversation
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.
Pull request overview
This PR explicitly sets strict: false for existing tests that rely on non-strict mode behavior, as part of the larger effort (#62333) to make --strict the default in TypeScript. The changes ensure these tests continue to work correctly once the default is changed.
Changes:
- Added
"strict": falseto 72 project test configuration JSON files - Updated corresponding baseline JSON files to reflect the new configuration
- Added
// @strict: falsedirective to 10 fourslash test files - Added
strict: falseto theevaluateTypeScriptfunction's default compiler options
Reviewed changes
Copilot reviewed 260 out of 260 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/cases/project/*.json (72 files) | Added "strict": false to project test configurations |
| tests/baselines/reference/project//.json (144 files) | Updated baseline files to reflect the new strict:false setting |
| tests/cases/fourslash/*.ts (10 files) | Added // @strict: false compiler directive |
| src/harness/evaluatorImpl.ts | Added strict: false to default compiler options for eval tests |
jakebailey
left a comment
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.
Do the evaluator tests really need strict? Or just alwaysStrict?
I believe they do - I think they consider any diagnostics to be a "syntax error". |
Part of #62333.
"strict": falseline added to each project file.evaluateTypeScripttests assumestrictis implicitly off.// @strict: falseI think with this PR and #63023, we may be able to just flip the
strictswitch, accept baselines, and have tests pass.