Yaltopia-Ticket-Admin/eslint.config.js
debudebuye 9c7e33499a
Some checks are pending
CI / Test & Build (18.x) (push) Waiting to run
CI / Test & Build (20.x) (push) Waiting to run
CI / Security Audit (push) Waiting to run
Deploy to Production / Deploy to Netlify/Vercel (push) Waiting to run
chore: Update dependencies, refactor ESLint config, and enhance test infrastructure
2026-02-26 11:18:40 +03:00

37 lines
1017 B
JavaScript

import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
export default tseslint.config(
{ ignores: ['dist'] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ['**/*.{ts,tsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'@typescript-eslint/no-explicit-any': 'warn', // Change from error to warning
},
},
{
files: ['src/test/**/*.{ts,tsx}'],
rules: {
'react-refresh/only-export-components': 'off',
'@typescript-eslint/no-explicit-any': 'off', // Allow any in test files
},
},
)