Skip to content

build(prettier): ignore package-lock.json - #291

Merged
dschach merged 1 commit into
mainfrom
build/prettier-lock-ignore
Oct 23, 2026
Merged

dschach merged 1 commit into
mainfrom
build/prettier-lock-ignore

Conversation

@dschach

@dschach dschach commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Summary

Add package-lock.json to .prettierignore, so that Prettier does not format or check the npm lockfile.

Why

npm creates and updates package-lock.json. If Prettier formats the file, the next npm install can change it back, and the diff has only format changes. The prettier and prettier:verify scripts match **/*.json, so they include this file now.

Changes

File Change
.prettierignore Adds package-lock.json at the end of the file.

Test

  • npx prettier --file-info package-lock.json on main: "ignored": false
  • The same command on this branch: "ignored": true

Generated by Claude Code

npm creates package-lock.json, so Prettier does not need to format or check it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RrCCGY21sL5hzxCbxFpg4s
@dschach
dschach merged commit 1524f40 into main Oct 23, 2026
2 checks passed
@dschach
dschach deleted the build/prettier-lock-ignore branch October 23, 2026 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants