diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..0965e7e5 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "semi": false, + "singleQuote": true, + "trailingComma": "all", + "printWidth": 100 +} diff --git a/package-lock.json b/package-lock.json index 939aeeec..d3ad6183 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,6 +30,7 @@ "happy-dom": "15.7.4", "husky": "9.1.6", "mermaid": "^10.9.1", + "prettier": "3.3.3", "rimraf": "6.0.1", "rollup-plugin-typescript-paths": "1.5.0", "ts-node": "10.9.2", @@ -12913,6 +12914,21 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/pretty-format": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", diff --git a/package.json b/package.json index 7743abc1..f55d2f63 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "preversion": "npm run lint && npm run test -- run && npm run build", "prepare": "npm run build && husky install", "lint": "eslint .", + "format": "prettier . --write", "test": "vitest", "typedoc": "typedoc", "coverage": "vitest run --coverage", @@ -40,6 +41,7 @@ "happy-dom": "15.7.4", "husky": "9.1.6", "mermaid": "^10.9.1", + "prettier": "3.3.3", "rimraf": "6.0.1", "rollup-plugin-typescript-paths": "1.5.0", "ts-node": "10.9.2",