diff --git a/.github/workflows/html-lint.yml b/.github/workflows/html-lint.yml new file mode 100644 index 0000000..4b0fac5 --- /dev/null +++ b/.github/workflows/html-lint.yml @@ -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 install + - name: Run html-validate + run: npx html-validate "**/*.html" diff --git a/.htmlvalidate.json b/.htmlvalidate.json new file mode 100644 index 0000000..88c0c81 --- /dev/null +++ b/.htmlvalidate.json @@ -0,0 +1,11 @@ +{ + "extends": ["html-validate:recommended"], + "rules": { + "no-implicit-button-type": "off", + "no-inline-style": "off", + "void-style": "off", + "doctype-style": "off", + "aria-label-misuse": "off", + "no-redundant-aria-label": "off" + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..7ced19e --- /dev/null +++ b/package.json @@ -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\"" + } +}