1.0.0 • Published 10 months ago

eslint-descriptive v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

eslint-descriptive

Description

eslint-descriptive is a plugin for typescript that copies many rules from eslint and typescript-eslint but adds reasoning for each rule in their error messages.

Installation

npm

npm install eslint-descriptive --save-dev

yarn

yarn add -D eslint-descriptive

Usage

Once installed, you can enable eslint-descriptive in your .eslintrc.js:

{
    "extends": [
        "eslint-descriptive"
    ]
}

or for flat file config:

import descriptive from "eslint-descriptive";
export default [{
    plugins: {
        "eslint-descriptive": descriptive,
    },
    rules: {
        ...descriptive.configs.all.rules,
        "eslint-descriptive/no-console": "off", // manually disable a rule
    }
}]

Rules

You can view all the possible rules in the config. These are culled from eslint:recommended, @typescript-eslint/recommended, and @typescript-eslint/stylistic (with a few removed). Currently, these rules are NOT explicitly disabled in the eslint-descriptive:all configuration, so beware when also including the base rules! To see full rule descriptions, please look on the official eslint and typescript-eslint documentation. Note that eslint-descriptive does NOT add or modify any rules, apart from adding descriptive reasoning to error messages. It also uses discouraged features of eslint and typescript-eslint so use at your own risk!

License

eslint-descriptive is licensed under the ISC License.

1.0.0

10 months ago

0.1.0

10 months ago