diff --git a/.gitea/workflows/lint.yaml b/.gitea/workflows/lint.yaml new file mode 100644 index 0000000..21f6243 --- /dev/null +++ b/.gitea/workflows/lint.yaml @@ -0,0 +1,25 @@ +name: Lint + +on: + pull_request: + branches: + - '**' + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run lint + run: npm run lint diff --git a/eslint.config.js b/eslint.config.js index 8f8e7c5..83bbe46 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -21,7 +21,10 @@ module.exports = tseslint.config( '@typescript-eslint/no-unsafe-call': 'off', '@typescript-eslint/no-unsafe-argument': 'off', '@typescript-eslint/require-await': 'off', - '@typescript-eslint/no-unused-vars': ['warn', { 'argsIgnorePattern': '^_', 'varsIgnorePattern': '^_', 'caughtErrorsIgnorePattern': '^_' }] + '@typescript-eslint/no-unused-vars': [ + 'warn', + { argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' } + ] } }, { diff --git a/src/utils/environment-finder.ts b/src/utils/environment-finder.ts index 6d4b163..2bd9296 100644 --- a/src/utils/environment-finder.ts +++ b/src/utils/environment-finder.ts @@ -27,7 +27,9 @@ export function findEnvironmentFile(dir: string, maxDepth = 8, currentDepth = 0) if (found) return found; } } - } catch {} + } catch { + //bypass errors + } return null; }