diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..d77ae12 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +node_modules/ +*.md diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..40f2d3f --- /dev/null +++ b/.prettierrc @@ -0,0 +1,14 @@ +{ + "plugins": ["prettier-plugin-go-template"], + "proseWrap": "preserve", + "overrides": [ + { + "files": ["*.html"], + "options": { + "parser": "go-template", + "printWidth": 80, + "singleAttributePerLine": true + } + } + ] +} diff --git a/package-lock.json b/package-lock.json index 3a5989c..acc732b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "markdownlint": "^0.37.3", "markdownlint-cli": "^0.43.0", "prettier": "^3.4.2", + "prettier-plugin-go-template": "^0.0.15", "stylelint": "^16.12.0", "stylelint-config-standard-scss": "^14.0.0", "stylelint-prettier": "^5.0.2", @@ -3459,6 +3460,22 @@ "node": ">=6.0.0" } }, + "node_modules/prettier-plugin-go-template": { + "version": "0.0.15", + "resolved": "https://registry.npmjs.org/prettier-plugin-go-template/-/prettier-plugin-go-template-0.0.15.tgz", + "integrity": "sha512-WqU92E1NokWYNZ9mLE6ijoRg6LtIGdLMePt2C7UBDjXeDH9okcRI3zRqtnWR4s5AloiqyvZ66jNBAa9tmRY5EQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ulid": "^2.3.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "prettier": "^3.0.0" + } + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -4369,6 +4386,16 @@ "dev": true, "license": "MIT" }, + "node_modules/ulid": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/ulid/-/ulid-2.3.0.tgz", + "integrity": "sha512-keqHubrlpvT6G2wH0OEfSW4mquYRcbe/J8NMmveoQOjUqmo+hXtO+ORCpWhdbZ7k72UtY61BL7haGxW6enBnjw==", + "dev": true, + "license": "MIT", + "bin": { + "ulid": "bin/cli.js" + } + }, "node_modules/underscore": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", diff --git a/package.json b/package.json index c9d0881..0b75307 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "markdownlint": "^0.37.3", "markdownlint-cli": "^0.43.0", "prettier": "^3.4.2", + "prettier-plugin-go-template": "^0.0.15", "stylelint": "^16.12.0", "stylelint-config-standard-scss": "^14.0.0", "stylelint-prettier": "^5.0.2",