diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..72ac47ebd --- /dev/null +++ b/.prettierignore @@ -0,0 +1,4 @@ +# Ignore all SVG icons. +**/icons.html +# These are whitespace sensitive. +layouts/_default/_markup/render-code* diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..cf04e7521 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,21 @@ +{ + "plugins": ["prettier-plugin-go-template"], + "overrides": [ + { + "files": ["*.html"], + "options": { + "parser": "go-template", + "goTemplateBracketSpacing": true, + "bracketSameLine": true + } + }, + { + "files": ["*.js", "*.ts"], + "options": { + "useTabs": true, + "printWidth": 120, + "singleQuote": true + } + } + ] +} diff --git a/package.json b/package.json index 92339ba25..86901377a 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,8 @@ "devDependencies": { "@tailwindcss/cli": "^4.0.0", "@tailwindcss/typography": "^0.5.15", + "prettier": "^3.5.0", + "prettier-plugin-go-template": "^0.0.15", "tailwindcss": "^4.0.0" }, "dependencies": {