Found a config to ignore lockfiles system-wide:
package-lock
- Default: true
- Type: Boolean
If set to false, then ignore
package-lock.json
files when installing. This will also prevent writingpackage-lock.json
ifsave
is true.When package package-locks are disabled, automatic pruning of extraneous modules will also be disabled. To remove extraneous modules with package-locks disabled use
npm prune
.This option is an alias for
--shrinkwrap
.
npm config set package-lock false
cc: @dominic is this something you'd fine helpful?
I think diffs can be ignored too:
# one-off command
git diff master -- ^package-lock.json
# global config
echo "package-lock.json binary" >> /etc/gitattributes