Skip to content

Commit f2db7e1

Browse files
ci: Added lint github action
1 parent d15029c commit f2db7e1

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

.github/workflows/lint.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Lint starter files
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags: ['**']
8+
pull_request:
9+
types:
10+
- opened
11+
- reopened
12+
- synchronize
13+
- ready_for_review
14+
15+
jobs:
16+
lint:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Install Node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: 20
24+
- uses: pnpm/action-setup@v3
25+
name: Install pnpm
26+
with:
27+
version: 8
28+
run_install: false
29+
- name: Install dependencies
30+
run: pnpm install
31+
- name: Lint scripts
32+
run: pnpm lint:script
33+
- name: Lint styles
34+
run: pnpm lint:style

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"preview": "nuxi preview",
1010
"prepare": "nuxi prepare",
1111
"postinstall": "nuxi prepare && husky install",
12-
"lint": "yarn lint:script && yarn lint:style",
12+
"lint": "pnpm lint:script && pnpm lint:style",
1313
"lint-fix": "pnpm lint:script --fix && pnpm lint:style --fix",
1414
"lint:script": "eslint .",
1515
"lint:style": "stylelint \"**/*.{vue,css,scss}\"",

0 commit comments

Comments
 (0)