diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..fd496a8 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "singleQuote": true, + "semi": false +} diff --git a/package.json b/package.json index 4bbd135..3b21c86 100644 --- a/package.json +++ b/package.json @@ -6,9 +6,13 @@ "scripts": { "dev": "vite", "build": "tsc && vite build", - "preview": "vite preview" + "preview": "vite preview", + "format": "prettier . --cache", + "format:fix": "yarn format --write", + "format:check": "yarn format --check" }, "devDependencies": { + "prettier": "^2.8.8", "typescript": "^5.0.2", "vite": "^4.3.2" } diff --git a/yarn.lock b/yarn.lock index f4ee7d6..682d7e2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -164,6 +164,11 @@ postcss@^8.4.23: picocolors "^1.0.0" source-map-js "^1.0.2" +prettier@^2.8.8: + version "2.8.8" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" + integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== + rollup@^3.21.0: version "3.21.6" resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.21.6.tgz#f5649ccdf8fcc7729254faa457cbea9547eb86db"