eslint-plugin-unicorn
Version:
More than 100 powerful ESLint rules
31 lines (28 loc) • 402 B
JavaScript
import typedArray from '../shared/typed-array.js';
export const enforceNew = [
'Object',
'Array',
'ArrayBuffer',
'DataView',
'Date',
'Error',
'Function',
'Map',
'WeakMap',
'Set',
'WeakSet',
'Promise',
'RegExp',
'SharedArrayBuffer',
'Proxy',
'WeakRef',
'FinalizationRegistry',
...typedArray,
];
export const disallowNew = [
'BigInt',
'Boolean',
'Number',
'String',
'Symbol',
];