If an invalid command line flag / switch is provided, npm will continue, rather than throwing an error and giving the help text for that context.
% npm audit --format=asdfasfd --123 asdf
will simply act as if you had typed
% npm audit
vs returning usage and exiting non-0.
More generally, standardizing processing of both positional arguments and command line flags might be a big plus in terms of keeping the tool consistent and well documented.
It was suggested in https://github.com/npm/npm/issues/20856 that I bring it up here; also submitted: