File tree Expand file tree Collapse file tree 4 files changed +19
-5
lines changed
Expand file tree Collapse file tree 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'
22import { App } from './app.tsx'
33import './index.css'
44
5- render ( < App /> , document . getElementById ( 'app' ) as HTMLElement )
5+ render ( < App /> , document . getElementById ( 'app' ) ! )
Original file line number Diff line number Diff line change 11/* eslint-env node */
22
33module . exports = {
4+ root : true ,
45 env : { browser : true , es2020 : true } ,
56 extends : [
67 'eslint:recommended' ,
78 'plugin:@typescript-eslint/recommended' ,
9+ 'plugin:@typescript-eslint/recommended-requiring-type-checking' ,
810 'plugin:react-hooks/recommended' ,
911 ] ,
1012 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+ } ,
1219 plugins : [ 'react-refresh' ] ,
1320 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' ,
1526 } ,
1627}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import ReactDOM from 'react-dom/client'
33import App from './App.tsx'
44import './index.css'
55
6- ReactDOM . createRoot ( document . getElementById ( 'root' ) as HTMLElement ) . render (
6+ ReactDOM . createRoot ( document . getElementById ( 'root' ) ! ) . render (
77 < React . StrictMode >
88 < App />
99 </ React . StrictMode > ,
Original file line number Diff line number Diff line change @@ -12,6 +12,9 @@ module.exports = {
1212 settings : { react : { version : '18.2' } } ,
1313 plugins : [ 'react-refresh' ] ,
1414 rules : {
15- 'react-refresh/only-export-components' : 'warn' ,
15+ 'react-refresh/only-export-components' : [
16+ 'warn' ,
17+ { allowConstantExport : true } ,
18+ ] ,
1619 } ,
1720}
You can’t perform that action at this time.
0 commit comments