From 9c8a0ab2446d59e467c984a8b044dd798ab2517c Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Tue, 9 Jan 2024 08:15:10 +0200 Subject: [PATCH] n/prettier.md: add sample config --- n/prettier.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/n/prettier.md b/n/prettier.md index 56d8584..e8acc0f 100644 --- a/n/prettier.md +++ b/n/prettier.md @@ -13,3 +13,22 @@ versions. - [@prettier/plugin-ruby](https://www.npmjs.com/package/@prettier/plugin-ruby) - [prettier-plugin-toml](https://www.npmjs.com/package/prettier-plugin-toml) - [@prettier/plugin-xml](https://www.npmjs.com/package/@prettier/plugin-xml) + +## sample pre-commit-config.yaml + +```yaml +repos: + - repo: https://github.com/pre-commit/mirrors-prettier + rev: "v4.0.0-alpha.8" + hooks: + - id: prettier + exclude_types: [json] + additional_dependencies: [ + # https://aminda.eu/n/prettier + "prettier@3.1.1", + "prettier-plugin-nginx@1.0.3", + "@prettier/plugin-ruby@4.0.4", + "prettier-plugin-toml@2.0.1", + "@prettier/plugin-xml@3.2.2", + ] +```