Skip to content

Commit 6ec34b6

Browse files
committed
chore: use the standard lint and format job and scripts
1 parent 562a245 commit 6ec34b6

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

.github/workflows/CI.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,29 @@ jobs:
4242
Lint:
4343
if: "!contains(github.event.head_commit.message, '[skip ci]')"
4444
runs-on: ubuntu-latest
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4547
steps:
4648
- uses: actions/checkout@v2
4749
with:
4850
fetch-depth: 0
49-
- uses: actions/setup-node@v2
51+
- name: Commit lint ✨
52+
uses: wagoid/commitlint-github-action@v2
53+
54+
- uses: UziTech/action-setup-atom@v1
55+
- name: Setup PNPM
56+
uses: pnpm/[email protected]
5057
with:
51-
node-version: "12.x"
52-
- name: Install NPM dependencies
53-
run: |
54-
npm install --ignore-scripts
58+
version: latest
59+
60+
- name: Install dependencies
61+
run: pnpm install
62+
63+
- name: Format ✨
64+
run: pnpm test.format
65+
5566
- name: Lint ✨
56-
run: npm run test:lint
67+
run: pnpm test.lint
5768

5869
Release:
5970
needs: [Test, Lint]

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
],
1111
"scripts": {
1212
"format": "prettier --write .",
13-
"lint": "eslint --fix .",
14-
"test:lint": "eslint .",
13+
"test.format": "prettier . --check",
14+
"lint": "eslint . --fix",
15+
"test.lint": "eslint .",
1516
"clean": "shx rm -rf dist .parcel-cache",
1617
"dev": "cross-env NODE_ENV=development BABEL_KEEP_MODULES=true rollup -c -w",
1718
"build.test": "cross-env NODE_ENV=test BABEL_KEEP_MODULES=true rollup -c",

0 commit comments

Comments
 (0)