Skip to content

Commit

Permalink
fix: add prettier and format:check, format:fix scripts
Browse files Browse the repository at this point in the history
Signed-off-by: Denis Golovin <[email protected]>
  • Loading branch information
dgolovin committed Mar 19, 2024
1 parent 647edb7 commit 8a38e71
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"bracketSameLine": true,
"singleQuote": true,
"arrowParens": "avoid",
"printWidth": 120,
"trailingComma": "all",
"plugins": []
}

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"scripts": {
"build": "rollup --bundleConfigAsCjs --config rollup.config.js --compact --environment BUILD:production && node ./scripts/build.js",
"watch": "rollup --bundleConfigAsCjs --config rollup.config.js -w",
"format:check": "prettier --cache --check \"{src,types,scripts}/**/*.{ts,js}\"",
"format:fix": "prettier --cache --write \"{src,types,scripts}/**/*.{ts,js}\"",
"test": "vitest run --coverage"
},
"dependencies": {
Expand All @@ -41,6 +43,7 @@
"@types/js-yaml": "^4.0.5",
"@vitest/coverage-v8": "^1.2.1",
"mkdirp": "^2.1.3",
"prettier": "^3.2.5",
"rollup": "^3.20.4",
"tslib": "^2.5.0",
"typescript": "^5.0.4",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,11 @@ postcss@^8.4.32:
picocolors "^1.0.0"
source-map-js "^1.0.2"

prettier@^3.2.5:
version "3.2.5"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368"
integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==

pretty-format@^29.7.0:
version "29.7.0"
resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz"
Expand Down

0 comments on commit 8a38e71

Please sign in to comment.