mirror of
https://github.com/inaturalist/iNaturalistReactNative.git
synced 2025-12-23 14:08:56 -05:00
Tried to clear out some eslint warnings (#1937)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
version: 2
|
||||
secret:
|
||||
# Exclude files and paths by globbing
|
||||
ignored-paths:
|
||||
ignored_paths:
|
||||
- '**/README.md'
|
||||
- 'node_modules/*'
|
||||
- 'package-lock.json'
|
||||
|
||||
@@ -42,7 +42,7 @@ type Props = {
|
||||
camera: Object,
|
||||
device: Object,
|
||||
flipCamera: Function,
|
||||
handleCheckmarkPress: ( _result: any | null ) => void,
|
||||
handleCheckmarkPress: Function,
|
||||
isLandscapeMode: boolean
|
||||
};
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ interface Props {
|
||||
showModal: boolean;
|
||||
closeModal: () => void;
|
||||
// TODO: Param not typed yet, because ExploreLocationSearch is not typed yet
|
||||
updateLocation: ( _location: any ) => void;
|
||||
updateLocation: ( location: "worldwide" | { name: string } ) => void;
|
||||
}
|
||||
|
||||
const ExploreLocationSearchModal = ( {
|
||||
|
||||
@@ -6,7 +6,7 @@ interface Props {
|
||||
showModal: boolean;
|
||||
closeModal: () => void;
|
||||
// TODO: Param not typed yet, because ExploreProjectSearch is not typed yet
|
||||
updateProject: ( _project: any ) => void;
|
||||
updateProject: ( project: null | { title: string } ) => void;
|
||||
}
|
||||
|
||||
const ExploreProjectSearchModal = ( {
|
||||
|
||||
@@ -6,7 +6,7 @@ interface Props {
|
||||
showModal: boolean;
|
||||
closeModal: () => void;
|
||||
// TODO: Param not typed yet, because ExploreUserSearch is not typed yet
|
||||
updateUser: ( _user: any ) => void;
|
||||
updateUser: ( user: null | { login: string } ) => void;
|
||||
}
|
||||
|
||||
const ExploreUserSearchModal = ( {
|
||||
|
||||
@@ -50,7 +50,7 @@ import ExploreProjectSearchModal from "./ExploreProjectSearchModal";
|
||||
import ExploreTaxonSearchModal from "./ExploreTaxonSearchModal";
|
||||
import ExploreUserSearchModal from "./ExploreUserSearchModal";
|
||||
|
||||
const DROP_SHADOW = getShadowForColor( colors.darkGray, {
|
||||
const DROP_SHADOW = getShadowForColor( colors?.darkGray, {
|
||||
offsetHeight: 4,
|
||||
elevation: 6
|
||||
} );
|
||||
@@ -60,13 +60,14 @@ const { useRealm } = RealmContext;
|
||||
interface Props {
|
||||
closeModal: () => void;
|
||||
filterByIconicTaxonUnknown: () => void;
|
||||
updateTaxon: ( _taxon: Object | null ) => void;
|
||||
// TODO: type this properly when taxon has a type
|
||||
updateTaxon: ( taxon: null | { name: string } ) => void;
|
||||
// TODO: Param not typed yet, because ExploreLocationSearch is not typed yet
|
||||
updateLocation: ( _location: any ) => void;
|
||||
updateLocation: ( location: "worldwide" | { name: string } ) => void;
|
||||
// TODO: Param not typed yet, because ExploreUserSearch is not typed yet
|
||||
updateUser: ( _user: any ) => void;
|
||||
updateUser: ( user: null | { login: string } ) => void;
|
||||
// TODO: Param not typed yet, because ExploreProjectSearch is not typed yet
|
||||
updateProject: ( _project: any ) => void;
|
||||
updateProject: ( project: null | { title: string } ) => void;
|
||||
}
|
||||
|
||||
const FilterModal = ( {
|
||||
|
||||
@@ -5,8 +5,7 @@ import React from "react";
|
||||
import { useTheme } from "react-native-paper";
|
||||
|
||||
interface Props {
|
||||
// TODO: navigation type
|
||||
handleClose?: ( _navigation: any ) => void;
|
||||
handleClose?: ( ) => void;
|
||||
black?: boolean;
|
||||
buttonClassName?: string;
|
||||
size?: number;
|
||||
|
||||
@@ -3,6 +3,7 @@ import classNames from "classnames";
|
||||
import { INatIcon, INatIconButton } from "components/SharedComponents";
|
||||
import { View } from "components/styledComponents";
|
||||
import React from "react";
|
||||
import { TextInput as RNTextInput } from "react-native";
|
||||
import { TextInput, useTheme } from "react-native-paper";
|
||||
import { useTranslation } from "sharedHooks";
|
||||
import { getShadowForColor } from "styles/global";
|
||||
@@ -16,8 +17,7 @@ interface Props {
|
||||
containerClass?: string;
|
||||
handleTextChange: ( _text: string ) => void;
|
||||
hasShadow?: boolean;
|
||||
// TODO: check react-native-paper docs for correct type
|
||||
input?: any,
|
||||
input?: React.RefObject<RNTextInput>,
|
||||
placeholder?: string;
|
||||
testID?: string;
|
||||
value: string;
|
||||
|
||||
10
src/types/declarations.d.ts
vendored
10
src/types/declarations.d.ts
vendored
@@ -1,6 +1,7 @@
|
||||
import { RootStackParamList } from "@react-navigation/native";
|
||||
|
||||
// Using typescript with react-native-svg-transformer
|
||||
// from https://www.npmjs.com/package/react-native-svg-transformer?activeTab
|
||||
|
||||
declare module "*.svg" {
|
||||
import React from "react";
|
||||
import { SvgProps } from "react-native-svg";
|
||||
@@ -8,3 +9,10 @@ declare module "*.svg" {
|
||||
const content: React.FC<SvgProps>;
|
||||
export default content;
|
||||
}
|
||||
|
||||
declare global {
|
||||
namespace ReactNavigation {
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||
interface RootParamList extends RootStackParamList {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user