Files
ccs/eslint.config.mjs
T
kaitranntt 06fa724525 feat: upgrade ESLint strictness - Phase 01 complete
Enhance code quality by upgrading 3 TypeScript ESLint rules from warn → error:
- @typescript-eslint/no-unused-vars: warn → error
- @typescript-eslint/no-explicit-any: warn → error
- @typescript-eslint/no-non-null-assertion: warn → error

Results:
- Zero violations found across 10,487 lines of TypeScript code
- 39/39 tests passing with no regressions
- All validation gates pass (typecheck, lint, format, test)
- Code review: EXCELLENT rating, 0 critical issues

Updated documentation:
- docs/code-standards.md: ESLint Quality Gates section
- docs/project-roadmap.md: Phase 01 completion details
- Plan status updated: Phase 01  COMPLETED

Phase 01 of tier1-eslint-and-ccs-split plan complete.
Ready for Phase 02: CCS monolithic split (1071 → ~200 lines).
2025-11-27 17:23:43 -05:00

50 lines
1.3 KiB
JavaScript

import tseslint from '@typescript-eslint/eslint-plugin';
import tsparser from '@typescript-eslint/parser';
import prettier from 'eslint-config-prettier';
export default [
{
files: ['src/**/*.ts'],
languageOptions: {
parser: tsparser,
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: './tsconfig.json',
},
},
plugins: {
'@typescript-eslint': tseslint,
},
rules: {
// TypeScript rules - upgraded to errors for stricter type safety
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' },
],
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-non-null-assertion': 'error',
// General code quality
'no-console': 'off', // CLI tool needs console
'prefer-const': 'error',
'no-var': 'error',
'eqeqeq': ['error', 'always'],
},
},
{
files: ['tests/**/*.js', 'scripts/**/*.js'],
languageOptions: {
ecmaVersion: 2020,
sourceType: 'commonjs',
},
rules: {
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'prefer-const': 'error',
'no-var': 'error',
},
},
prettier,
];