Skip to content

Commit b5b4fa8

Browse files
committed
chore: add test.lint and test.format
1 parent 03e6b22 commit b5b4fa8

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/CI.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,33 @@ jobs:
3434
run: |
3535
npm run test
3636
37+
Lint:
38+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
39+
runs-on: ubuntu-latest
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
steps:
43+
- uses: actions/checkout@v2
44+
with:
45+
fetch-depth: 0
46+
- name: Commit lint ✨
47+
uses: wagoid/commitlint-github-action@v2
48+
49+
- uses: UziTech/action-setup-atom@v1
50+
- name: Setup PNPM
51+
uses: pnpm/action-setup@v1.2.1
52+
with:
53+
version: latest
54+
55+
- name: Install dependencies
56+
run: pnpm install --only=dev --ignore-scripts
57+
58+
# - name: Format ✨
59+
# run: pnpm test.format
60+
#
61+
# - name: Lint ✨
62+
# run: pnpm test.lint
63+
3764
Release:
3865
needs: [Test]
3966
if: github.ref == 'refs/heads/master' &&

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
"repository": "https://github.com/atom-ide-community/babel-plugin-transform-not-strict",
1717
"license": "MIT",
1818
"scripts": {
19+
"format": "prettier --write .",
20+
"test.format": "prettier . --check",
21+
"lint": "eslint . --fix",
22+
"test.lint": "eslint .",
1923
"test": "atom --test spec/spec.js",
2024
"bump": "ncu -u"
2125
},

0 commit comments

Comments
 (0)