mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 10:33:54 +00:00
fix(lsp): provide diagnostics for import assertions (#13105)
Fixes: #13099
This commit is contained in:
parent
0f53b82cd2
commit
e28fb70aee
6 changed files with 230 additions and 25 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue