Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 1 month 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 (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T17:16:42.000Z (about 2 months ago)
- Last Synced: 2024-10-29T18:43:24.632Z (about 2 months ago)
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/eslint-plugin-return-type
- Size: 1.01 MB
- Stars: 17
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
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