Build an .editorconfig file from a few options to keep indentation, line endings and whitespace consistent across editors and teammates.
EditorConfig keeps coding style consistent across different editors and IDEs. Save the output as a file named .editorconfig in your project root; most modern editors read it automatically (some need a plugin).
It is a simple config file that tells code editors how to format files in a project, such as whether to use spaces or tabs, the indent size, and which line endings to use. It keeps style consistent no matter which editor each person uses.
Many editors (including VS Code, the JetBrains IDEs and Vim with a plugin) support EditorConfig either natively or through a small plugin. Where supported, the rules apply automatically when someone edits a file in the project.
It tells EditorConfig to stop looking for further .editorconfig files in parent folders. You put it in the file at your project root so settings from outside the project do not leak in.