mirror of
https://github.com/denoland/deno.git
synced 2025-02-01 12:16:11 -05:00
Solving the issues related to the lint and format
This commit is contained in:
parent
de4a115da7
commit
81deb058a0
1 changed files with 5 additions and 5 deletions
|
@ -303,13 +303,13 @@ fn format_js_error_inner(
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_suggestions_for_terminal_errors(e: &JsError) -> Vec<FixSuggestion> {
|
fn get_suggestions_for_terminal_errors(e: &JsError) -> Vec<FixSuggestion> {
|
||||||
if let Some(frame) = e.frames.get(0) {
|
if let Some(frame) = e.frames.first() {
|
||||||
if let Some(file_name) = &frame.file_name {
|
if let Some(file_name) = &frame.file_name {
|
||||||
if file_name.ends_with(".mjs") || file_name.ends_with(".mts") {
|
if file_name.ends_with(".mjs") || file_name.ends_with(".mts") {
|
||||||
return vec![];
|
return vec![];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(msg) = &e.message {
|
if let Some(msg) = &e.message {
|
||||||
if msg.contains("module is not defined")
|
if msg.contains("module is not defined")
|
||||||
|| msg.contains("exports is not defined")
|
|| msg.contains("exports is not defined")
|
||||||
|
|
Loading…
Add table
Reference in a new issue