Skip to content

"From the beginning men used God to justify the unjustifiable." β€” Salman Rushdie

Enforce text to be justified (justify2) ​

πŸ’Ό This rule is enabled in the 🌐 all config.

πŸ”§ This rule is automatically fixable by the --fix CLI option.

πŸ’‘ 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/justify2': 2 } }

πŸ”— See also ​

πŸ§‘β€πŸ’» Demo ​

Released under the MIT License