no-new-symbol
eslint
No autofix
eslint.config.js
export default [
{
rules: {
"no-new-symbol": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
var foo = new Symbol('foo');var foo = Symbol('foo');
// Ignores shadowed Symbol.
function bar(Symbol) {
const baz = new Symbol("baz");
}Examples from the ESLint documentation.
no-new-symbol
eslint
export default [
{
rules: {
"no-new-symbol": "error",
},
},
];Oxlint does not have this rule.
correctness/noInvalidBuiltinInstantiation
correctness · since 1.7.2
{
"linter": {
"rules": {
"correctness": {
"noInvalidBuiltinInstantiation": "error"
}
}
}
}Enforce variables to be declared either together or separately in functions
Disallow new operators outside of assignments or comparisons
Disallow assignment operators in return statements
Disallow specified global variables