mirror of
https://github.com/skoelle/PeopleCostCounter.git
synced 2026-09-17 20:00:25 +00:00
Add HTML linting CI (html-validate) and config
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
name: HTML Lint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
html-lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Run html-validate
|
||||
run: npx html-validate "**/*.html"
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": ["html-validate:recommended"],
|
||||
"rules": {
|
||||
"attr-no-dup": "error",
|
||||
"doctype-style": "error",
|
||||
"element-no-empty": ["warn", {"void": true}]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "people-cost-counter",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"html-validate": "^8.8.0"
|
||||
},
|
||||
"scripts": {
|
||||
"lint:html": "html-validate \"**/*.html\""
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user