The ultimate ESLint plugin.
// Make your code look like this!
import π from 'left-pad'
import π from 'is-even'
let β = '1'
let π₯ = +π(β++, β)
let π = π₯++ + ++β + +π(++π₯)
let π― = π + π₯ * ποΈ
// 12% of the people can't solve this! π
console.log(π(β, π―, π) + 1)
npm i -D eslint-plugin-ninja
{
"plugins": ["ninja"],
"extends": ["plugin:ninja/recommended"],
"rules": {
"ninja/align": 2,
"ninja/prefer-emoji": 1
}
}
π§ Automatically fixable by the
--fix
CLI option.
Name | Description | π§ |
---|---|---|
align | enforce elegant text alignment | π§ |
declare-keyword | enforce variable names to include their type | π§ |
justify | enforce comments explaining code | π§ |
justify2 | enforce text to be justified | π§ |
lottery | require luck | |
monopoly | disallow bad eslint configs | π§ |
no | disallow everything | |
no-avoidable-loop | disallow useless for loops |
π§ |
no-ci | disallow running on CI lol | |
no-no-plusplus | enforce the unary operators ++ and -- | π§ |
no-object | disallow object literals, prefer Map | π§ |
no-overtime | disallow overwork | |
no-random | disallow non-deterministic randomness | π§ |
no-rush | enforce a delay | |
no-ts | disallow gymnastics needed to please the TS compiler | π§ |
no-woof | disallow woof! | π§ |
no-xkcd | disallow xkcd references | π§ |
optimize-string-ternary | disallow repetition when building strings with ternaries | π§ |
prefer-emoji | require variables and properties to be named using emojis | π§ |
prefer-npm | require from npm instead of using JS builtins | π§ |
prefer-tab | require word separators to be tabs, not spaces | π§ |
quine | enforce quine | |
yes | enforce nothing |
MIT Β© Azat S.