diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000..7bc3d3c2e44 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/plugins/woocommerce/.gitattributes b/plugins/woocommerce/.gitattributes index 782ca411dd7..39370997fba 100644 --- a/plugins/woocommerce/.gitattributes +++ b/plugins/woocommerce/.gitattributes @@ -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 diff --git a/plugins/woocommerce/changelog/fix-line-endings b/plugins/woocommerce/changelog/fix-line-endings new file mode 100644 index 00000000000..4bfc149b94c --- /dev/null +++ b/plugins/woocommerce/changelog/fix-line-endings @@ -0,0 +1,5 @@ +Significance: patch +Type: dev +Comment: Standardizes line endings using .gitattributes + + diff --git a/plugins/woocommerce/tests/legacy/unit-tests/importer/sample_update_product.csv b/plugins/woocommerce/tests/legacy/unit-tests/importer/sample_update_product.csv index a79ce82d245..13d467a5979 100644 --- a/plugins/woocommerce/tests/legacy/unit-tests/importer/sample_update_product.csv +++ b/plugins/woocommerce/tests/legacy/unit-tests/importer/sample_update_product.csv @@ -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 \ No newline at end of file