An ESLint plugin that enforces the access of specific return types in TypeScript code. Current stable version is 1.0.35. This plugin requires a tsconfig.json file and provides a single rule, enforce-access, which ensures that functions return specified types. It is a niche linter tool aimed at TypeScript projects that need strict return type enforcement, differentiating itself by its focus on return type access rather than general type checking.
npm install eslint-plugin-return-typeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures ESLint with the return-type plugin and enforce-access rule to require functions return types matching 'SomeType' or any type ending in 'Error'.
Ensure tsconfig.json exists in the project root directory.
Use only on .ts/.tsx files; configure ESLint overrides.
N/A
Create a tsconfig.json file or run tsc --init.
Run npm install eslint-plugin-return-type --save-dev and add 'return-type' to plugins.
Specify typeNames as an array of strings in the rule options.
No dependency data recorded yet.