@@ -187,6 +187,92 @@ Fail an audit only if the results include a vulnerability with a level of modera
187
187
$ npm audit --audit-level=moderate
188
188
```
189
189
190
+ ### Configuration
191
+
192
+ <!-- AUTOGENERATED CONFIG DESCRIPTIONS START -->
193
+ <!-- automatically generated, do not edit manually -->
194
+ #### ` audit-level `
195
+
196
+ * Default: null
197
+ * Type: null, "info", "low", "moderate", "high", "critical", or "none"
198
+
199
+ The minimum level of vulnerability for ` npm audit ` to exit with a non-zero
200
+ exit code.
201
+
202
+ #### ` dry-run `
203
+
204
+ * Default: false
205
+ * Type: Boolean
206
+
207
+ Indicates that you don't want npm to make any changes and that it should
208
+ only report what it would have done. This can be passed into any of the
209
+ commands that modify your local installation, eg, ` install ` , ` update ` ,
210
+ ` dedupe ` , ` uninstall ` , as well as ` pack ` and ` publish ` .
211
+
212
+ Note: This is NOT honored by other network related commands, eg ` dist-tags ` ,
213
+ ` owner ` , etc.
214
+
215
+ #### ` force `
216
+
217
+ * Default: false
218
+ * Type: Boolean
219
+
220
+ Removes various protections against unfortunate side effects, common
221
+ mistakes, unnecessary performance degradation, and malicious input.
222
+
223
+ * Allow clobbering non-npm files in global installs.
224
+ * Allow the ` npm version ` command to work on an unclean git repository.
225
+ * Allow deleting the cache folder with ` npm cache clean ` .
226
+ * Allow installing packages that have an ` engines ` declaration requiring a
227
+ different version of npm.
228
+ * Allow installing packages that have an ` engines ` declaration requiring a
229
+ different version of ` node ` , even if ` --engine-strict ` is enabled.
230
+ * Allow ` npm audit fix ` to install modules outside your stated dependency
231
+ range (including SemVer-major changes).
232
+ * Allow unpublishing all versions of a published package.
233
+ * Allow conflicting peerDependencies to be installed in the root project.
234
+ * Implicitly set ` --yes ` during ` npm init ` .
235
+
236
+ If you don't have a clear idea of what you want to do, it is strongly
237
+ recommended that you do not use this option!
238
+
239
+ #### ` json `
240
+
241
+ * Default: false
242
+ * Type: Boolean
243
+
244
+ Whether or not to output JSON data, rather than the normal output.
245
+
246
+ Not supported by all npm commands.
247
+
248
+ #### ` package-lock-only `
249
+
250
+ * Default: false
251
+ * Type: Boolean
252
+
253
+ If set to true, it will update only the ` package-lock.json ` , instead of
254
+ checking ` node_modules ` and downloading dependencies.
255
+
256
+ #### ` omit `
257
+
258
+ * Default: 'dev' if the ` NODE_ENV ` environment variable is set to
259
+ 'production', otherwise empty.
260
+ * Type: "dev", "optional", or "peer" (can be set multiple times)
261
+
262
+ Dependency types to omit from the installation tree on disk.
263
+
264
+ Note that these dependencies _ are_ still resolved and added to the
265
+ ` package-lock.json ` or ` npm-shrinkwrap.json ` file. They are just not
266
+ physically installed on disk.
267
+
268
+ If a package type appears in both the ` --include ` and ` --omit ` lists, then
269
+ it will be included.
270
+
271
+ If the resulting omit list includes ` 'dev' ` , then the ` NODE_ENV ` environment
272
+ variable will be set to ` 'production' ` for all lifecycle scripts.
273
+
274
+ <!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
275
+
190
276
### See Also
191
277
192
278
* [ npm install] ( /commands/npm-install )
0 commit comments