You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems sensible to me too! Note right now we purposefully avoid any of those rules that rely on type checking (see design decisions) for two reasons:
Avoiding them means we can use the exact same configuration for all projects. Using those rules would mean departing from this approach and having separate "vanilla JS" and "TypeScript" configurations.
There’s a clear performance cost. We could probably reduce it a fair bit by running ESLint with caching, right now it’s only briefly mentioned in the README but not something we tend to actually have set up.
If we were to compromise on the above two so we can add new rules, I imagine we’d want to add multiple rules that require type checking at the same time to justify the higher cost.
I think https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md would be a valuable addition that would make our code less prone to errors.
The text was updated successfully, but these errors were encountered: