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>
zio/stable
Eric Bailey 2023-08-25 10:48:38 -05:00 committed by GitHub
parent a0dca81a74
commit b15a435069
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 5 deletions

View File

@ -9,6 +9,7 @@ module.exports = {
plugins: ['@typescript-eslint', 'detox'],
ignorePatterns: [
'**/__mocks__/*.ts',
'src/platform/polyfills.ts',
'src/third-party',
'ios',
'android',
@ -25,6 +26,7 @@ module.exports = {
files: ['*.js', '*.mjs', '*.ts', '*.tsx'],
rules: {
semi: [2, 'never'],
'react-native/no-inline-styles': 0,
},
},
],

View File

@ -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={[

View File

@ -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

View File

@ -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) {

View File

@ -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