-
Notifications
You must be signed in to change notification settings - Fork 47
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
Add 'severityOverride' option #725
Conversation
bff3f30
to
790e337
Compare
Really interesting. Like tsc, bsc doesn't have an "eslint-esque" rules engine where there's a very clear way to turn on and off errors and give them different severity levels. Instead, TS "rules" are governed by human-readable options that are kind of disjointed from the error message you get... i.e., when your build pops out So, I like your approach, although I see two issues:
|
Yes @elliot-nelson, the whole point of this setting is to be a workaround - it should feel nasty! Unlike eslint, plugins contributing to diagnostics can be heterogeneous so yes, this property is meant to be seen as a "workaround", which is useful when transitioning a project to bsc/bslint (as our colleagues are doing) where a lot of errors can be non-fatal in the current state of the codebase but need time to clean up. |
ebfb3e5
to
e98ca6d
Compare
src/BsConfig.ts
Outdated
/** | ||
* A map of error codes with their severity level override (error|warn|info) | ||
*/ | ||
severityOverride?: Record<number | string, 'error' | 'warn' | 'info' | 'hint'>; |
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.
Let's call this diagnosticSeverityOverrides
instead? Keeps it more in line with diagnosticFilters
bsconfig.json
now accepts aseverityOverride
map allowing to adjust a diagnostic severity.Fixes #724 - see issue for details