eslint.config.mjs 856 B

1234567891011121314151617181920212223242526272829303132333435
  1. // @ts-check
  2. import eslint from '@eslint/js';
  3. import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
  4. import globals from 'globals';
  5. import tseslint from 'typescript-eslint';
  6. export default tseslint.config(
  7. {
  8. ignores: ['eslint.config.mjs'],
  9. },
  10. eslint.configs.recommended,
  11. ...tseslint.configs.recommendedTypeChecked,
  12. eslintPluginPrettierRecommended,
  13. {
  14. languageOptions: {
  15. globals: {
  16. ...globals.node,
  17. ...globals.jest,
  18. },
  19. ecmaVersion: 5,
  20. sourceType: 'module',
  21. parserOptions: {
  22. projectService: true,
  23. tsconfigRootDir: import.meta.dirname,
  24. },
  25. },
  26. },
  27. {
  28. rules: {
  29. '@typescript-eslint/no-explicit-any': 'off',
  30. '@typescript-eslint/no-floating-promises': 'warn',
  31. '@typescript-eslint/no-unsafe-argument': 'warn'
  32. },
  33. },
  34. );