sonarjs/future-reserved-words
eslint-plugin-sonarjs
No autofixRecommended
eslint.config.js
export default [
{
rules: {
"sonarjs/future-reserved-words": "error",
},
},
];var package = document.getElementsByName("foo"); // Noncompliant
var someData = { package: true }; // Compliant, as it is not used as an identifier herevar elements = document.getElementsByName("foo"); // CompliantExamples from the ESLint documentation.
sonarjs/future-reserved-words
eslint-plugin-sonarjs
export default [
{
rules: {
"sonarjs/future-reserved-words": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Functions should always return the same type
Generators should explicitly "yield" a value
Functions should not be defined inside loops
A "for" loop update clause should move the counter in the right direction