diff --git a/crates/rome_lsp/src/utils.rs b/crates/rome_lsp/src/utils.rs index 798a9daaf39..97517bc5c6c 100644 --- a/crates/rome_lsp/src/utils.rs +++ b/crates/rome_lsp/src/utils.rs @@ -220,8 +220,9 @@ pub(crate) fn diagnostic_to_lsp( let code_description = diagnostic .category() .and_then(|category| category.link()) - .map(|link| CodeDescription { - href: Url::parse(link).unwrap(), + .and_then(|link| { + let href = Url::parse(link).ok()?; + Some(CodeDescription { href }) }); let message = PrintDescription(&diagnostic).to_string(); diff --git a/website/src/pages/lint/rules/noInnerDeclarations.md b/website/src/pages/lint/rules/noInnerDeclarations.md index 7aee4756e92..46e2b1ee0aa 100644 --- a/website/src/pages/lint/rules/noInnerDeclarations.md +++ b/website/src/pages/lint/rules/noInnerDeclarations.md @@ -140,3 +140,7 @@ function f() { } ``` +## Related links + +- [Disable a rule](/linter/#disable-a-lint-rule) +- [Rule options](/linter/#rule-options)