unicorn/comma-spacing
eslint-plugin-unicorn
Safe autofix
eslint.config.js
import unicorn from "eslint-plugin-unicorn";
export default [
{
plugins: { unicorn },
rules: {
"unicorn/comma-spacing": "error",
},
},
];Enforce consistent spacing before and after commas in JSON and SOML.
No code example for this rule
The linters' documentation does not include one we could extract.
No tracked preset enables this rule, so it has no reach yet.
None of the tracked presets enable this rule. Turn it on with the config below.
unicorn/comma-spacing
eslint-plugin-unicorn
import unicorn from "eslint-plugin-unicorn";
export default [
{
plugins: { unicorn },
rules: {
"unicorn/comma-spacing": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Enforce consistent spacing before and after commas in <template>
Enforce a consistent return style for multiline arrow function bodies.