Addition of the editorconfig file.
EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems.
.editorconfig would help to keep the development experience seamless across IDEs.@pranshuchittora We have prettier config
https://github.com/graphql/graphql-js/blob/master/.prettierrc
and it handles everything including line ending.
What would be benefit of editorconfig?
Majority of the editors support editorconfig by default. While prettier requires dedicated extensions/plugins.
A couple of popular projects using Prettier as well as Editor config (both)
https://github.com/webpack/webpack/blob/master/.prettierrc.js
https://github.com/webpack/webpack/blob/master/.editorconfig
https://github.com/babel/babel/blob/master/.prettierrc
https://github.com/babel/babel/blob/master/.editorconfig
Majority of the editors support editorconfig by default. While prettier requires dedicated extensions/plugins.
You don't need any of those, just run npm run prettier to format all files.
P.S. editorconfig requires plugins for Vim, VS Code, Sublime, and most other editors popular in the JS community.
A couple of popular projects using Prettier as well as Editor config (both)
In both cases editorconfig predates Prettier and also they don't use Prettier's feature to fix line ending:
https://github.com/graphql/graphql-js/blob/fe878eef98aba23df988e858dbafa029d6351bd1/.prettierrc#L4
My main objection is that we already have too many configs files on top-level so I don't want to more of those and force people to scroll longer to see README.