Skip to content

Force package.json and package-lock.json to end in LF #355

Closed
@brettcannon

Description

@brettcannon

As reported in npm/npm#17161, npm rewrites both package.json and package-lock.json to have LF line endings. That sucks when you have autocrlf=auto turned on for git.

Basically we need to add a .gitattributes file with the following to make it so running npm on Windows doesn't constantly leading to git thinking there are file changes to commit:

package.json text eol=lf
package-lock.json text eol=lf

Metadata

Metadata

Assignees

Labels

debtCovers everything internal: CI, testing, refactoring of the codebase, etc.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions