mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
chore(lsp): temporarily reparse AST for linting (#11988)
This commit is contained in:
parent
464dcc1388
commit
00d62e64bf
1 changed files with 5 additions and 1 deletions
|
@ -139,7 +139,11 @@ pub fn get_lint_references(
|
|||
let syntax = deno_ast::get_syntax(parsed_source.media_type());
|
||||
let lint_rules = rules::get_recommended_rules();
|
||||
let linter = create_linter(syntax, lint_rules);
|
||||
let lint_diagnostics = linter.lint_with_ast(parsed_source);
|
||||
// TODO(dsherret): do not re-parse here again
|
||||
let (_, lint_diagnostics) = linter.lint(
|
||||
parsed_source.specifier().to_string(),
|
||||
parsed_source.source().text_str().to_string(),
|
||||
)?;
|
||||
|
||||
Ok(
|
||||
lint_diagnostics
|
||||
|
|
Loading…
Reference in a new issue