简体   繁体   English

未使用的 function 和 tsconfig.json 或 tslint 设置中的变量(角度)

[英]Un-used function & variable in tsconfig.json or tslint setting (Angular)

Folks, anybody knows how to detect un-used method & un-used Variable from component or service code is there any setting in tsconfig.json file or tslint settings伙计们,任何人都知道如何从组件或服务代码中检测未使用的方法和未使用的变量在 tsconfig.json 文件或 tslint 设置中是否有任何设置

i have already used two setting in tsconfig.json file for un-necessary exports and un-used parameter我已经在 tsconfig.json 文件中使用了两个设置来进行不必要的导出和未使用的参数

"noUnusedLocals": true, "noUnusedParameters": true, “noUnusedLocals”:真,“noUnusedParameters”:真,

Checkout these ESLint rules:查看这些 ESLint 规则:

You need, of course, to have ESLint setup in place, but that's outside of the question scope当然,您需要设置 ESLint ,但这不在问题 scope 范围内

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM