Skip to content

Commit

Permalink
fix(linter): improve diagnostic for noConstructorReturn (#4492)
Browse files Browse the repository at this point in the history
  • Loading branch information
arendjr authored Nov 9, 2024
1 parent 13904f2 commit fbf4b3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ impl Rule for NoConstructorReturn {
).detail(
constructor.range(),
"The constructor is here:"
).note("Returning a value from a constructor is ignored."))
).note("Returning a value from a constructor may confuse users of the class."))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ invalid.js:3:3 lint/correctness/noConstructorReturn ━━━━━━━━━
5 │ }
6 │
i Returning a value from a constructor is ignored.
i Returning a value from a constructor may confuse users of the class.
```
Expand Down Expand Up @@ -86,7 +86,7 @@ invalid.js:9:3 lint/correctness/noConstructorReturn ━━━━━━━━━
11 │ }
12 │
i Returning a value from a constructor is ignored.
i Returning a value from a constructor may confuse users of the class.
```
Expand Down Expand Up @@ -115,7 +115,7 @@ invalid.js:16:3 lint/correctness/noConstructorReturn ━━━━━━━━━
18 │ }
19 │
i Returning a value from a constructor is ignored.
i Returning a value from a constructor may confuse users of the class.
```
Expand Down Expand Up @@ -146,9 +146,7 @@ invalid.js:24:4 lint/correctness/noConstructorReturn ━━━━━━━━━
│ ^
28 │ }
i Returning a value from a constructor is ignored.
i Returning a value from a constructor may confuse users of the class.
```


0 comments on commit fbf4b3d

Please sign in to comment.