This adds a bunch of formatting hooks for all kinds of files
like python, markdown, json and simple formatting for all text
files (e.g. trim trailing whitespace and ensure files end with LF).
For python we are using black, which became very popular for being
simple (it is intentionally opinionated to prevent discussions about
style). We are also using isort for sorting imports which is useful
especially to reduce conflicts.
For most other files format, we are using prettier, which is also
somewhat opinionated and supports a large number of file formats.
This way we can format all yaml, json, md files without having to
use a separate tool for each of them.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
This adds a bunch of formatting hooks for all kinds of files like python, markdown, json and simple formatting for all text files (e.g. trim trailing whitespace and ensure files end with LF).
For python we are using black, which became very popular for being simple (it is intentionally opinionated to prevent discussions about style). We are also using isort for sorting imports which is useful especially to reduce conflicts.
For most other files format, we are using prettier, which is also somewhat opinionated and supports a large number of file formats. This way we can format all yaml, json, md files without having to use a separate tool for each of them.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.