MaibornWolff / metric-gardener

BSD 3-Clause "New" or "Revised" License
6 stars 0 forks source link

Replace prettier config with more general EditorConfig #218

Closed clemens-mw closed 5 months ago

clemens-mw commented 5 months ago

Replace prettier config with more general EditorConfig

Closes #215

Description

See https://editorconfig.org/ and https://prettier.io/docs/en/configuration.html#editorconfig

Definition of Done

A PR is only ready for merge once all the following acceptance criteria are fulfilled:

ResistantBear commented 5 months ago

As far as I understand, this defines some code style rules? We already have this formatter called "prettier" which runs as commit hook with every commit and is also included in the CI pipeline to ensure that the code is formatted in the way "prettier" wants it. You can also run it via npm run format.

There also seems to be a Prettier addon for VS Code.

I don't know/haven't tested if this is useful nevertheless or produces conflicts with prettier when using VS Code or IntelliJ Ultimate. The latter seems to include a Prettier addon by default.

clemens-mw commented 5 months ago

Yes, prettier works perfectly in VS Code, but there are some options in EditorConfig, that prettier doesn't have:

EditorConfig helps that these options are configured everywhere the same.

This is also integrated with prettier: https://prettier.io/docs/en/configuration.html#editorconfig

clemens-mw commented 5 months ago

but i forgot to change the prettier configuration, will do now