Skip to content

FAQ

What is dont?

dont is an acronym.

What does it do?

eslint-plugin-ninja is a collection of state-of-the-art ESLint rules that will help you write better code.

Who wrote this?

I did. But most of the code is stolen from other ESLint plugins (perfectionist, unicorn, …)

How do I use it?

Install it:

sh
npm install --save-dev eslint eslint-plugin-ninja

Add it to your .eslintrc or eslint.config.js:

json
// .eslintrc
{
  "plugins": ["ninja"],
  "extends": ["plugin:ninja/recommended"],
  "rules": {
    "ninja/align": 2,
    "ninja/prefer-emoji": 2
  }
}
js
// eslint.config.js
import ninja from 'eslint-plugin-ninja'

export default [ninja]
js
// eslint.config.js
import ninja from 'eslint-plugin-ninja'

export default [
  {
    plugins: { ninja },
    extends: ['plugin:ninja/recommended'],
    rules: {
      'ninja/align': 2,
      'ninja/prefer-emoji': 1,
    },
  },
]

Something is broken, what do I do? Can I also suggest a rule?

You can open issues or pull requests. You can also not do that, and spend your time on more useful things.

Do you recommend using this in my projects or at my workplace?

dont

Released under the MIT License