DEV Community

Discussion on: 🙏 Please Add .gitattributes To Your Git Repository

 
doctorderek profile image
Dr. Derek Austin 🥳

To put it another way, you'd never accept a contribution from a Windows contributor using Notepad in the first place, because they can't use Prettier. (OK, they could run Prettier and ESLint manually, but it's just not a realistic development environment.) So since you're already enforcing Prettier to the point of erroring on it, then you might as well force them to download the correct line endings when checking out.

ESLint even recommends .gitattributes over changing the ESLint setting from its default eslint.org/docs/rules/linebreak-st...