diff options
author | Eric Bailey <git@esb.lol> | 2023-08-25 10:48:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-25 08:48:38 -0700 |
commit | b15a435069a4721214a542af0bd0d24c8ae2066d (patch) | |
tree | eaf95bd63268786b9e53f61763d80537b15f4470 /src | |
parent | a0dca81a749269839dc78c1952305ba4d0f5568d (diff) | |
download | voidsky-b15a435069a4721214a542af0bd0d24c8ae2066d.tar.zst |
Eslint updates (#1281)
* eslint: Update eslintrc * eslint: Strings must use singlequote quotes * eslint: expected { after if-condition * eslint: update warnings * a little cleanup * remove conflicted file --------- Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com> Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/view/com/modals/Modal.web.tsx | 4 | ||||
-rw-r--r-- | src/view/com/modals/ProfilePreview.tsx | 2 | ||||
-rw-r--r-- | src/view/com/util/Alert.web.tsx | 2 | ||||
-rw-r--r-- | src/view/com/util/ViewSelector.tsx | 4 |
4 files changed, 7 insertions, 5 deletions
diff --git a/src/view/com/modals/Modal.web.tsx b/src/view/com/modals/Modal.web.tsx index 0e28b1618..687c4fba3 100644 --- a/src/view/com/modals/Modal.web.tsx +++ b/src/view/com/modals/Modal.web.tsx @@ -118,10 +118,10 @@ function Modal({modal}: {modal: ModalIface}) { } return ( - // eslint-disable-next-line + // eslint-disable-next-line react-native-a11y/has-valid-accessibility-descriptors <TouchableWithoutFeedback onPress={onPressMask}> <View style={styles.mask}> - {/* eslint-disable-next-line */} + {/* eslint-disable-next-line react-native-a11y/has-valid-accessibility-descriptors */} <TouchableWithoutFeedback onPress={onInnerPress}> <View style={[ diff --git a/src/view/com/modals/ProfilePreview.tsx b/src/view/com/modals/ProfilePreview.tsx index 4efe81225..65b584866 100644 --- a/src/view/com/modals/ProfilePreview.tsx +++ b/src/view/com/modals/ProfilePreview.tsx @@ -21,7 +21,7 @@ export const Component = observer(({did}: {did: string}) => { const {screen} = useAnalytics() // track the navigator state to detect if a page-load occurred - const navState = useNavigationState(s => s) + const navState = useNavigationState(state => state) const [initNavState] = useState(navState) const isLoading = initNavState !== navState diff --git a/src/view/com/util/Alert.web.tsx b/src/view/com/util/Alert.web.tsx index 94ccc7e43..bf2456504 100644 --- a/src/view/com/util/Alert.web.tsx +++ b/src/view/com/util/Alert.web.tsx @@ -3,10 +3,12 @@ import {AlertButton, AlertStatic} from 'react-native' class WebAlert implements Pick<AlertStatic, 'alert'> { public alert(title: string, message?: string, buttons?: AlertButton[]): void { if (buttons === undefined || buttons.length === 0) { + // eslint-disable-next-line no-alert window.alert([title, message].filter(Boolean).join('\n')) return } + // eslint-disable-next-line no-alert const result = window.confirm([title, message].filter(Boolean).join('\n')) if (result === true) { diff --git a/src/view/com/util/ViewSelector.tsx b/src/view/com/util/ViewSelector.tsx index a25ca4d8e..cd3299284 100644 --- a/src/view/com/util/ViewSelector.tsx +++ b/src/view/com/util/ViewSelector.tsx @@ -174,8 +174,8 @@ export function Selector({ <View style={[pal.view, styles.outer]} onLayout={e => { - const {height} = e.nativeEvent.layout - setHeight(height || 60) + const {height: layoutHeight} = e.nativeEvent.layout + setHeight(layoutHeight || 60) }}> {items.map((item, i) => { const selected = i === selectedIndex |