Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Description
Before You File a Proposal Please Confirm You Have Done The Following...
- I havesearched for related issues and found none that match my proposal.
- I have searched thecurrent rule list and found no rules that match my proposal.
- I haveread the FAQ and my problem is not listed.
Relevant Package
typescript-eslint
My proposal is suitable for this project
- I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).
Description
When using an unsupported TypeScript version, my automated testing should test for this, and fail, as using an unsupported TypeScript version can cause unexpected and unwanted behavior.
The currentwarnOnUnsupportedTypeScriptVersion
behavior (when set totrue
) is to display a warning message, but not fail the testing. While useful for testing new typescript version, this is not desired behaviour in a production environment, where I want my (style) tests to be reliable and updates to typescript to be testable in an safe and automated way. The output of these ESlint tests are not inspected manually, and only errors will be detected.
My solution proposal would be to update thewarnOnUnsupportedTypeScriptVersion
configuration option to becomeonUnsupportedTypeScriptVersion
instead, with possible values
warn
to only display unsupported typescript version message (the current default, equal towarnOnUnsupportedTypeScriptVersion=true
)error
to display unsupported typescript version message and fail/error (new behavior)ignore
to not display anything on usage of unsupported typescript version and just run the tests as if the typescript version would be supported (equal towarnOnUnsupportedTypeScriptVersion=false
).
I would further argue that given the above solution proposal,error
should be the default behaviour, as it is safer thanwarn
andignore
.
Additional Info
No response