eslint.config.js 908 B

12345678910111213141516171819202122232425262728293031323334
  1. import globals from 'globals'
  2. import js from '@eslint/js'
  3. import pluginQuery from '@tanstack/eslint-plugin-query'
  4. import reactHooks from 'eslint-plugin-react-hooks'
  5. import reactRefresh from 'eslint-plugin-react-refresh'
  6. import tseslint from 'typescript-eslint'
  7. export default tseslint.config(
  8. { ignores: ['dist', 'src/components/ui'] },
  9. {
  10. extends: [
  11. js.configs.recommended,
  12. ...tseslint.configs.recommended,
  13. ...pluginQuery.configs['flat/recommended'],
  14. ],
  15. files: ['**/*.{ts,tsx}'],
  16. languageOptions: {
  17. ecmaVersion: 2020,
  18. globals: globals.browser,
  19. },
  20. plugins: {
  21. 'react-hooks': reactHooks,
  22. 'react-refresh': reactRefresh,
  23. },
  24. rules: {
  25. ...reactHooks.configs.recommended.rules,
  26. 'react-refresh/only-export-components': [
  27. 'warn',
  28. { allowConstantExport: true },
  29. ],
  30. 'no-console': 'error',
  31. },
  32. }
  33. )