Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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