the-tip-top-backend/eslint.config.js
soufiane 359fee23b0 fix: add missing global variables to ESLint config
Add fetch and timer functions (setTimeout, setInterval, etc.) as
global variables in ESLint configuration to fix no-undef errors
in scripts.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 15:50:37 +01:00

42 lines
897 B
JavaScript

import js from '@eslint/js';
export default [
js.configs.recommended,
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
// Node.js globals
console: 'readonly',
process: 'readonly',
Buffer: 'readonly',
__dirname: 'readonly',
__filename: 'readonly',
global: 'readonly',
module: 'readonly',
require: 'readonly',
exports: 'writable',
fetch: 'readonly',
setTimeout: 'readonly',
setInterval: 'readonly',
clearTimeout: 'readonly',
clearInterval: 'readonly',
},
},
rules: {
'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'no-console': 'off',
'no-undef': 'error',
},
},
{
ignores: [
'node_modules/**',
'dist/**',
'coverage/**',
'*.config.js',
],
},
];