eslint-plugin-return-type

v1.0.23
ESlint plugin to enforces the access of specific return types.
eslint eslintplugin lint rule check return type enforce access and 1 more...

eslint-plugin-return-type

ESlint plugin to enforces the access of specific return types.

NOTE: eslint-plugin-return-type uses tsconfig, tsconfig.json must be present.

Installation

npm install eslint-plugin-return-type --save-dev

Supported Rules

  • enforce-access
    • typeNames: string[]
      • Type name to enforce access

Usage

.eslintrc:

"plugins": [
  "return-type",
],
"rules": {
  "return-type/enforce-access": [
    "error",
    { "typeNames": ["SomeType", "\w*Error"] }
}

License

MIT

npm i eslint-plugin-return-type

Metadata

  • MIT
  • Whatever
  • yoshiko-pg
  • released 10/15/2024

Downloads