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
This commit is contained in:
Sped0n
2023-10-28 20:13:15 +08:00
parent 3335bfe27d
commit 649e17a086

View File

@@ -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"
}
}
]
}