Skip to content

Commit 5645c51

Browse files
authored
docs: link mentions of config parameters (#5521)
1 parent 19762b4 commit 5645c51

15 files changed

+65
-52
lines changed

docs/content/commands/npm-audit.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@ the path `/-/npm/v1/security/advisories/bulk`.
109109

110110
Any packages in the tree that do not have a `version` field in their
111111
package.json file will be ignored. If any `--omit` options are specified
112-
(either via the `--omit` config, or one of the shorthands such as
113-
`--production`, `--only=dev`, and so on), then packages will be omitted
114-
from the submitted payload as appropriate.
112+
(either via the [`--omit` config](/using-npm/config#omit), or one of the
113+
shorthands such as `--production`, `--only=dev`, and so on), then packages will
114+
be omitted from the submitted payload as appropriate.
115115

116116
If the registry responds with an error, or with an invalid response, then
117117
npm will attempt to load advisory data from the `Quick Audit` endpoint.
@@ -188,7 +188,7 @@ vulnerabilities are found _or_ if the remediation is able to successfully
188188
fix all vulnerabilities.
189189

190190
If vulnerabilities were found the exit code will depend on the
191-
`audit-level` configuration setting.
191+
[`audit-level` config](/using-npm/config#audit-level).
192192

193193
### Examples
194194

docs/content/commands/npm-bugs.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ alias: issues
2525
2626
This command tries to guess at the likely location of a package's bug
2727
tracker URL or the `mailto` URL of the support email, and then tries to
28-
open it using the `--browser` config param. If no package name is provided, it
29-
will search for a `package.json` in the current folder and use the `name` property.
28+
open it using the [`--browser` config](/using-npm/config#browser) param. If no
29+
package name is provided, it will search for a `package.json` in the current
30+
folder and use the `name` property.
3031
3132
### Configuration
3233

docs/content/commands/npm-dist-tag.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ alias: dist-tags
2828
Add, remove, and enumerate distribution tags on a package:
2929

3030
* add: Tags the specified version of the package with the specified tag,
31-
or the `--tag` config if not specified. If you have two-factor
32-
authentication on auth-and-writes then you’ll need to include a
31+
or the [`--tag` config](/using-npm/config#tag) if not specified. If you have
32+
two-factor authentication on auth-and-writes then you’ll need to include a
3333
one-time password on the command line with
3434
`--otp <one-time password>`, or at the OTP prompt.
3535

docs/content/commands/npm-docs.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ alias: home
2424
### Description
2525
2626
This command tries to guess at the likely location of a package's
27-
documentation URL, and then tries to open it using the `--browser` config
28-
param. You can pass multiple package names at once. If no package name is
29-
provided, it will search for a `package.json` in the current folder and use
30-
the `name` property.
27+
documentation URL, and then tries to open it using the
28+
[`--browser` config](/using-npm/config#browser) param. You can pass multiple
29+
package names at once. If no package name is provided, it will search for a
30+
`package.json` in the current folder and use the `name` property.
3131
3232
### Configuration
3333

docs/content/commands/npm-exec.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ $ npx -c 'eslint && say "hooray, lint passed"'
240240

241241
### Workspaces support
242242

243-
You may use the `workspace` or `workspaces` configs in order to run an
243+
You may use the [`workspace`](/using-npm/config#workspace) or
244+
[`workspaces`](/using-npm/config#workspaces) configs in order to run an
244245
arbitrary command from an npm package (either one installed locally, or fetched
245246
remotely) in the context of the specified workspaces.
246247
If no positional argument or `--call` option is provided, it will open an
@@ -271,9 +272,9 @@ Assuming the workspace configuration is properly set up at the root level
271272
```
272273

273274
You can execute an arbitrary command from a package in the context of each of
274-
the configured workspaces when using the `workspaces` configuration options,
275-
in this example we're using **eslint** to lint any js file found within each
276-
workspace folder:
275+
the configured workspaces when using the
276+
[`workspaces` config options](/using-npm/config#workspace), in this example
277+
we're using **eslint** to lint any js file found within each workspace folder:
277278

278279
```
279280
npm exec --ws -- eslint ./*.js

docs/content/commands/npm-fund.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ This command retrieves information on how to fund the dependencies of a
2525
given project. If no package name is provided, it will list all
2626
dependencies that are looking for funding in a tree structure, listing
2727
the type of funding and the url to visit. If a package name is provided
28-
then it tries to open its funding url using the `--browser` config
29-
param; if there are multiple funding sources for the package, the user
30-
will be instructed to pass the `--which` option to disambiguate.
28+
then it tries to open its funding url using the
29+
[`--browser` config](/using-npm/config#browser) param; if there are multiple
30+
funding sources for the package, the user will be instructed to pass the
31+
`--which` option to disambiguate.
3132

3233
The list will avoid duplicated entries and will stack all packages that
3334
share the same url as a single entry. Thus, the list does not have the
@@ -38,7 +39,8 @@ same shape of the output from `npm ls`.
3839
### Workspaces support
3940

4041
It's possible to filter the results to only include a single workspace
41-
and its dependencies using the `workspace` config option.
42+
and its dependencies using the
43+
[`workspace` config](/using-npm/config#workspace) option.
4244

4345
#### Example:
4446

docs/content/commands/npm-pkg.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ Returned values are always in **json** format.
153153
### Workspaces support
154154
155155
You can set/get/delete items across your configured workspaces by using the
156-
`workspace` or `workspaces` config options.
156+
[`workspace`](/using-npm/config#workspace) or
157+
[`workspaces`](/using-npm/config#workspaces) config options.
157158
158159
For example, setting a `funding` value across all configured workspaces
159160
of a project:

docs/content/commands/npm-repo.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ npm repo [<pkgname> [<pkgname> ...]]
2222
### Description
2323
2424
This command tries to guess at the likely location of a package's
25-
repository URL, and then tries to open it using the `--browser` config
26-
param. If no package name is provided, it will search for a `package.json`
27-
in the current folder and use the `repository` property.
25+
repository URL, and then tries to open it using the
26+
[`--browser` config](/using-npm/config#browser) param. If no package name is
27+
provided, it will search for a `package.json` in the current folder and use the
28+
`repository` property.
2829
2930
### Configuration
3031

docs/content/commands/npm-run-script.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ The actual shell your script is run within is platform dependent. By default,
6868
on Unix-like systems it is the `/bin/sh` command, on Windows it is
6969
`cmd.exe`.
7070
The actual shell referred to by `/bin/sh` also depends on the system.
71-
You can customize the shell with the `script-shell` configuration.
71+
You can customize the shell with the
72+
[`script-shell` config](/using-npm/config#script-shell).
7273

7374
Scripts are run from the root of the package folder, regardless of what the
7475
current working directory is when `npm run` is called. If you want your
@@ -85,7 +86,8 @@ forgotten.
8586

8687
### Workspaces support
8788

88-
You may use the `workspace` or `workspaces` configs in order to run an
89+
You may use the [`workspace`](/using-npm/config#workspace) or
90+
[`workspaces`](/using-npm/config#workspaces) configs in order to run an
8991
arbitrary command from a package's `"scripts"` object in the context of the
9092
specified workspaces. If no `"command"` is provided, it will list the available
9193
scripts for each of these configured workspaces.
@@ -114,7 +116,8 @@ Assuming the workspace configuration is properly set up at the root level
114116
```
115117

116118
And that each of the configured workspaces has a configured `test` script,
117-
we can run tests in all of them using the `workspaces` config:
119+
we can run tests in all of them using the
120+
[`workspaces` config](/using-npm/config#workspaces):
118121

119122
```
120123
npm test --workspaces

docs/content/commands/npm-update.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ aliases: up, upgrade, udpate
2424
### Description
2525

2626
This command will update all the packages listed to the latest version
27-
(specified by the `tag` config), respecting the semver constraints of
28-
both your package and its dependencies (if they also require the same
29-
package).
27+
(specified by the [`tag` config](/using-npm/config#tag)), respecting the semver
28+
constraints of both your package and its dependencies (if they also require the
29+
same package).
3030

3131
It will also install missing packages.
3232

docs/content/commands/npm-version.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -192,18 +192,18 @@ disabled on the command line by running `npm --no-git-tag-version version`.
192192
It will fail if the working directory is not clean, unless the `-f` or
193193
`--force` flag is set.
194194

195-
If supplied with `-m` or `--message` config option, npm will use it as a
196-
commit message when creating a version commit. If the `message` config
197-
contains `%s` then that will be replaced with the resulting version number.
198-
For example:
195+
If supplied with `-m` or [`--message` config](/using-npm/config#message) option,
196+
npm will use it as a commit message when creating a version commit. If the
197+
`message` config contains `%s` then that will be replaced with the resulting
198+
version number. For example:
199199

200200
```bash
201201
npm version patch -m "Upgrade to %s for reasons"
202202
```
203203

204-
If the `sign-git-tag` config is set, then the tag will be signed using the
205-
`-s` flag to git. Note that you must have a default GPG key set up in your
206-
git config for this to work properly. For example:
204+
If the [`sign-git-tag` config](/using-npm/config#sign-git-tag) is set, then the
205+
tag will be signed using the `-s` flag to git. Note that you must have a default
206+
GPG key set up in your git config for this to work properly. For example:
207207

208208
```bash
209209
$ npm config set sign-git-tag true

docs/content/configuring-npm/folders.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ This document will tell you what it puts where.
2222

2323
#### prefix Configuration
2424

25-
The `prefix` config defaults to the location where node is installed.
26-
On most systems, this is `/usr/local`. On Windows, it's `%AppData%\npm`.
27-
On Unix systems, it's one level up, since node is typically installed at
28-
`{prefix}/bin/node` rather than `{prefix}/node.exe`.
25+
The [`prefix` config](/using-npm/config#prefix) defaults to the location where
26+
node is installed. On most systems, this is `/usr/local`. On Windows, it's
27+
`%AppData%\npm`. On Unix systems, it's one level up, since node is typically
28+
installed at `{prefix}/bin/node` rather than `{prefix}/node.exe`.
2929

3030
When the `global` flag is set, npm installs things into this prefix.
3131
When it is not set, it uses the root of the current package, or the
@@ -74,13 +74,13 @@ Man pages are not installed on Windows systems.
7474
See [`npm cache`](/commands/npm-cache). Cache files are stored in `~/.npm` on Posix, or
7575
`%AppData%/npm-cache` on Windows.
7676

77-
This is controlled by the `cache` configuration param.
77+
This is controlled by the [`cache` config](/using-npm/config#cache) param.
7878

7979
#### Temp Files
8080

8181
Temporary files are stored by default in the folder specified by the
82-
`tmp` config, which defaults to the TMPDIR, TMP, or TEMP environment
83-
variables, or `/tmp` on Unix and `c:\windows\temp` on Windows.
82+
[`tmp` config](/using-npm/config#tmp), which defaults to the TMPDIR, TMP, or
83+
TEMP environment variables, or `/tmp` on Unix and `c:\windows\temp` on Windows.
8484

8585
Temp files are given a unique folder under this root for each run of the
8686
program, and are deleted upon successful exit.
@@ -111,7 +111,7 @@ be found by npm scripts when necessary.
111111

112112
#### Global Installation
113113

114-
If the `global` configuration is set to true, then npm will
114+
If the [`global` config](/using-npm/config#global) is set to true, then npm will
115115
install packages "globally".
116116

117117
For global installation, packages are installed roughly the same way,

docs/content/configuring-npm/package-json.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -1032,9 +1032,10 @@ capable of properly installing your program. For example:
10321032
}
10331033
```
10341034

1035-
Unless the user has set the `engine-strict` config flag, this field is
1036-
advisory only and will only produce warnings when your package is installed
1037-
as a dependency.
1035+
Unless the user has set the
1036+
[`engine-strict` config](/using-npm/config#engine-strict) flag, this field is
1037+
advisory only and will only produce warnings when your package is installed as a
1038+
dependency.
10381039

10391040
### os
10401041

docs/content/using-npm/logging.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ The `npm` CLI began hiding the output of lifecycle scripts for `npm install` as
5858

5959
### Timing Information
6060

61-
The `--timing` config can be set which does two things:
61+
The [`--timing` config](/using-npm/config#timing) can be set which does two
62+
things:
6263

6364
1. Always shows the full path to the debug log regardless of command exit status
6465
1. Write timing information to a timing file in the cache or `logs-dir`

docs/content/using-npm/registry.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ The npm public registry is powered by a CouchDB database,
2626
of which there is a public mirror at <https://skimdb.npmjs.com/registry>.
2727

2828
The registry URL used is determined by the scope of the package (see
29-
[`scope`](/using-npm/scope). If no scope is specified, the default registry is used, which is
30-
supplied by the `registry` config parameter. See [`npm config`](/commands/npm-config),
31-
[`npmrc`](/configuring-npm/npmrc), and [`config`](/using-npm/config) for more on managing npm's configuration.
29+
[`scope`](/using-npm/scope). If no scope is specified, the default registry is
30+
used, which is supplied by the [`registry` config](/using-npm/config#registry)
31+
parameter. See [`npm config`](/commands/npm-config),
32+
[`npmrc`](/configuring-npm/npmrc), and [`config`](/using-npm/config) for more on
33+
managing npm's configuration.
3234

3335
When the default registry is used in a package-lock or shrinkwrap is has the
3436
special meaning of "the currently configured registry". If you create a lock

0 commit comments

Comments
 (0)