Skip to content

Commit 2ba83ad

Browse files
authored
new-for-builtins: Enforce new for SharedArrayBuffer and Proxy (#1438)
1 parent 768f301 commit 2ba83ad

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

docs/rules/new-for-builtins.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ Enforces the use of `new` for following builtins:
2828
- `Uint16Array`
2929
- `Uint32Array`
3030
- `Uint8ClampedArray`
31+
- `SharedArrayBuffer`
32+
- `Proxy`
3133

3234
Disallows the use of `new` for following builtins.
3335

rules/utils/builtins.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ const enforceNew = [
1515
'WeakSet',
1616
'Promise',
1717
'RegExp',
18+
'SharedArrayBuffer',
19+
'Proxy',
1820
...typedArray,
1921
];
2022

0 commit comments

Comments
 (0)