when-am-i / files / eslint.config.js
eslint.config.js
60741172 2026-06-17 Pavel Safronov | 1 | import js from '@eslint/js'; |
| 2 | import tseslint from 'typescript-eslint'; | |
| 3 | import reactHooks from 'eslint-plugin-react-hooks'; | |
| 4 | import reactRefresh from 'eslint-plugin-react-refresh'; | |
| 5 | ||
| 6 | export default tseslint.config( | |
3cbfe9ad 2026-06-22 Pavel Safronov | 7 | { ignores: ['dist', 'node_modules', 'temp'] }, |
60741172 2026-06-17 Pavel Safronov | 8 | js.configs.recommended, |
| 9 | ...tseslint.configs.recommended, | |
| 10 | { | |
| 11 | files: ['src/**/*.{ts,tsx}'], | |
| 12 | plugins: { | |
| 13 | 'react-hooks': reactHooks, | |
| 14 | 'react-refresh': reactRefresh, | |
| 15 | }, | |
| 16 | rules: { | |
| 17 | ...reactHooks.configs.recommended.rules, | |
| 18 | 'react-refresh/only-export-components': [ | |
| 19 | 'warn', | |
| 20 | { allowConstantExport: true }, | |
| 21 | ], | |
3765de0e 2026-06-24 Pavel Safronov | 22 | // No stray debug logging in shipped code; console.warn/error are |
| 23 | // allowed for genuine diagnostics (see utils/report.ts). | |
| 24 | 'no-console': ['error', { allow: ['warn', 'error'] }], | |
60741172 2026-06-17 Pavel Safronov | 25 | }, |
| 26 | }, | |
| 27 | ); |