import js from "@eslint/js"; import ts from "typescript-eslint"; import react from "eslint-plugin-react"; import { defineConfig } from "eslint/config"; import reactHooks from "eslint-plugin-react-hooks"; import globals from "globals"; export default defineConfig( js.configs.recommended, ts.configs.recommended, { files: ["**/*.{ts,tsx}"], plugins: { react, "react-hooks": reactHooks, }, languageOptions: { globals: { ...globals.browser, }, }, settings: { react: { version: "detect", }, }, rules: { ...react.configs.recommended.rules, ...react.configs["jsx-runtime"].rules, ...reactHooks.configs.recommended.rules, // Disable for React Three Fiber - it uses custom JSX properties "react/no-unknown-property": "off", // Using TypeScript for prop validation "react/prop-types": "off", // R3F requires mutating Three.js objects returned from useThree() "react-hooks/immutability": "off", }, }, { ignores: ["dist/"], }, );