/** * ESLint focuses on correctness, NOT style — Prettier owns formatting. * Stylistic rules that fight Prettier are off. */ module.exports = { root: true, env: { browser: true, node: true, es2022: true }, parser: '@typescript-eslint/parser', parserOptions: { ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { jsx: true } }, plugins: ['@typescript-eslint', 'react', 'react-hooks'], settings: { react: { version: 'detect' } }, extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react/recommended', 'plugin:react-hooks/recommended' ], rules: { // React 17+ JSX transform — no need to import React in scope. 'react/react-in-jsx-scope': 'off', 'react/prop-types': 'off', // we use TS // Hooks correctness — high signal. 'react-hooks/rules-of-hooks': 'error', 'react-hooks/exhaustive-deps': 'warn', // TS — pragmatic, not strict. '@typescript-eslint/no-explicit-any': 'warn', '@typescript-eslint/no-unused-vars': [ 'warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' } ], '@typescript-eslint/no-non-null-assertion': 'off', // Vanilla — common bugs. 'no-console': ['warn', { allow: ['warn', 'error', 'info'] }], 'no-debugger': 'error', 'prefer-const': 'warn', eqeqeq: ['error', 'always', { null: 'ignore' }] }, ignorePatterns: [ 'node_modules', 'out', 'release', 'dist', '*.tsbuildinfo', 'src/preload/index.d.ts' ], overrides: [ { files: ['**/*.test.ts', '**/*.test.tsx'], env: { node: true } }, { files: ['*.config.js', '*.config.ts', 'electron.vite.config.ts'], rules: { '@typescript-eslint/no-var-requires': 'off' } } ] }