From e3a115fd02ffd1662d24b44691dbfae8876653a2 Mon Sep 17 00:00:00 2001 From: jared Date: Mon, 13 Apr 2026 20:47:26 -0400 Subject: [PATCH] ci: install php via apt, relax eslint rules for existing codebase --- .eslintrc.json | 12 ++++++++++-- .gitea/workflows/lint.yml | 5 +++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 3a1921f..3f36631 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -8,10 +8,18 @@ "ecmaVersion": 2021, "sourceType": "script" }, + "globals": { + "lt": "readonly", + "module": "writable" + }, "rules": { + "no-undef": "off", "no-unused-vars": "warn", - "no-console": "off", + "no-empty": "warn", + "no-inner-declarations": "warn", + "no-useless-escape": "warn", + "no-regex-spaces": "warn", "semi": ["error", "always"], - "eqeqeq": ["error", "always"] + "eqeqeq": "warn" } } diff --git a/.gitea/workflows/lint.yml b/.gitea/workflows/lint.yml index 9086ec1..cd1f83c 100644 --- a/.gitea/workflows/lint.yml +++ b/.gitea/workflows/lint.yml @@ -10,12 +10,13 @@ jobs: php-lint: name: PHP (phpcs PSR-12) runs-on: ubuntu-latest - container: php:8.2-cli steps: - uses: actions/checkout@v3 - - name: Install PHP_CodeSniffer + - name: Install PHP and phpcs run: | + apt-get update -qq + apt-get install -y -qq php-cli curl -sL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar -o /usr/local/bin/phpcs chmod +x /usr/local/bin/phpcs