From efa7be495689ae320b42a4b770dfa0d9e48a27d1 Mon Sep 17 00:00:00 2001 From: KittenTM Date: Wed, 18 Mar 2026 21:19:37 +0100 Subject: [PATCH] re-add workflow that was accidentally removed --- .forgejo/workflows/lint.yml | 56 +++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .forgejo/workflows/lint.yml diff --git a/.forgejo/workflows/lint.yml b/.forgejo/workflows/lint.yml new file mode 100644 index 0000000..6df92fb --- /dev/null +++ b/.forgejo/workflows/lint.yml @@ -0,0 +1,56 @@ +name: CodeQL + +on: + push: + branches: [main] + pull_request: + +jobs: + lint-debian: + runs-on: debian-latest + steps: + - uses: actions/checkout@v4 + - name: Install Linters + run: npm install -g htmlhint stylelint stylelint-config-standard eslint + - name: HTML + run: htmlhint "**/*.html" --ignore "assets/**" + - name: CSS + run: | + echo '{ + "extends": "stylelint-config-standard", + "rules": { + "no-duplicate-selectors": null, + "no-descending-specificity": null, + "declaration-block-no-shorthand-property-overrides": null, + "font-family-no-duplicate-names": null, + "selector-class-pattern": null, + "selector-id-pattern": null, + "keyframes-name-pattern": null, + "declaration-block-single-line-max-declarations": null, + "property-no-unknown": null, + "declaration-property-value-no-unknown": null + } + }' > .stylelintrc.json + stylelint "**/*.css" --allow-empty-input --fix || stylelint "**/*.css" --allow-empty-input + - name: JS + run: | + echo "export default [ + { + languageOptions: { + globals: { + window: 'readonly', + document: 'readonly', + navigator: 'readonly', + location: 'readonly', + history: 'readonly', + localStorage: 'readonly', + fetch: 'readonly' + } + }, + rules: { + 'semi': ['error', 'always'], + 'no-console': 'off' + } + } + ];" > eslint.config.mjs + npx eslint . --fix || npx eslint . \ No newline at end of file