fix(lsp): provide diagnostics for import assertions (#13105)

Fixes: #13099
This commit is contained in:
Kitson Kelly 2021-12-16 14:53:17 +11:00 committed by GitHub
parent 0f53b82cd2
commit e28fb70aee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 230 additions and 25 deletions

View file

@ -1181,7 +1181,10 @@ impl Inner {
"deno-lint" => matches!(&d.code, Some(_)),
"deno" => match &d.code {
Some(NumberOrString::String(code)) => {
code == "no-cache" || code == "no-cache-data"
matches!(
code.as_str(),
"no-cache" | "no-cache-data" | "no-assert-type"
)
}
_ => false,
},
@ -1241,7 +1244,7 @@ impl Inner {
}
}
Some("deno") => code_actions
.add_deno_fix_action(diagnostic)
.add_deno_fix_action(&specifier, diagnostic)
.map_err(|err| {
error!("{}", err);
LspError::internal_error()