0.0.8 ⢠Published 2 years ago
eslint-plugin-ninja v0.0.8
ESLint Plugin Ninja
The ultimate ESLint plugin.
www.dont.ninja
// 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)š Install
npm i -D eslint-plugin-ninja{
"plugins": ["ninja"],
"extends": ["plugin:ninja/recommended"],
"rules": {
"ninja/align": 2,
"ninja/prefer-emoji": 1
}
}ā Rules
š§ 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 | š§ |
| yes | enforce nothing |
š License
MIT Ā© Azat S.