eslint-plugin-es
eslint-plugin-es copied to clipboard
New Rule Proposal: `no-private-fields-in-in`
Please describe what the rule should do:
Disallows #x in obj
syntax added in ES2022.
https://github.com/tc39/proposal-private-fields-in-in
Provide 2-3 code examples that this rule will warn about:
class C {
#brand;
static isC(obj) {
return #brand in obj; // <-
}
}