Files
Shadowbroker/frontend/eslint.config.mjs
BigBodyCobainandClaude Opus 5.5 3b6b323946 Keep new React Compiler lint rules as warnings for eslint-config-next 16.4
eslint-config-next 16.4.3 enables react-hooks/preserve-manual-memoization
and react-hooks/immutability as errors, failing lint at 20 sites. The React
Compiler isn't enabled, so these are optimization diagnostics, not runtime
bugs. Report them as warnings, matching how the sibling compiler rules are
already configured, until the flagged code is cleaned up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 16:04:04 -07:00

57 lines
1.6 KiB
JavaScript

import { defineConfig, globalIgnores } from 'eslint/config';
import nextVitals from 'eslint-config-next/core-web-vitals';
import nextTs from 'eslint-config-next/typescript';
const eslintConfig = defineConfig([
...nextVitals,
...nextTs,
{
files: ['**/*.{ts,tsx}'],
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/ban-ts-comment': 'warn',
'react-hooks/set-state-in-effect': 'off',
'react-hooks/purity': 'off',
'react-hooks/refs': 'off',
// eslint-config-next 16.4 turns on two more React Compiler diagnostics.
// The compiler isn't enabled here, so these flag code it would skip
// optimizing rather than runtime bugs. Keep them visible as warnings
// (20 sites, mostly useMeshChatController.ts) until they're cleaned up.
'react-hooks/preserve-manual-memoization': 'warn',
'react-hooks/immutability': 'warn',
'prefer-const': 'warn',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
},
},
{
files: ['**/*.test.{ts,tsx}'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
{
files: ['scripts/**/*.js'],
rules: {
'@typescript-eslint/no-require-imports': 'off',
},
},
{
files: ['**/*.cjs', 'vitest.config.js'],
rules: {
'@typescript-eslint/no-require-imports': 'off',
},
},
// Override default ignores of eslint-config-next.
globalIgnores([
// Default ignores of eslint-config-next:
'.next/**',
'out/**',
'build/**',
'next-env.d.ts',
'coverage/**',
'eslint-report.json',
]),
]);
export default eslintConfig;