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