knowledge-work/eslint-plugin-return-type

GitHub: knowledge-work/eslint-plugin-return-type

一个强制TypeScript函数返回特定类型的ESLint插件,用于提升代码类型安全性和一致性。

Stars: 17 | Forks: 0

# eslint-plugin-返回类型 一个强制访问特定返回类型的 ESlint 插件。 注意:`eslint-plugin-return-type` 使用 tsconfig,必须存在 tsconfig.json 文件。 ## 安装 ``` npm install eslint-plugin-return-type --save-dev ``` ## 支持的规则 - enforce-access - typeNames: `string[]` - 要强制访问的类型名称 ## 用法 .eslintrc: ``` "plugins": [ "return-type", ], "rules": { "return-type/enforce-access": [ "error", { "typeNames": ["SomeType", "\w*Error"] } } ``` ## 许可证 MIT
标签:CMS安全, ESLint插件, JavaScript, npm, SOC Prime, TypeScript, 云安全监控, 代码规范, 安全插件, 开发工具, 强制规则, 数据可视化, 暗色界面, 类型安全, 类型检查, 自动化攻击, 软件开发, 返回类型, 静态分析