-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: support multiple TypeScript versions #123
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #123 +/- ##
===========================================
- Coverage 81.79% 67.31% -14.49%
===========================================
Files 10 21 +11
Lines 835 1184 +349
Branches 93 88 -5
===========================================
+ Hits 683 797 +114
- Misses 152 387 +235 ☔ View full report in Codecov by Sentry. |
} | ||
|
||
const host = ts.createCompilerHost(parsed.options, true); | ||
return ts.createProgram(parsed.fileNames, parsed.options, host); |
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.
I couldn't figure out how to get the programs created by this to read from the files set up by the rule tester. https://github.com/JoshuaKGoldberg/eslint-plugin-expect-type/actions/runs/7283460649/job/19847369501 > #123 (comment):
Right now in tests this is logging:
sourceFile.getText() // (stub file for RuleTester programs)
🤔 I couldn't figure out how to get the program to read from virtual memory. Grr.
For now the versions
option isn't unit tested... Not great.
PR Checklist
status: accepting prs
Overview
Adds in an optional
versions
option to theexpect
rule. It allows passing in an array of objects with a requiredname
andpath
properties.