Skip to content

Commit 0de0c9c

Browse files
committed
fix(linter): improve diagnostic message for no-unsafe-declaration-merging (#11508)
1 parent 958849c commit 0de0c9c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

crates/oxc_linter/src/rules/typescript/no_unsafe_declaration_merging.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use crate::{
1212

1313
fn no_unsafe_declaration_merging_diagnostic(span: Span, span1: Span) -> OxcDiagnostic {
1414
OxcDiagnostic::warn("Unsafe declaration merging between classes and interfaces.")
15-
.with_help("The TypeScript compiler doesn't check whether properties are initialized, which can cause lead to TypeScript not detecting code that will cause runtime errors.")
15+
.with_help("The TypeScript compiler doesn't check whether properties are initialized, which can lead to TypeScript not detecting code that will cause runtime errors.")
1616
.with_labels([span, span1])
1717
}
1818

@@ -27,7 +27,7 @@ declare_oxc_lint!(
2727
/// ### Why is this bad?
2828
///
2929
/// Declaration merging between classes and interfaces is unsafe.
30-
/// The TypeScript compiler doesn't check whether properties are initialized, which can cause lead to TypeScript not detecting code that will cause runtime errors.
30+
/// The TypeScript compiler doesn't check whether properties are initialized, which can lead to TypeScript not detecting code that will cause runtime errors.
3131
///
3232
/// ### Examples
3333
///

crates/oxc_linter/src/snapshots/typescript_no_unsafe_declaration_merging.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ source: crates/oxc_linter/src/tester.rs
1010
· ───
1111
4
1212
╰────
13-
help: The TypeScript compiler doesn't check whether properties are initialized, which can cause lead to TypeScript not detecting code that will cause runtime errors.
13+
help: The TypeScript compiler doesn't check whether properties are initialized, which can lead to TypeScript not detecting code that will cause runtime errors.
1414

1515
typescript-eslint(no-unsafe-declaration-merging): Unsafe declaration merging between classes and interfaces.
1616
╭─[no_unsafe_declaration_merging.tsx:2:19]
@@ -21,7 +21,7 @@ source: crates/oxc_linter/src/tester.rs
2121
· ───
2222
4
2323
╰────
24-
help: The TypeScript compiler doesn't check whether properties are initialized, which can cause lead to TypeScript not detecting code that will cause runtime errors.
24+
help: The TypeScript compiler doesn't check whether properties are initialized, which can lead to TypeScript not detecting code that will cause runtime errors.
2525

2626
typescript-eslint(no-unsafe-declaration-merging): Unsafe declaration merging between classes and interfaces.
2727
╭─[no_unsafe_declaration_merging.tsx:3:25]
@@ -32,4 +32,4 @@ source: crates/oxc_linter/src/tester.rs
3232
· ───
3333
5 │ }
3434
╰────
35-
help: The TypeScript compiler doesn't check whether properties are initialized, which can cause lead to TypeScript not detecting code that will cause runtime errors.
35+
help: The TypeScript compiler doesn't check whether properties are initialized, which can lead to TypeScript not detecting code that will cause runtime errors.

0 commit comments

Comments
 (0)