This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 887
Need way to specify min TS version for a test #2304
Comments
maybe we just drop 2.0.10 in v5... |
+1 for dropping ts 2.0, but the problem still remains for rules that use new language features / syntax #2219 fails because typescript just doesn't properly parse code with object spread. I don't think the rule itself can do anything special with the AST to detect such cases. I also would not go the route of adding more stuff to the config file. Rule tests already use their own syntax for expected failures. Why not simply add a directive with a semver selector at the top of the *.ts.lint file. Something like |
4 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
#2219 fails on ts 2.0.10 because spread isn't supported, so we need a way to disable tests for certain versions.
One way to do this might be to have a config setting that specifies the min version number. I think a more flexible approach would be to throw a special Error if an unsupported construct is detected when the rule is executed. These errors would cause the rule test runner to ignore that test. We would also need a way to ensure that the Error is expected, maybe a new property of the config file.
The text was updated successfully, but these errors were encountered: