Files
braidsbymira/eslint.config.js
belviskhoremk 3dacc73dab fix: exclude nested worktree directories from eslint
Same class of issue as the earlier vitest fix: linting from the main
checkout also picked up whatever worktree happened to still exist
under .claude/worktrees/, surfacing as a tsconfigRootDir conflict once
a second worktree was present on disk.

Claude-Session: https://claude.ai/code/session_01NhxA4npAXAxmCDEJt6kxSH
2026-08-12 10:54:57 +02:00

26 lines
840 B
JavaScript

import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
import { defineConfig, globalIgnores } from 'eslint/config'
export default defineConfig([
// Git worktrees for in-progress branches live nested under .claude/worktrees/
// in this project's dev setup — without this, linting from the main checkout
// also lints each worktree's full copy of the source tree.
globalIgnores(['dist', '.claude/worktrees/**']),
{
files: ['**/*.{ts,tsx}'],
extends: [
js.configs.recommended,
tseslint.configs.recommended,
reactHooks.configs.flat.recommended,
reactRefresh.configs.vite,
],
languageOptions: {
globals: globals.browser,
},
},
])