Skip to content

Commit a88481c

Browse files
Create lint.yml
1 parent b46de29 commit a88481c

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/lint.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: HTML & CSS Lint
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout Repository
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: 18
21+
22+
- name: Install Linters
23+
run: |
24+
npm install -g htmlhint stylelint stylelint-config-standard
25+
26+
- name: Run HTMLHint
27+
run: htmlhint "**/*.html"
28+
29+
- name: Create .stylelintrc for CSS Linting
30+
run: |
31+
echo '{
32+
"extends": "stylelint-config-standard"
33+
}' > .stylelintrc.json
34+
35+
- name: Run Stylelint
36+
run: stylelint "**/*.css"

0 commit comments

Comments
 (0)