Skip to content

Clarify placeholder usage (‘foo’/‘bar’) in CLI flag documentation#1760

Closed
SuperHeavyBallet wants to merge 3 commits into
npm:mainfrom
SuperHeavyBallet:main
Closed

Clarify placeholder usage (‘foo’/‘bar’) in CLI flag documentation#1760
SuperHeavyBallet wants to merge 3 commits into
npm:mainfrom
SuperHeavyBallet:main

Conversation

@SuperHeavyBallet

@SuperHeavyBallet SuperHeavyBallet commented Oct 29, 2025

Copy link
Copy Markdown

The documentation for command-line flags uses “foo” and “bar” as placeholders without clarifying that they are generic examples of a key and a value.

New readers unfamiliar with this convention may interpret them as literal parameters. Suggest adding a short note as given explaining that “foo/bar” are placeholders for any config key/value.

Update:
This branch includes both a minor clarification and a full rewrite. I’m happy to separate them into two PRs if preferred.

The documentation for command-line flags uses “foo” and “bar” as placeholders without clarifying that they are generic examples of a key and a value.
New readers unfamiliar with this convention may interpret them as literal parameters. Suggest adding a short note explaining that “foo/bar” are placeholders for any config key/value.
@SuperHeavyBallet SuperHeavyBallet requested a review from a team as a code owner October 29, 2025 10:31
A more comprehensive rewrite of this section that builds on the prior clarification.
@wraithgar

Copy link
Copy Markdown
Contributor

The copy looks good, will need prettier to clean it up before it can land.

@SuperHeavyBallet

Copy link
Copy Markdown
Author

prettier format applied and pushed. If this is suitable, I can repeat the copy for other identical sections, V10, V9 etc.

@wraithgar

Copy link
Copy Markdown
Contributor

Oooh sorry I missed that this was in the cli content folder. That content is not sourced from this repo it's pulled in from npm itself so that we can keep its config and help output tightly coupled to the web content. This content is actually sourced from https://github.com/npm/cli/blob/latest/docs/lib/content/using-npm/config.md

@wraithgar

Copy link
Copy Markdown
Contributor

We typically do not backport docs changes like this so the older npm versions will stay as-is.

@SuperHeavyBallet

Copy link
Copy Markdown
Author

Closing this PR. The change has been migrated to npm/cli#8708, which is the correct source for this content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants