ESlint plugin to enforces the access of specific return types.
NOTE: eslint-plugin-return-type
uses tsconfig, tsconfig.json must be present.
npm install eslint-plugin-return-type --save-dev
- enforce-access
- typeNames:
string[]
- Type name to enforce access
- typeNames:
.eslintrc:
"plugins": [
"return-type",
],
"rules": {
"return-type/enforce-access": [
"error",
{ "typeNames": ["SomeType", "\w*Error"] }
}
MIT