pnp/cli-microsoft365

Centralise default config values

开放

#6,186 创建于 2024年7月27日

 (5 条评论) (0 个反应) (0 位负责人)TypeScript (399 个派生)auto 404
enhancementhelp wantedkeep-open

仓库指标

星标
 (1,390 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

In a lot of commands, we retrieve config values as follows:

cli.getSettingWithDefaultValue<boolean>(settingsNames.autoOpenLinksInBrowser, false)

I don't think it's a good approach to define the default value in the command itself. A better approach would be that we centralize all default values and provide a new function where the user should only specify the config variable. E.g.:

cli.getSetting<boolean>(settingsNames.autoOpenLinksInBrowser)

贡献者指南