mirror of
https://github.com/denoland/deno.git
synced 2025-08-03 18:38:33 +00:00
Update lspower dependency (#9179)
This commit is contained in:
parent
11dd6f2013
commit
013b8fe606
10 changed files with 181 additions and 170 deletions
|
@ -11,9 +11,9 @@ use crate::tools::lint::create_linter;
|
|||
use deno_core::error::AnyError;
|
||||
use deno_core::ModuleSpecifier;
|
||||
use deno_lint::rules;
|
||||
use lspower::lsp_types;
|
||||
use lspower::lsp_types::Position;
|
||||
use lspower::lsp_types::Range;
|
||||
use lspower::lsp;
|
||||
use lspower::lsp::Position;
|
||||
use lspower::lsp::Range;
|
||||
use std::collections::HashMap;
|
||||
use std::rc::Rc;
|
||||
|
||||
|
@ -77,14 +77,14 @@ pub fn get_lint_references(
|
|||
|
||||
pub fn references_to_diagnostics(
|
||||
references: Vec<Reference>,
|
||||
) -> Vec<lsp_types::Diagnostic> {
|
||||
) -> Vec<lsp::Diagnostic> {
|
||||
references
|
||||
.into_iter()
|
||||
.map(|r| match r.category {
|
||||
Category::Lint { message, code, .. } => lsp_types::Diagnostic {
|
||||
Category::Lint { message, code, .. } => lsp::Diagnostic {
|
||||
range: r.range,
|
||||
severity: Some(lsp_types::DiagnosticSeverity::Warning),
|
||||
code: Some(lsp_types::NumberOrString::String(code)),
|
||||
severity: Some(lsp::DiagnosticSeverity::Warning),
|
||||
code: Some(lsp::NumberOrString::String(code)),
|
||||
code_description: None,
|
||||
source: Some("deno-lint".to_string()),
|
||||
message,
|
||||
|
@ -270,12 +270,12 @@ mod tests {
|
|||
let actual = as_lsp_range(&fixture);
|
||||
assert_eq!(
|
||||
actual,
|
||||
lsp_types::Range {
|
||||
start: lsp_types::Position {
|
||||
lsp::Range {
|
||||
start: lsp::Position {
|
||||
line: 0,
|
||||
character: 2,
|
||||
},
|
||||
end: lsp_types::Position {
|
||||
end: lsp::Position {
|
||||
line: 1,
|
||||
character: 0,
|
||||
},
|
||||
|
@ -293,7 +293,7 @@ mod tests {
|
|||
Router,
|
||||
Status,
|
||||
} from "https://deno.land/x/oak@v6.3.2/mod.ts";
|
||||
|
||||
|
||||
// @deno-types="https://deno.land/x/types/react/index.d.ts";
|
||||
import * as React from "https://cdn.skypack.dev/react";
|
||||
"#;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue