]> git.proxmox.com Git - pve-eslint.git/blobdiff - eslint/docs/rules/prefer-destructuring.md
import 8.3.0 source
[pve-eslint.git] / eslint / docs / rules / prefer-destructuring.md
index 7f18559ed501ce8e61baa50ecb4f0df284fd8867..64e914fcee4931f694e375c5f592a580177a3180 100644 (file)
@@ -62,6 +62,17 @@ Examples of **correct** code when `enforceForRenamedProperties` is enabled:
 var { bar: foo } = object;
 ```
 
+Examples of additional **correct** code when `enforceForRenamedProperties` is enabled:
+
+```javascript
+class C {
+    #x;
+    foo() {
+        const bar = this.#x; // private identifiers are not allowed in destructuring
+    }
+}
+```
+
 An example configuration, with the defaults `array` and `object` filled in, looks like this:
 
 ```json