MCPcopy
hub / github.com/prettier/prettier / createOptionUsage

Function createOptionUsage

src/cli/usage.js:83–95  ·  view source on GitHub ↗
(context, option, threshold)

Source from the content-addressed store, hash-verified

81}
82
83function createOptionUsage(context, option, threshold) {
84 const header = createOptionUsageHeader(option);
85 const optionDefaultValue = getOptionDefaultValue(context, option.name);
86 return createOptionUsageRow(
87 header,
88 `${option.description}${
89 optionDefaultValue === undefined
90 ? ""
91 : `\nDefaults to ${createDefaultValueDisplay(optionDefaultValue)}.`
92 }`,
93 threshold,
94 );
95}
96
97function getOptionsWithOpposites(options) {
98 // Add --no-foo after --foo.

Callers 1

createUsageFunction · 0.85

Calls 4

createOptionUsageHeaderFunction · 0.85
getOptionDefaultValueFunction · 0.85
createOptionUsageRowFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…