body-parser icon indicating copy to clipboard operation
body-parser copied to clipboard

chore: add .editorconfig

Open Phillip9587 opened this issue 9 months ago • 4 comments

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

Phillip9587 avatar Mar 31 '25 21:03 Phillip9587

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.

Phillip9587 avatar Apr 01 '25 13:04 Phillip9587

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 avatar Apr 01 '25 13:04 bjohansebas

@bjohansebas Maybe we can discuss in https://github.com/expressjs/discussions/issues/327

Phillip9587 avatar Apr 01 '25 14:04 Phillip9587

Hey @UlisesGascon @jonchurch, are you okay with merging this PR?

Phillip9587 avatar Oct 02 '25 19:10 Phillip9587