chore: add .editorconfig
This pull request adds a .editorconfig file. The config is copied from nodejs/node.
Docs: https://editorconfig.org/
Related: https://github.com/expressjs/discussions/issues/327
Since we don’t currently have a linter or formatter in place across the repos, and especially in this one, which I’ve been working with extensively, I’d like to suggest adding an .editorconfig file.
This would help standardize code formatting across different editors and ensure consistent practices for things like indentation, line endings, and spacing. It can also help reduce unnecessary merge conflicts and make collaboration smoother overall.
With an .editorconfig file, contributors automatically follow a consistent style, regardless of the editor or IDE they use. It’s a small addition that can make a big difference.
We have a linter, which is Standard, and it also applies certain formatting. The previous maintainer implemented it in most, if not all, repositories.
We want to standardize a new linter because Standard no longer works well with the latest version of ESLint, and it doesn't seem like the Standard project will continue. That's why we're discussing the linter, but in reality, we already have a linter that needs to be updated because Standard won't be updated anymore.
@bjohansebas Maybe we can discuss in https://github.com/expressjs/discussions/issues/327
Hey @UlisesGascon @jonchurch, are you okay with merging this PR?