This commit is contained in:
2026-06-16 06:18:42 +02:00
parent 3f5078841d
commit 66248c4736
39 changed files with 6699 additions and 94 deletions

40
eslint.config.js Normal file
View File

@@ -0,0 +1,40 @@
import js from '@eslint/js'
import tseslint from 'typescript-eslint'
import reactHooks from 'eslint-plugin-react-hooks'
import prettier from 'eslint-config-prettier'
import globals from 'globals'
export default tseslint.config(
{ ignores: ['out/**', 'dist/**', 'node_modules/**', 'coverage/**', 'design_handoff_helder_workbench/**'] },
js.configs.recommended,
...tseslint.configs.recommended,
{
files: ['src/renderer/**/*.{ts,tsx}'],
languageOptions: { globals: { ...globals.browser } },
plugins: { 'react-hooks': reactHooks },
rules: {
...reactHooks.configs.recommended.rules,
// These newer rules fire on the canonical "load async then setState in a
// mount effect" / "read a stable bridge in an effect" patterns we use
// deliberately. Keep the useful exhaustive-deps warnings; drop these.
'react-hooks/set-state-in-effect': 'off',
'react-hooks/refs': 'off',
},
},
{
files: ['src/main/**/*.ts', 'src/preload/**/*.ts', 'electron.vite.config.ts', 'vitest.config.ts', 'eslint.config.js'],
languageOptions: { globals: { ...globals.node } },
},
{
files: ['test/**/*.{ts,tsx}'],
languageOptions: { globals: { ...globals.node, ...globals.browser } },
},
{
rules: {
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
},
},
prettier,
)