- 架构设计、基础库开发、工程方案调用和技术选型
如何打造工程化流程?
如何打造稳定可靠的基础设施?
好项目:
从 0 到 1 打造基础设施,制定工程化方案,实现应用的构建和发布,设计公共方法底层架构。
npm config get cache # 查看 npm 缓存路径
// Cyclomatic Complexity of 3
function checkWithdrawal(balance: number, isAccountLocked: boolean, amount: numbed) {
let result = false
if (balance >= amount) {
result = true
}
if (isAccountLocked) {
result = false
}
return result
}
// Cyclomatic Complexity of 1
function checkWithdrawal(balance: number, isAccountLocked: boolean, amount: numbed) {
let result = true
result &= balance >= amount
result &= !isAccountLocked
return !!result
}
max-depth https://eslint.org/docs/rules/max-depth max-lines https://eslint.org/docs/rules/max-lines max-lines-per-function https://eslint.org/docs/rules/max-lines-per-function max-nested-callbacks https://eslint.org/docs/rules/max-nested-callbacks max-params https://eslint.org/docs/rules/max-params