Skip to content

Commit 1f13147

Browse files
committed
Update workflows and CLI improvements
1 parent e9f5ad2 commit 1f13147

File tree

3 files changed

+44
-1
lines changed

3 files changed

+44
-1
lines changed

.github/workflows/lint.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '18'
21+
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v4
24+
with:
25+
version: 10.14.0
26+
27+
- name: Install dependencies
28+
run: pnpm install --frozen-lockfile
29+
30+
- name: Run lint
31+
run: pnpm run lint
32+
33+
- name: Run format check
34+
run: pnpm run format --check
35+
36+
- name: Run type check
37+
run: pnpm run build

.github/workflows/npm-publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ jobs:
3030
- name: Install dependencies
3131
run: pnpm install --frozen-lockfile
3232

33+
- name: Run lint
34+
run: pnpm run lint
35+
36+
- name: Run format check
37+
run: pnpm run format --check
38+
3339
- name: Build package
3440
run: pnpm run build
3541

src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { promises as fs } from 'node:fs';
2-
import path from 'node:path';
32
import { readFileSync } from 'node:fs';
3+
import path from 'node:path';
44
import { fileURLToPath } from 'node:url';
55
import chalk from 'chalk';
66
import { Command } from 'commander';

0 commit comments

Comments
 (0)