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
We would want to think carefully about it, but we might want to consider using the language server, in some fashion, to provide type information in certain scenarios for certain rules. Possibly keeping it behind a flag. The language server can provide very specific type information at particular points in the code which could make rules like no-fallthrough, and undeclared globals more accurate. When using linting in the editor, the language server is already running, so there is little cost overhead, though a deno lint would have the cost of the tsc start up.
I would think that we would only do a type query when we "think" a diagnostic is being produced, but we want to do final validation. Like we "think" there is fall through in a case statement, but we see a function call at the end, so we quickly check with the language server the return type of the function.
Sounds like a great idea, being able to acquire type information would solve a bunch of problems we've had for a long time.
It seems a good compromise to query type info only when diagnostics are likely produced. I think another option would be adding some tag to the rules that require type information, and then running deno lint --quick would skip the rules tagged with it.
We would want to think carefully about it, but we might want to consider using the language server, in some fashion, to provide type information in certain scenarios for certain rules. Possibly keeping it behind a flag. The language server can provide very specific type information at particular points in the code which could make rules like no-fallthrough, and undeclared globals more accurate. When using linting in the editor, the language server is already running, so there is little cost overhead, though a
deno lint
would have the cost of the tsc start up.I would think that we would only do a type query when we "think" a diagnostic is being produced, but we want to do final validation. Like we "think" there is fall through in a case statement, but we see a function call at the end, so we quickly check with the language server the return type of the function.
Ping @magurotuna @dsherret
The text was updated successfully, but these errors were encountered: