Skip to content

Commit d71366c

Browse files
authored
chore: 🤖 Add strict .npmrc file
Add `.npmrc` with sane defaults I tested for any packages that still needed scripts with the command `npm i && npx can-i-ignore-scripts` before introducing this.
1 parent 9b49ac3 commit d71366c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.npmrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# If set to false, then ignore package-lock.json files when installing. This will also prevent writing package-lock.json if save is true. source: https://docs.npmjs.com/cli/v11/using-npm/config
2+
package-lock=true
3+
# If true, npm does not run scripts specified in package.json files. source: https://docs.npmjs.com/cli/v11/using-npm/config#ignore-scripts
4+
ignore-scripts=true
5+
# Dependencies saved to package.json will be configured with an exact version rather than using npm's default semver range operator. source: https://docs.npmjs.com/cli/v11/using-npm/config#save-exact
6+
save-exact=true
7+
# If set to true, then npm will stubbornly refuse to install (or even consider installing) any package that claims to not be compatible with the current Node.js version. source: https://docs.npmjs.com/cli/v11/using-npm/config#engine-strict
8+
engine-strict=true

0 commit comments

Comments
 (0)