Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,23 @@ use crate::{
};

fn func_missing_return_type(fn_span: Span) -> OxcDiagnostic {
OxcDiagnostic::warn("Missing return type on function").with_label(fn_span)
OxcDiagnostic::warn("Missing return type on function")
.with_help("Define an explicit return type for the function.")
.with_label(fn_span)
}

fn func_missing_argument_type(param_span: Span) -> OxcDiagnostic {
OxcDiagnostic::warn("Missing argument type on function").with_label(param_span)
OxcDiagnostic::warn("Missing argument type on function")
.with_help("Define an explicit argument type for each argument.")
.with_label(param_span)
}

fn func_argument_is_explicitly_any(param_span: Span) -> OxcDiagnostic {
OxcDiagnostic::warn("Argument is explicitly typed as `any`").with_label(param_span)
OxcDiagnostic::warn("Argument is explicitly typed as `any`")
.with_help(
"Avoid explicit `any` at module boundaries; prefer `unknown` and narrow before use.",
)
.with_label(param_span)
}

#[derive(Debug, Default, Clone, Deserialize)]
Expand Down
Loading
Loading