$ npm install @putout/plugin-remove-unused-private-fields
Class fields are public by default, but private class members can be created by using a hash
#
prefix. The privacy encapsulation of these class features is enforced by JavaScript itself.(c) MDN
🐊Putout plugin adds ability to remove unused private fields.
npm i @putout/plugin-remove-unused-private-fields
{
"rules": {
"remove-unused-private-fields": "on"
}
}
class Hello {
#a = 5;
#b = 3;
get() {
return this.#a;
}
}
class Hello {
#a = 5;
get() {
return this.#a;
}
}
MIT
© 2010 - cnpmjs.org x YWFE | Home | YWFE