eslint.config.js 795 B

123456789101112131415161718192021222324252627282930313233
  1. import tseslint from 'typescript-eslint';
  2. export default tseslint.config(
  3. {
  4. ignores: [
  5. 'build/',
  6. 'node_modules/',
  7. 'coverage/',
  8. '**/*.js',
  9. '**/*.cjs',
  10. '**/*.mjs',
  11. '**/*.d.ts',
  12. 'src/wikijs/generated/',
  13. ],
  14. },
  15. ...tseslint.configs.recommendedTypeChecked,
  16. {
  17. languageOptions: {
  18. parserOptions: {
  19. projectService: true,
  20. tsconfigRootDir: import.meta.dirname,
  21. },
  22. },
  23. rules: {
  24. '@typescript-eslint/explicit-function-return-type': 'off',
  25. '@typescript-eslint/explicit-module-boundary-types': 'off',
  26. '@typescript-eslint/no-explicit-any': 'error',
  27. '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
  28. '@typescript-eslint/no-floating-promises': 'error',
  29. 'no-console': ['warn', { allow: ['warn', 'error'] }],
  30. },
  31. },
  32. );