generator-star-spacing
eslint
Safe autofix
eslint.config.js
export default [
{
rules: {
"generator-star-spacing": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
Enforce consistent spacing around * operators in generator functions
/*eslint generator-star-spacing: ["error", {
"before": false,
"after": true,
"anonymous": "neither",
"method": {"before": true, "after": true}
}]*/
function * generator() {}
var anonymous = function* () {};
var shorthand = { *generator() {} };
class Class { static* method() {} }function *generator() {
yield "44";
yield "55";
}function * generator() {
yield "44";
yield "55";
}Examples from the ESLint documentation.
generator-star-spacing
eslint
export default [
{
rules: {
"generator-star-spacing": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Disallow the use of alert, confirm, and prompt
Enforce the use of variables within the scope they are defined
Disallow certain properties on certain objects