mirror of
https://github.com/kuhyx/testsAndMisc-archive.git
synced 2026-11-10 19:27:05 +01:00
The directory has existed on disk with 58 untracked files, four of them over the 250-line cap. An untracked file is invisible to every pre-commit hook, so those violations could not be fixed or gated while it stayed that way -- and its CI workflow was untracked too, so nothing ran against it. Landed with its already-written evidence artifact and a contract, since this crosses the 4-file threshold. Verified before staging: 58 plain text source/config files, no binaries, no node_modules, no build output. npm run check passes -- typecheck, eslint --max-warnings 0, and 220 tests at 100% statements/branches/functions/lines. Splitting its four oversized files is deliberately a separate commit. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
48 lines
1.5 KiB
JavaScript
48 lines
1.5 KiB
JavaScript
import js from '@eslint/js'
|
|
import react from '@eslint-react/eslint-plugin'
|
|
import vitest from '@vitest/eslint-plugin'
|
|
import { defineConfig } from 'eslint/config'
|
|
import reactHooks from 'eslint-plugin-react-hooks'
|
|
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
import globals from 'globals'
|
|
import tseslint from 'typescript-eslint'
|
|
|
|
export default defineConfig(
|
|
{ ignores: ['dist', 'coverage', 'node_modules'] },
|
|
{
|
|
files: ['**/*.{ts,tsx}'],
|
|
extends: [
|
|
js.configs.recommended,
|
|
tseslint.configs.strictTypeChecked,
|
|
tseslint.configs.stylisticTypeChecked,
|
|
react.configs['strict-type-checked'],
|
|
reactHooks.configs.flat.recommended,
|
|
reactRefresh.configs.vite,
|
|
],
|
|
languageOptions: {
|
|
globals: globals.browser,
|
|
parserOptions: {
|
|
projectService: true,
|
|
tsconfigRootDir: import.meta.dirname,
|
|
},
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/explicit-function-return-type': 'error',
|
|
'@typescript-eslint/consistent-type-imports': 'error',
|
|
'@typescript-eslint/no-shadow': 'error',
|
|
'no-console': 'error',
|
|
'eqeqeq': ['error', 'always'],
|
|
'prefer-const': ['error', { destructuring: 'all' }],
|
|
},
|
|
},
|
|
{
|
|
files: ['src/**/*.test.{ts,tsx}', 'src/test/**/*.ts'],
|
|
extends: [vitest.configs.recommended],
|
|
languageOptions: { globals: { ...globals.browser, ...globals.node } },
|
|
},
|
|
{
|
|
files: ['eslint.config.js'],
|
|
extends: [tseslint.configs.disableTypeChecked],
|
|
},
|
|
)
|