Skip to content

Add TOML language formatting capability to the project infrastructure #137

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 16, 2025

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Mar 16, 2025

Python package-based tools are used by the infrastructure of this project. The configuration of this Python infrastructure is defined by the pyproject.toml file. This file uses the TOML language.

In addition to the machine entries produced by the Poetry tool, this important file is also edited directly by human contributors. For this reason, it will be useful to provide code formatting infrastructure for TOML files, and to enforce consistent formatting. This is easily accomplished by adding TOML support to the existing code formatting infrastructure via the prettier-plugin-toml**](https://github.com/un-ts/prettier/tree/master/packages/toml) plugin for the Prettier formatting tool.

Poetry's poetry.lock file is also written in the TOML language. This file is automatically generated and never manually edited. In this case, the automatically generated content is accepted as-is. So Prettier is configured to exclude the poetry.lock file from formatting.

Python package-based tools are used by the infrastructure of this project. The configuration of this Python
infrastructure is defined by the `pyproject.toml` file. This file uses the TOML language.

In addition to the machine entries produced by the Poetry tool, this important file is also edited directly by human
contributors. For this reason, it will be useful to provide code formatting infrastructure for TOML files, and to
enforce consistent formatting. This is easily accomplished by adding TOML support to the existing code formatting
infrastructure via the "prettier-plugin-toml" plugin for the Prettier formatting tool.

Poetry's `poetry.lock` file is also written in the TOML language. This file is automatically generated and never
manually edited. In this case, the automatically generated content is accepted as-is. So Prettier is configured to
exclude the `poetry.lock` file from formatting.
@per1234 per1234 added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure labels Mar 16, 2025
@per1234 per1234 self-assigned this Mar 16, 2025
@per1234 per1234 merged commit e30c6da into arduino:master Mar 16, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant