From 649e17a0869ad0e31adf982c932cb1c41ccd043e Mon Sep 17 00:00:00 2001 From: Sped0n Date: Sat, 28 Oct 2023 20:13:15 +0800 Subject: [PATCH] chore(.prettierrc.json): update Prettier configuration to include support for go-template files and improve code formatting settings The Prettier configuration file (.prettierrc.json) has been updated with the following changes: - `useTabs` is set to `false` to use spaces for indentation - `tabWidth` is set to `2` to specify the number of spaces for each indentation level - `printWidth` is set to `88` to limit the line length to 88 characters - `singleQuote` is set to `true` to use single quotes for strings - `trailingComma` is set to `none` to remove trailing commas in arrays and objects - `bracketSpacing` is set to `true` to add spaces inside brackets - `semi` is set to `false` to remove semicolons at the end of statements - `plugins` is added to include the "prettier-plugin-go-template" plugin for go-template files - `overrides` is added to specify the parser as "go-template" for files with the ".html" extension --- .prettierrc.json | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.prettierrc.json b/.prettierrc.json index 4107696..263da8b 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,9 +1,18 @@ { -"useTabs": false, -"tabWidth": 2, -"printWidth": 88, -"singleQuote": true, -"trailingComma": "none", -"bracketSpacing": true, -"semi": false + "useTabs": false, + "tabWidth": 2, + "printWidth": 88, + "singleQuote": true, + "trailingComma": "none", + "bracketSpacing": true, + "semi": false, + "plugins": ["prettier-plugin-go-template"], + "overrides": [ + { + "files": ["*.html"], + "options": { + "parser": "go-template" + } + } + ] }