.eslintrc.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. module.exports = {
  2. root: true,
  3. ignorePatterns: ['node_modules', 'dist', '*.config.js'],
  4. plugins: ['@typescript-eslint'],
  5. extends: [
  6. 'eslint:recommended',
  7. 'plugin:@typescript-eslint/recommended-type-checked',
  8. 'plugin:@typescript-eslint/stylistic-type-checked',
  9. 'prettier',
  10. ],
  11. parser: '@typescript-eslint/parser',
  12. parserOptions: {
  13. ecmaVersion: 'latest',
  14. sourceType: 'module',
  15. project: ['./tsconfig.json', './apps/*/tsconfig.json', './packages/*/tsconfig.json'],
  16. },
  17. rules: {
  18. '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
  19. '@typescript-eslint/explicit-function-return-type': 'off',
  20. '@typescript-eslint/no-explicit-any': 'warn',
  21. 'no-console': ['warn', { allow: ['warn', 'error'] }],
  22. },
  23. overrides: [
  24. {
  25. files: ['apps/web-dashboard/**/*.ts', 'apps/web-dashboard/**/*.tsx'],
  26. parserOptions: {
  27. project: './apps/web-dashboard/tsconfig.json',
  28. },
  29. },
  30. {
  31. files: ['*.test.ts', '*.spec.ts'],
  32. rules: {
  33. '@typescript-eslint/no-explicit-any': 'off',
  34. '@typescript-eslint/no-unused-vars': 'off',
  35. },
  36. },
  37. ],
  38. };