Skip to content

Commit 191a164

Browse files
committed
test(linter/no-unused-private-class-members): add more test cases (#12563)
1 parent 0179c86 commit 191a164

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ fn test() {
342342
}
343343
}",
344344
r"class ChildProcess extends EventEmitter { #stdioObject; #createStdioObject() {} get stdio() { return (this.#stdioObject ??= this.#createStdioObject()); } }",
345+
"export class Foo { readonly #select = 123; override render() { return html`foo=${this.#select}`; } }",
346+
" export class Foo { #listened = false; bar() { if (!this.#listened) return; this.#listened = false; } } ",
347+
"export class RichText { #verticalScrollContainer; init() { const verticalScrollContainer = this.#verticalScrollContainer || (this.#verticalScrollContainer = this.verticalScrollContainerGetter?.() || null); } }",
345348
];
346349

347350
let fail = vec![

0 commit comments

Comments
 (0)