Skip to content

Commit

Permalink
new-for-builtins: Enforce new for SharedArrayBuffer and Proxy (
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Jul 20, 2021
1 parent 768f301 commit 2ba83ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/rules/new-for-builtins.md
Expand Up @@ -28,6 +28,8 @@ Enforces the use of `new` for following builtins:
- `Uint16Array`
- `Uint32Array`
- `Uint8ClampedArray`
- `SharedArrayBuffer`
- `Proxy`

Disallows the use of `new` for following builtins.

Expand Down
2 changes: 2 additions & 0 deletions rules/utils/builtins.js
Expand Up @@ -15,6 +15,8 @@ const enforceNew = [
'WeakSet',
'Promise',
'RegExp',
'SharedArrayBuffer',
'Proxy',
...typedArray,
];

Expand Down

0 comments on commit 2ba83ad

Please sign in to comment.