Skip to content

Commit

Permalink
Use Prettier to format TOML files
Browse files Browse the repository at this point in the history
  • Loading branch information
per1234 committed Oct 18, 2023
1 parent b723d19 commit e9de238
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/check-prettier-formatting-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ on:
- "**.mkdn?"
- "**.ronn"
- "**.workbook"
# TOML
- "**.toml"
# YAML
- "**/.clang-format"
- "**/.clang-tidy"
Expand Down Expand Up @@ -185,6 +187,8 @@ on:
- "**.mkdn?"
- "**.ronn"
- "**.workbook"
# TOML
- "**.toml"
# YAML
- "**/.clang-format"
- "**/.clang-tidy"
Expand Down
5 changes: 5 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ overrides:
- "*.html"
options:
parser: go-template
- files:
- "*.toml"
options:
parser: toml
plugins:
- prettier-plugin-go-template
- prettier-plugin-toml
printWidth: 120
1 change: 1 addition & 0 deletions docs/acknowledgments.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ This project is based on many amazing open source software projects:
- [**Poetry**](https://python-poetry.org/) - Python package manager
- [**Prettier**](https://prettier.io/) - Code formatter
- [**prettier-plugin-go-template**](https://github.com/NiklasPor/prettier-plugin-go-template) - Prettier plugin for Go template files
- [**Prettier Toml Plugin**](https://www.npmjs.com/package/prettier-plugin-toml) - Prettier plugin for TOML files
- [**Task**](https://taskfile.dev/) - Task runner
- [**Wget**](https://www.gnu.org/software/wget/) - File downloader
- [**yamllint**](https://yamllint.readthedocs.io/) - YAML linter
Expand Down
94 changes: 93 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"markdown-link-check": "3.11.2",
"markdownlint-cli": "0.37.0",
"prettier": "3.0.3",
"prettier-plugin-go-template": "0.0.15"
"prettier-plugin-go-template": "0.0.15",
"prettier-plugin-toml": "1.0.0"
},
"engines": {
"node": "18.x"
Expand Down

0 comments on commit e9de238

Please sign in to comment.