mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-11 12:09:03 +00:00
- Migrate package manager from npm to bun - Add ESLint configuration with TypeScript support - Add Prettier configuration and .prettierignore - Format all TypeScript source files - Update CLAUDE.md with bun instructions - Verify 39 tests passing
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'],
|
|
languageOptions: {
|
|
parser: tsparser,
|
|
parserOptions: {
|
|
ecmaVersion: 2020,
|
|
sourceType: 'module',
|
|
project: './tsconfig.json',
|
|
},
|
|
},
|
|
plugins: {
|
|
'@typescript-eslint': tseslint,
|
|
},
|
|
rules: {
|
|
// TypeScript rules - warnings for now, upgrade to errors incrementally
|
|
// TODO: Upgrade these to 'error' as codebase is cleaned up
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'warn',
|
|
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' },
|
|
],
|
|
'@typescript-eslint/no-explicit-any': 'warn',
|
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
'@typescript-eslint/no-non-null-assertion': 'warn',
|
|
|
|
// 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,
|
|
];
|