Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
ESLint 9 flat config requires explicit globals. Without them, Node.js builtins (fetch, crypto, setTimeout, AbortController, etc.) trigger no-undef errors, blocking the CI pipeline. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
30 lines
716 B
JavaScript
30 lines
716 B
JavaScript
import eslint from '@eslint/js';
|
|
import globals from 'globals';
|
|
import tseslint from '@typescript-eslint/eslint-plugin';
|
|
import tsparser from '@typescript-eslint/parser';
|
|
|
|
export default [
|
|
eslint.configs.recommended,
|
|
{
|
|
files: ['src/**/*.ts', 'tests/**/*.ts'],
|
|
languageOptions: {
|
|
parser: tsparser,
|
|
parserOptions: {
|
|
ecmaVersion: 2022,
|
|
sourceType: 'module',
|
|
},
|
|
globals: {
|
|
...globals.nodeBuiltin,
|
|
},
|
|
},
|
|
plugins: {
|
|
'@typescript-eslint': tseslint,
|
|
},
|
|
rules: {
|
|
...tseslint.configs.recommended.rules,
|
|
'no-unused-vars': 'off',
|
|
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
|
|
},
|
|
},
|
|
];
|