forked from EduCraft/curriculum-project-hub
chore(admin-web): add Prettier formatter with Svelte support
Add prettier + prettier-plugin-svelte as devDependencies with a .prettierrc.json matching the existing code style (tabs, single quotes, semicolons, trailing commas, 120 char width). Add .prettierignore for build artifacts and lockfile. Wire up `npm run format` (write) and `npm run format:check` (CI gate) scripts. Prettier is chosen over Biome because its prettier-plugin-svelte correctly preserves <script> block indentation per Svelte convention; Biome's experimental Svelte formatter flattens script-block indentation to column 0, producing inconsistent output.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"useTabs": true,
|
||||
"singleQuote": true,
|
||||
"semi": true,
|
||||
"trailingComma": "all",
|
||||
"printWidth": 120,
|
||||
"plugins": ["prettier-plugin-svelte"],
|
||||
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
|
||||
}
|
||||
Reference in New Issue
Block a user