module.exports = { root: true, ignorePatterns: [ 'dist/', 'node_modules/', '.nx/', 'tmp/', '*.js', '*.config.js', '*.config.ts', '**/node_modules/**', '**/dist/**', '**/.nx/**', '**/tmp/**', '**/*.d.ts', '**/*.d.ts.map', '**/*.js.map', '**/tavus.js', '**/tavus.d.ts', '**/tavus.d.ts.map', '**/.wxt/**', '**/scripts/**', '**/node_modules/**/*' // Explicitly exclude all node_modules content ], plugins: ['@nx'], overrides: [ { files: ['*.ts', '*.tsx', '*.js', '*.jsx'], rules: { '@nx/enforce-module-boundaries': [ 'error', { enforceBuildableLibDependency: true, allow: [], depConstraints: [ { sourceTag: '*', onlyDependOnLibsWithTags: ['*'] } ] } ] } }, { files: ['*.ts', '*.tsx'], extends: [ 'plugin:@nx/typescript', 'plugin:@typescript-eslint/recommended' ], parserOptions: { project: './tsconfig.base.json' }, rules: { // TypeScript-specific rules - PROMOTED TO ERROR (Issue #157) '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' }], // Was: 'warn' - Dead code detection '@typescript-eslint/no-explicit-any': 'error', // Was: 'warn' - Type safety // Type-aware rules - PROMOTED TO ERROR (Issue #157) '@typescript-eslint/no-floating-promises': 'error', // Was: 'warn' - Async bug prevention '@typescript-eslint/no-misused-promises': 'error', // Was: 'warn' - Async bug prevention '@typescript-eslint/strict-boolean-expressions': 'off', // Disabled - too strict for existing codebase // Additional type-aware rules from recommended-requiring-type-checking '@typescript-eslint/await-thenable': 'error', // Was: 'warn' - Async correctness '@typescript-eslint/no-unsafe-argument': 'off', // Disabled - too many violations '@typescript-eslint/no-unsafe-assignment': 'off', // Disabled - too many violations '@typescript-eslint/no-unsafe-member-access': 'off', // Disabled - too many violations // '@typescript-eslint/only-throw-error': Removed - deprecated in @typescript-eslint v6+ '@typescript-eslint/array-type': ['error', { default: 'array' }], '@typescript-eslint/consistent-type-imports': 'error', '@typescript-eslint/no-duplicate-enum-values': 'error', '@typescript-eslint/no-empty-interface': 'error', '@typescript-eslint/no-extra-non-null-assertion': 'error', '@typescript-eslint/no-inferrable-types': 'error', '@typescript-eslint/no-misused-new': 'error', '@typescript-eslint/no-namespace': 'error', '@typescript-eslint/no-non-null-assertion': 'error', // Forbid non-null assertions (!) '@typescript-eslint/no-non-null-asserted-optional-chain': 'error', '@typescript-eslint/no-this-alias': 'error', '@typescript-eslint/no-unnecessary-type-constraint': 'error', '@typescript-eslint/no-var-requires': 'error', '@typescript-eslint/prefer-as-const': 'error', '@typescript-eslint/prefer-namespace-keyword': 'error', // Code quality rules 'no-console': 'off', // Allow console logs for debugging and logging // Style rules - REMOVED (Issue #157) - Better handled through code review // 'max-lines': ['warn', { max: 1000 }], // REMOVED - Context-dependent metric // 'max-lines-per-function': ['warn', { max: 100 }], // REMOVED - Encourages poor abstractions // 'complexity': ['warn', { max: 15 }], // REMOVED - Arbitrary thresholds 'no-duplicate-imports': 'error', 'no-self-compare': 'error', 'no-template-curly-in-string': 'error', // Was: 'warn' - PROMOTED - Common typo detection 'no-unmodified-loop-condition': 'error', 'no-unreachable-loop': 'error', 'require-atomic-updates': 'error' } }, { files: ['*.js', '*.jsx'], extends: ['plugin:@nx/javascript'], rules: { 'no-console': 'off', // Allow console logs for debugging and logging // Style rules - REMOVED (Issue #157) - Better handled through code review // 'max-lines': ['warn', { max: 1000 }], // REMOVED // 'max-lines-per-function': ['warn', { max: 100 }], // REMOVED // 'complexity': ['warn', { max: 15 }] // REMOVED } } ] };