@killusions/eslint-plugin-defaultvalue

1.5.3 • Public • Published

eslint-plugin-defaultvalue

An ESLint plugin to automatically enrich TSDoc comments with default values (using --fix) or check if they are all correct. The rule is aware of Signals by @angular/core and will automatically use the actual value instead of the whole signal function.

Installation

Install eslint-plugin-defaultvalue in your project.

npm install eslint-plugin-defaultvalue --save-dev

Configuration

Include the ESLint plugin and rule in your relevant eslint.config.(m)js:

...
import defaultvalue from 'eslint-plugin-defaultvalue';

export default [
  {
    ...,
    plugins: {
      ...,
      defaultvalue
    },
    rules: {
      ...,
      'defaultvalue/tsdoc-defaultValue-annotation': ['error']
    }
  }
];

Removing not resolved and setter @defaultValue annotations

To automatically remove not resolvable and setter @defaultValue annotations, use the following configuration:

...,
rules: {
  ...,
  'defaultvalue/tsdoc-defaultValue-annotation': ['error', 'removeAll', 1000]
}
...

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @killusions/eslint-plugin-defaultvalue

      Weekly Downloads

      0

      Version

      1.5.3

      License

      MIT

      Unpacked Size

      38.8 kB

      Total Files

      8

      Last publish

      Collaborators

      • killusions