From 7bea9e6fc5d87f1d3417d18b0cca2c4f30020913 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Wed, 29 Jul 2026 02:51:59 +0000 Subject: [PATCH] add lint workflow --- .gitea/workflows/lint.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .gitea/workflows/lint.yaml diff --git a/.gitea/workflows/lint.yaml b/.gitea/workflows/lint.yaml new file mode 100644 index 0000000..7ecad44 --- /dev/null +++ b/.gitea/workflows/lint.yaml @@ -0,0 +1,32 @@ +name: ProxmoxAAS-Dashboard Code Style Check +run-name: Code style check on ${{gitea.repository}} ${{gitea.ref}} ${{gitea.sha}} +on: [push] + +jobs: + lint-check: + runs-on: ubuntu-latest + steps: + - name: Initialize ${{runner.os}} ${{runner.arch}} + uses: actions/setup-node@v4 + - name: Install linters + run: | + npm install -g \ + @eslint/eslintrc \ + @eslint/js \ + eslint \ + globals \ + html-validate \ + stylelint \ + stylelint-config-standard + - name: Verify linters + run: | + eslint --version + stylelint --version + html-validate --version + - name: Check out ${{gitea.repository}} ${{gitea.ref}} ${{gitea.sha}} + uses: actions/checkout@v4 + - name: Run Linters + run: | + html-validate --config dev_config/.htmlvalidate.json web/html/*; \ + stylelint --config dev_config/.stylelintrc.json --formatter verbose web/css/*.css; \ + eslint --config dev_config/eslint.config.mjs web/scripts/ \ No newline at end of file