eslint-descriptive v1.0.0
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-devyarn
yarn add -D eslint-descriptiveUsage
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.