File tree 4 files changed +19
-5
lines changed
4 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,4 @@ import { render } from 'preact'
2
2
import { App } from './app.tsx'
3
3
import './index.css'
4
4
5
- render ( < App /> , document . getElementById ( 'app' ) as HTMLElement )
5
+ render ( < App /> , document . getElementById ( 'app' ) ! )
Original file line number Diff line number Diff line change 1
1
/* eslint-env node */
2
2
3
3
module . exports = {
4
+ root : true ,
4
5
env : { browser : true , es2020 : true } ,
5
6
extends : [
6
7
'eslint:recommended' ,
7
8
'plugin:@typescript-eslint/recommended' ,
9
+ 'plugin:@typescript-eslint/recommended-requiring-type-checking' ,
8
10
'plugin:react-hooks/recommended' ,
9
11
] ,
10
12
parser : '@typescript-eslint/parser' ,
11
- parserOptions : { ecmaVersion : 'latest' , sourceType : 'module' } ,
13
+ parserOptions : {
14
+ ecmaVersion : 'latest' ,
15
+ sourceType : 'module' ,
16
+ project : true ,
17
+ tsconfigRootDir : __dirname ,
18
+ } ,
12
19
plugins : [ 'react-refresh' ] ,
13
20
rules : {
14
- 'react-refresh/only-export-components' : 'warn' ,
21
+ 'react-refresh/only-export-components' : [
22
+ 'warn' ,
23
+ { allowConstantExport : true } ,
24
+ ] ,
25
+ '@typescript-eslint/no-non-null-assertion' : 'off' ,
15
26
} ,
16
27
}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import ReactDOM from 'react-dom/client'
3
3
import App from './App.tsx'
4
4
import './index.css'
5
5
6
- ReactDOM . createRoot ( document . getElementById ( 'root' ) as HTMLElement ) . render (
6
+ ReactDOM . createRoot ( document . getElementById ( 'root' ) ! ) . render (
7
7
< React . StrictMode >
8
8
< App />
9
9
</ React . StrictMode > ,
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ module.exports = {
12
12
settings : { react : { version : '18.2' } } ,
13
13
plugins : [ 'react-refresh' ] ,
14
14
rules : {
15
- 'react-refresh/only-export-components' : 'warn' ,
15
+ 'react-refresh/only-export-components' : [
16
+ 'warn' ,
17
+ { allowConstantExport : true } ,
18
+ ] ,
16
19
} ,
17
20
}
You can’t perform that action at this time.
0 commit comments