"I just think it's weird that you use spaces instead of tabs." β Richard Hendricks
Require word separators to be tabs, not spaces (prefer-tab
) β
πΌ This rule is enabled in the π all
config.
π§ This rule is automatically fixable by the --fix
CLI option.
π Rule details β
Tabs are better than spaces. However and unfortunately, most developers still use spaces to separate words.
π‘ Examples β
js
// β Incorrect
if (a) {
b = c
function foo(d) {
e = f
}
}
// β
Correct
if (a) {
b = c
function foo(d) {
e = f
}
}
π§ Config β
js
{ rules: { 'ninja/prefer-tab': 2 } }