chore: add .editorconfig with standard defaults#1938
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request introduces an .editorconfig file to establish consistent code formatting rules across the project. The review feedback suggests setting the indentation size for Markdown files to 2 spaces to align with Prettier's configuration and avoid editor conflicts.
| [*.md] | ||
| trim_trailing_whitespace = false |
There was a problem hiding this comment.
Since the project uses Prettier to format Markdown files (as configured in the lint:other script in package.json), which defaults to a 2-space indentation, leaving *.md to inherit the default indent_size = 4 from [*] will cause a conflict between the contributor's editor and the formatting checks. Specifying indent_size = 2 for *.md ensures consistency with Prettier.
[*.md]
indent_size = 2
trim_trailing_whitespace = false
Adds a top-level
.editorconfigso contributors on different editors get consistent indentation, line endings, and trailing-whitespace handling out of the box.No effect on existing files — EditorConfig is only applied by editors that support it (which is most of them these days).