securityos/node_modules/eslint-plugin-unicorn/rules/utils/builtins.js

37 lines
457 B
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
'use strict';
const typedArray = require('../shared/typed-array.js');
const enforceNew = [
'Object',
'Array',
'ArrayBuffer',
'DataView',
'Date',
'Error',
'Function',
'Map',
'WeakMap',
'Set',
'WeakSet',
'Promise',
'RegExp',
'SharedArrayBuffer',
'Proxy',
'WeakRef',
'FinalizationRegistry',
...typedArray,
];
const disallowNew = [
'BigInt',
'Boolean',
'Number',
'String',
'Symbol',
];
module.exports = {
enforceNew,
disallowNew,
};