unicorn/empty-brace-spaces
eslint-plugin-unicorn
Safe autofix
eslint.config.js
import unicorn from "eslint-plugin-unicorn";
export default [
{
plugins: { unicorn },
rules: {
"unicorn/empty-brace-spaces": "error",
},
},
];class Unicorn {
}try {
foo();
} catch { }class Unicorn {}try {
foo();
} catch {}Examples from the ESLint documentation.
unicorn/empty-brace-spaces
eslint-plugin-unicorn
import unicorn from "eslint-plugin-unicorn";
export default [
{
plugins: { unicorn },
rules: {
"unicorn/empty-brace-spaces": "error",
},
},
];unicorn/empty-brace-spaces
unicorn plugin · style
{
"rules": {
"unicorn/empty-brace-spaces": "error"
}
}Biome does not have this rule.
Enforce consistent style for escaping ${ in template literals.
Disallow Array#reduce() and Array#reduceRight().
Enforce consistent assertion style with node:assert.
Disallow member access from await expression.
Disallow immediate mutation after assignment and initialization immediately after declaration.
Disallow confusing uses of Array#with().