eslint-plugin-chotot

Assorted custom Chotot ESLint rules

Usage no npm install needed!

<script type="module">
  import eslintPluginChotot from 'https://cdn.skypack.dev/eslint-plugin-chotot';
</script>

README

eslint-plugin-chotot

Collection of custom ESLint rules that are used by eslint-config-chotot

Propose or contribute a new rule ➡

Install

$ npm install --save-dev eslint eslint-plugin-unicorn

Usage

Configure it in package.json.

{
  "name": "my-awesome-project",
  "eslintConfig": {
    "env": {
      "es6": true
    },
    "parserOptions": {
      "ecmaVersion": 2020,
      "sourceType": "module"
    },
    "plugins": ["chotot"],
    "rules": {
      "chotot/filename-case": "error",
      "chotot/no-abusive-eslint-disable": "error"
    }
  }
}

Rules

Recommended config

This plugin exports a recommended config that enforces good practices.

Enable it in your package.json with the extends option:

{
  "name": "my-awesome-project",
  "eslintConfig": {
    "extends": "plugin:chotot/recommended"
  }
}

See the ESLint docs for more information about extending config files.

Note: This config will also enable the correct parser options and environment.

Thanks