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