deny-soft-private-modifier
This plugin disallows the use of soft private modifier.
- ⭐️ This rule is included in
plugin:@rdlabo/rules/recommendedpreset.- ✒️ The
--fixoption on the command line can automatically fix some of the problems reported by this rule.
Rule Details
❌ Incorrect: Using the private modifier for class fields
@Component({})
export class SigninPage {
private platform = inject(Platform);
}
✅ Correct: Using the hard private field syntax (#)
@Component({})
export class SigninPage {
#platform = inject(Platform);
}