the-tip-top-backend/eslint.config.js
soufiane 9330c68e5c fix: improve CI/CD quality checks and fix test/lint configuration
Backend fixes:
- Add eslint.config.js with proper ES6 module configuration
- Add jest.config.js to support ES modules
- Update package.json with @eslint/js dependency
- Configure npm test script with NODE_OPTIONS for ES modules
- Update Jenkinsfile to block deployments on failed lint/tests

This ensures:
1. ESLint works correctly with ES6 modules
2. Jest can run tests with ES6 imports
3. Deployments are blocked if quality checks fail

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

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

37 lines
736 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',
},
},
rules: {
'no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'no-console': 'off',
'no-undef': 'error',
},
},
{
ignores: [
'node_modules/**',
'dist/**',
'coverage/**',
'*.config.js',
],
},
];