Skip to content

Commit 198f2e9

Browse files
committed
docs(linter): fix code example for branches-sharing-code (#14514)
fixes oxc-project/oxc-project.github.io#544
1 parent 54b001f commit 198f2e9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crates/oxc_linter/src/rules/oxc/branches_sharing_code.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ declare_oxc_lint!(
5050
///
5151
/// Examples of **incorrect** code for this rule:
5252
/// ```javascript
53-
/// let foo = if (condition) {
53+
/// if (condition) {
5454
/// console.log("Hello");
55-
/// 13
55+
/// return 13;
5656
/// } else {
5757
/// console.log("Hello");
58-
/// 42
58+
/// return 42;
5959
/// };
6060
///
6161
/// if (condition) {
@@ -70,10 +70,10 @@ declare_oxc_lint!(
7070
/// Examples of **correct** code for this rule:
7171
/// ```javascript
7272
/// console.log("Hello");
73-
/// let foo = if (condition) {
74-
/// 13
73+
/// if (condition) {
74+
/// return 13;
7575
/// } else {
76-
/// 42
76+
/// return 42;
7777
/// };
7878
///
7979
/// if (condition) {

0 commit comments

Comments
 (0)