(source: PermissionRuleSource)
| 245 | } |
| 246 | |
| 247 | function formatPermissionSource(source: PermissionRuleSource): string { |
| 248 | if ((SETTING_SOURCES as readonly string[]).includes(source)) { |
| 249 | const filePath = getSettingsFilePathForSource(source as SettingSource) |
| 250 | if (filePath) { |
| 251 | const relativePath = relative(getCwd(), filePath) |
| 252 | return relativePath.length < filePath.length ? relativePath : filePath |
| 253 | } |
| 254 | } |
| 255 | return source |
| 256 | } |
| 257 | |
| 258 | export type DangerousPermissionInfo = { |
| 259 | ruleValue: PermissionRuleValue |
no test coverage detected