https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields
Prefer private fields over the convention of underscore prefixed names.
This feature requires Node.js 12, so we cannot add it to the recommended preset until April 2021 (date of Node.js 10 obsoletion).
Does ESLint support this feature yet?
class Foo {
static _PRIVATE_STATIC_FIELD
_privateField
_privateMethod() {
return 'hello world'
}
}
class Foo {
static #PRIVATE_STATIC_FIELD
#privateField
#privateMethod() {
return 'hello world'
}
}
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too