Enforce LF Line Endings (#37843)

Since it's possible that people may be cloning the repository in
Windows, we need to enforce consistent line endings.
This commit is contained in:
Christopher Allford 2023-04-19 08:26:19 -07:00 committed by GitHub
parent 1dd8e05a68
commit 1cfd8a1b53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 40 additions and 22 deletions

15
.gitattributes vendored Normal file
View File

@ -0,0 +1,15 @@
* text=auto
# Force LF In Configuration Files
*.md text eol=lf
*.json text eol=lf
*.yml text eol=lf
# Force LF In Code Files
*.php text eol=lf
*.js text eol=lf
*.jsx text eol=lf
*.ts text eol=lf
*.tsx text eol=lf
*.css text eol=lf
*.scss text eol=lf

View File

@ -1,20 +1,18 @@
# Set the default behavior, in case people don't have `core.autocrlf` set.
* text=auto
# Declare files that will always have LF line endings on checkout.
*.php text eol=lf
# Remove files for archives generated using `git archive`.
/.* export-ignore
bin export-ignore
CODE_OF_CONDUCT.md export-ignore
changelog.txt export-ignore
composer.* export-ignore
Gruntfile.js export-ignore
package.json export-ignore
package-lock.json export-ignore
phpcs.xml export-ignore
phpunit.* export-ignore
README.md export-ignore
renovate.json export-ignore
tests export-ignore
/.* export-ignore
/README.md export-ignore
/CODE_OF_CONDUCT.md export-ignore
/NEXT_CHANGELOG.md export-ignore
/changelog.txt export-ignore
/changelog export-ignore
/bin export-ignore
/composer.json export-ignore
/composer.lock export-ignore
/package.json export-ignore
/package-lock.json export-ignore
/client/legacy export-ignore
/tsconfig.json export-ignore
/tsconfig.base.json export-ignore
/phpunit.xml export-ignore
/phpunit.xml export-ignore
/tests export-ignore

View File

@ -0,0 +1,5 @@
Significance: patch
Type: dev
Comment: Standardizes line endings using .gitattributes

View File

@ -1,4 +1,4 @@
Name,SKU,Regular price
WordPress Pennant,wp-pennant,20
0,,something invalid
Name,SKU,Regular price
WordPress Pennant,wp-pennant,20
0,,something invalid
0,,something invalid
1 Name SKU Regular price
2 WordPress Pennant wp-pennant 20
3 0 something invalid
4 0 something invalid