aws / aws-iot-fleetwise-edge

Reference Implementation for AWS IoT FleetWise
https://aws.amazon.com/iot-fleetwise/
Apache License 2.0
61 stars 44 forks source link

Format most files #35

Closed gqmelo closed 1 year ago

gqmelo commented 1 year ago

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.