Files
telemetry-client-js/eslint.config.js
Jason Woltje 07bf9dd9b4
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
fix(#1): add Node.js globals to ESLint config
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>
2026-02-14 22:43:21 -06:00

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: '^_' }],
},
},
];