unicorn/indent
eslint-plugin-unicorn
Safe autofix
eslint.config.js
import unicorn from "eslint-plugin-unicorn";
export default [
{
plugins: { unicorn },
rules: {
"unicorn/indent": "error",
},
},
];The documentation shows no incorrect example for this rule.
a {
color: red;
}
b {
color: blue;
}Examples from the ESLint documentation.
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/indent
eslint-plugin-unicorn
import unicorn from "eslint-plugin-unicorn";
export default [
{
plugins: { unicorn },
rules: {
"unicorn/indent": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Enforce a consistent style for optional loop sources.