mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 20:17:45 +00:00
- Add src/**/__tests__/** to tsconfig.json exclude list - Add ignores pattern for __tests__ in eslint.config.mjs - Fix ui/src/lib/api-client.ts import path for provider-entitlement-types - Remove stale build artifacts from ui/src/lib/ and tests/mocks/
51 lines
1.4 KiB
JavaScript
51 lines
1.4 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'],
|
|
ignores: ['src/**/__tests__/**'],
|
|
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,
|
|
];
|