summaryrefslogtreecommitdiff
path: root/cli/tools/lint.rs
diff options
context:
space:
mode:
authorChristian Dürr <102963075+cd-work@users.noreply.github.com>2022-09-02 20:53:23 +0000
committerGitHub <noreply@github.com>2022-09-02 22:53:23 +0200
commit63b8089bda8c88413bfad24aef415abc09e8d5c2 (patch)
treeb27b798ee77e75b36c487a19edd22e658fe76984 /cli/tools/lint.rs
parent4f8dea100e751d550a4a40d11b142fc9a7c4a5a8 (diff)
refactor: move JsError formatting to deno_runtime (#15345)
This takes the existing `fmt_error` module from cli and puts it as a public module into `deno_runtime`.
Diffstat (limited to 'cli/tools/lint.rs')
-rw-r--r--cli/tools/lint.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/tools/lint.rs b/cli/tools/lint.rs
index cfc663387..0bee44d4c 100644
--- a/cli/tools/lint.rs
+++ b/cli/tools/lint.rs
@@ -12,7 +12,6 @@ use crate::args::LintFlags;
use crate::colors;
use crate::file_watcher;
use crate::file_watcher::ResolutionResult;
-use crate::fmt_errors;
use crate::fs_util::collect_files;
use crate::fs_util::is_supported_ext;
use crate::fs_util::specifier_to_file_path;
@@ -29,6 +28,7 @@ use deno_lint::linter::Linter;
use deno_lint::linter::LinterBuilder;
use deno_lint::rules;
use deno_lint::rules::LintRule;
+use deno_runtime::fmt_errors::format_location;
use log::debug;
use log::info;
use serde::Serialize;
@@ -382,7 +382,7 @@ impl LintReporter for PrettyLintReporter {
&source_lines,
d.range.clone(),
d.hint.as_ref(),
- &fmt_errors::format_location(&JsStackFrame::from_location(
+ &format_location(&JsStackFrame::from_location(
Some(d.filename.clone()),
Some(d.range.start.line_index as i64 + 1), // 1-indexed
// todo(#11111): make 1-indexed as well