https://github.com/knowledge-work/eslint-plugin-return-type
ESlint plugin to enforces the usage of specific return types.
https://github.com/knowledge-work/eslint-plugin-return-type
Last synced: 3 months ago
JSON representation
ESlint plugin to enforces the usage of specific return types.
- Host: GitHub
- URL: https://github.com/knowledge-work/eslint-plugin-return-type
- Owner: knowledge-work
- License: mit
- Created: 2023-03-21T06:39:41.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-18T18:51:34.000Z (3 months ago)
- Last Synced: 2025-04-19T07:07:59.500Z (3 months ago)
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/eslint-plugin-return-type
- Size: 1.18 MB
- Stars: 17
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:
```js
"plugins": [
"return-type",
],
"rules": {
"return-type/enforce-access": [
"error",
{ "typeNames": ["SomeType", "\w*Error"] }
}
```## License
MIT