Skip to content

Commit dc0ff73

Browse files
authored
docs(linter/no-useless-constructor): warn for parameter properties as well (#19638)
Clarify the caveat regarding visibility changes in constructors. Signed-off-by: Ole Asteo <[email protected]>
1 parent 88a2081 commit dc0ff73

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

crates/oxc_linter/src/rules/eslint/no_useless_constructor.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ declare_oxc_lint!(
5454
///
5555
/// ::: warning
5656
/// Caveat: This lint rule will report on constructors whose sole purpose
57-
/// is to change visibility of a parent constructor. This is because the rule
58-
/// does not have type information to determine if the parent constructor is
59-
/// `public`, `protected`, or `private`.
57+
/// is to change the visibility of a parent constructor, or to expose parameter
58+
/// properties with modifiers. This is because the rule does not have type
59+
/// information to determine if the parent constructor is `public`, `protected`,
60+
/// or `private`.
6061
/// :::
6162
///
6263
/// ### Examples

0 commit comments

Comments
 (0)