From 629a33e2fb74b90ec8225b76611106461c6c5153 Mon Sep 17 00:00:00 2001 From: P-Chan Date: Tue, 11 Oct 2022 20:16:58 +0900 Subject: [PATCH 1/3] chore: add format and format:check scripts --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index ced65a1..975aacc 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,8 @@ "build": "tsup", "example:custom-properties": "ts-node ./examples/custom-properties.ts", "example:custom-media-queries": "ts-node ./examples/custom-media-queries.ts", + "format": "prettier --write .", + "format:check": "prettier --check .", "prebuild": "rimraf ./dist", "prepublishOnly": "npm run build", "test": "vitest", From 2a9d88faf95b01c4a45405fa0aadc8ec944db724 Mon Sep 17 00:00:00 2001 From: P-Chan Date: Tue, 11 Oct 2022 20:17:13 +0900 Subject: [PATCH 2/3] ci: add format-check job --- .github/workflows/ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6e6a3d7..14b2118 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,20 @@ on: - pull_request jobs: + format-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: 'yarn' + - name: Install dependencies + run: yarn + - name: Format check + run: yarn format:check + build: runs-on: ubuntu-latest steps: From 608d8b46203eae68fb5edef4ea3e5d343acbae41 Mon Sep 17 00:00:00 2001 From: P-Chan Date: Tue, 11 Oct 2022 20:17:56 +0900 Subject: [PATCH 3/3] chore: add .prettierignore --- .prettierignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..6d76558 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +# output +dist