1- import js from '@eslint/js'
2- import globals from 'globals'
3- import reactHooks from 'eslint-plugin-react-hooks'
4- import reactRefresh from 'eslint-plugin-react-refresh'
5- import tseslint from 'typescript-eslint'
6- import { defineConfig , globalIgnores } from 'eslint/config'
1+ import globals from "globals" ;
2+ import tseslint from "typescript-eslint" ;
3+ import pluginReact from "eslint-plugin-react" ;
4+ import hooks from "eslint-plugin-react-hooks" ;
5+ import refresh from "eslint-plugin-react-refresh" ;
76
8- export default defineConfig ( [
9- globalIgnores ( [ 'dist' ] ) ,
7+ export default tseslint . config (
108 {
11- files : [ '**/*.{ts,tsx}' ] ,
12- extends : [
13- js . configs . recommended ,
14- tseslint . configs . recommended ,
15- reactHooks . configs . flat . recommended ,
16- reactRefresh . configs . vite ,
17- ] ,
9+ ignores : [ "dist" , "node_modules" , "jupyter-books" , "public" ] ,
10+ } ,
11+ {
12+ files : [ "src/**/*.{ts,tsx}" ] ,
13+ plugins : {
14+ react : pluginReact ,
15+ "react-hooks" : hooks ,
16+ "react-refresh" : refresh ,
17+ } ,
18+ settings : {
19+ react : {
20+ version : "detect" ,
21+ } ,
22+ } ,
23+ rules : {
24+ ...pluginReact . configs . flat . recommended . rules ,
25+ ...pluginReact . configs . flat [ 'jsx-runtime' ] . rules ,
26+ ...hooks . configs . recommended . rules ,
27+ "react-refresh/only-export-components" : "warn" ,
28+ } ,
1829 languageOptions : {
19- ecmaVersion : 2020 ,
20- globals : globals . browser ,
30+ globals : {
31+ ...globals . browser ,
32+ } ,
33+ parser : tseslint . parser ,
34+ parserOptions : {
35+ project : "tsconfig.app.json" ,
36+ } ,
2137 } ,
2238 } ,
23- ] )
39+ {
40+ files : [ "src/components/ModelViewer.tsx" ] ,
41+ rules : {
42+ "react/no-unknown-property" : "off" ,
43+ } ,
44+ }
45+ ) ;
0 commit comments