fix: linter warnings
Massimo Melina committed
Mar 6, 2022 at 23:57 UTC
75b533617d856ef2bec30204066762705c88d374
4 files changed
+11
-4
.eslintrc
new
+8
@@ -0,0 +1,8 @@
1
+{
2
+ "extends": "react-app",
3
+ "rules": {
4
+ "no-mixed-operators": 0,
5
+ "no-ex-assign": 0,
6
+ "no-throw-literal": 0
7
+ }
8
+}
admin/src/Form.ts
+2
-2
@@ -108,7 +108,7 @@ export function StringField({ value, onChange, fromField=_.identity, toField=_.i
108
useEffect(() => {
109
setState(() => toField(value) ?? '')
110
setErr('')
111
- }, [value])
111
+ }, [value, toField])
112
return h(TextField, {
113
fullWidth: true,
114
...props,
@@ -219,7 +219,7 @@ export function BoolField({ label='', value, onChange, helperText, fromField=_.i
219
const setter = () => toField(value) ?? false
220
const [state, setState] = useState(setter)
221
useEffect(() => setState(setter),
222
- [value])
222
+ [value]) //eslint-disable-line
223
const control = h(Switch, {
224
checked: state,
225
...props,
frontend/src/useTheme.ts
+1
-1
@@ -3,7 +3,7 @@
3
import { state, useSnapState } from './state'
4
import { useEffect } from 'react'
5
6
-export default function() {
6
+export default function useTheme() {
7
const { theme } = useSnapState()
8
useEffect(()=>{
9
const e = document.body
server/src/const.ts
-1
@@ -5,7 +5,6 @@ import * as fs from 'fs'
5
import _ from 'lodash'
6
7
export const DEV = process.env.DEV ? 'DEV' : ''
8
-console.debug(process.cwd())
8
export const HFS_STARTED = new Date()
9
export const BUILD_TIMESTAMP = ''
10
export const VERSION = ''