diff --git a/.eslintrc b/.eslintrc index 95b3c54..01590eb 100644 --- a/.eslintrc +++ b/.eslintrc @@ -26,6 +26,7 @@ }, "rules": { "@typescript-eslint/explicit-module-boundary-types": 0, - "@typescript-eslint/no-explicit-any": 0 + "@typescript-eslint/no-explicit-any": 0, + "react/prop-types": 0 } } diff --git a/package-lock.json b/package-lock.json index 908cad1..c68d63d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,6 @@ "devDependencies": { "@semantic-release/changelog": "^5.0.1", "@semantic-release/git": "^9.0.0", - "@types/prop-types": "^15.7.3", "@types/react": "^17.0.3", "@types/react-native": "^0.64.2", "@typescript-eslint/eslint-plugin": "^4.22.0", @@ -23,7 +22,6 @@ "husky": "^4.2.5", "lint-staged": "^10.2.11", "prettier": "^2.0.5", - "prop-types": "^15.7.2", "semantic-release": "^17.1.2", "typescript": "^4.2.4" }, @@ -11998,6 +11996,11 @@ "safer-buffer": "^2.0.2", "tweetnacl": "~0.14.0" }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, "engines": { "node": ">=0.10.0" } @@ -22749,6 +22752,7 @@ "integrity": "sha512-HcZ0RWQRuJfpPiaHyFQJzcym+/dDIVUPwUAXWoub/C4GkGu+mPjp8vqK6g0FxokCnnI2TK0gZTza2IDfiNNscQ==", "peer": true, "requires": { + "@babel/core": "^7.0.0", "@babel/plugin-proposal-class-properties": "^7.0.0", "@babel/plugin-proposal-export-default-from": "^7.0.0", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", @@ -22795,6 +22799,7 @@ "integrity": "sha512-K1sHO3ODBFCr7uEiCQ4RvVr+cQg0EHQF8ChVPnecGh/WDD8udrTq9ECwB0dRfMjAvlsHtRUlJm6ZSI8UPgum2w==", "peer": true, "requires": { + "@babel/core": "^7.0.0", "babel-preset-fbjs": "^3.3.0", "metro-babel-transformer": "0.64.0", "metro-react-native-babel-preset": "0.64.0", diff --git a/package.json b/package.json index defcc67..d29aac7 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,6 @@ "devDependencies": { "@semantic-release/changelog": "^5.0.1", "@semantic-release/git": "^9.0.0", - "@types/prop-types": "^15.7.3", "@types/react": "^17.0.3", "@types/react-native": "^0.64.2", "@typescript-eslint/eslint-plugin": "^4.22.0", @@ -49,7 +48,6 @@ "husky": "^4.2.5", "lint-staged": "^10.2.11", "prettier": "^2.0.5", - "prop-types": "^15.7.2", "semantic-release": "^17.1.2", "typescript": "^4.2.4" }, diff --git a/src/Button.tsx b/src/Button.tsx index 07b8779..f4e4365 100644 --- a/src/Button.tsx +++ b/src/Button.tsx @@ -7,11 +7,9 @@ import { TouchableOpacity, PlatformColor, TextProps, - TextPropTypes, ColorValue, } from "react-native"; import useTheme, { StyleBuilder } from "./useTheme"; -import PropTypes from "prop-types"; const COLOR = Platform.OS === "ios" ? "#007ff9" : "#169689"; @@ -52,15 +50,6 @@ const DialogButton: React.FC = (props) => { ); }; -DialogButton.propTypes = { - ...TextPropTypes, - label: PropTypes.string.isRequired, - color: PropTypes.string, - bold: PropTypes.bool, - disabled: PropTypes.bool, - onPress: PropTypes.func.isRequired, -}; - DialogButton.displayName = "DialogButton"; const buildStyles: StyleBuilder = (isDark) => diff --git a/src/CodeInput.tsx b/src/CodeInput.tsx index d45c9a1..175a9c9 100644 --- a/src/CodeInput.tsx +++ b/src/CodeInput.tsx @@ -9,12 +9,10 @@ import { PlatformColor, TextInputProps, ViewStyle, - ViewPropTypes, StyleProp, TextStyle, } from "react-native"; import useTheme from "./useTheme"; -import PropTypes from "prop-types"; export interface DialogCodeInputProps extends TextInputProps { wrapperStyle?: StyleProp; @@ -104,18 +102,6 @@ const DialogCodeInput: React.FC = (props) => { ); }; - -DialogCodeInput.propTypes = { - ...ViewPropTypes, - wrapperStyle: ViewPropTypes.style, - digitContainerStyle: ViewPropTypes.style, - digitContainerFocusedStyle: ViewPropTypes.style, - digitStyle: ViewPropTypes.style, - codeLength: PropTypes.number, - onCodeChange: PropTypes.func, - style: (Text as any).propTypes.style, -}; - DialogCodeInput.displayName = "DialogCodeInput"; const buildStyles = (isDark: boolean) => diff --git a/src/Container.tsx b/src/Container.tsx index 8abdad7..6e1cc80 100644 --- a/src/Container.tsx +++ b/src/Container.tsx @@ -8,11 +8,9 @@ import { PlatformColor, ViewStyle, StyleProp, - ViewPropTypes, } from "react-native"; import Modal from "./Modal"; import useTheme, { StyleBuilder } from "./useTheme"; -import PropTypes from "prop-types"; import DialogTitle, { DialogTitleProps } from "./Title"; import DialogDescription, { DialogDescriptionProps } from "./Description"; import DialogButton, { DialogButtonProps } from "./Button"; @@ -136,21 +134,6 @@ const DialogContainer: React.FC = (props) => { ); }; -DialogContainer.propTypes = { - blurComponentIOS: PropTypes.node, - buttonSeparatorStyle: ViewPropTypes.style, - contentStyle: ViewPropTypes.style, - footerStyle: ViewPropTypes.style, - headerStyle: ViewPropTypes.style, - blurStyle: ViewPropTypes.style, - visible: PropTypes.bool, - verticalButtons: PropTypes.bool, - onBackdropPress: PropTypes.func, - keyboardVerticalOffset: PropTypes.number, - useNativeDriver: PropTypes.bool, - children: PropTypes.node.isRequired, -}; - const buildStyles: StyleBuilder = () => StyleSheet.create({ centeredView: { diff --git a/src/Description.tsx b/src/Description.tsx index a3d35cf..f800b38 100644 --- a/src/Description.tsx +++ b/src/Description.tsx @@ -4,7 +4,6 @@ import { StyleSheet, Text, PlatformColor, - TextPropTypes, TextProps, } from "react-native"; import useTheme, { StyleBuilder } from "./useTheme"; @@ -22,8 +21,6 @@ const DialogDescription: React.FC = (props) => { ); }; -DialogDescription.propTypes = TextPropTypes; - DialogDescription.displayName = "DialogDescription"; const buildStyles: StyleBuilder = (isDark) => diff --git a/src/Input.tsx b/src/Input.tsx index 50ef92f..1518180 100644 --- a/src/Input.tsx +++ b/src/Input.tsx @@ -9,11 +9,9 @@ import { PlatformColor, TextInputProps, ViewStyle, - ViewPropTypes, StyleProp, } from "react-native"; import useTheme, { StyleBuilder } from "./useTheme"; -import PropTypes from "prop-types"; export interface DialogInputProps extends TextInputProps { label?: ReactNode; @@ -63,16 +61,6 @@ const DialogInput: React.FC = (props) => { ); }; -DialogInput.propTypes = { - ...ViewPropTypes, - label: PropTypes.string, - textInputRef: PropTypes.any, - wrapperStyle: ViewPropTypes.style, - numberOfLines: PropTypes.number, - multiline: PropTypes.bool, - style: (Text as any).propTypes.style, -}; - DialogInput.displayName = "DialogInput"; const buildStyles: StyleBuilder = (isDark) => diff --git a/src/Modal.tsx b/src/Modal.tsx index 7a4108b..e459dbd 100644 --- a/src/Modal.tsx +++ b/src/Modal.tsx @@ -1,6 +1,5 @@ import * as React from "react"; import { Component } from "react"; -import PropTypes from "prop-types"; import { Animated, Easing, @@ -10,7 +9,6 @@ import { StyleProp, StyleSheet, TouchableWithoutFeedback, - ViewPropTypes, ViewStyle, } from "react-native"; @@ -73,14 +71,6 @@ interface ModalState { } export class Modal extends Component { - static propTypes = { - onBackdropPress: PropTypes.func, - onHide: PropTypes.func, - visible: PropTypes.bool, - contentStyle: ViewPropTypes.style, - useNativeDriver: PropTypes.bool, - }; - static defaultProps: Partial = { onBackdropPress: () => null, onHide: () => null, diff --git a/src/Switch.tsx b/src/Switch.tsx index ba54b74..888bac0 100644 --- a/src/Switch.tsx +++ b/src/Switch.tsx @@ -8,10 +8,8 @@ import { View, PlatformColor, SwitchProps, - ViewPropTypes, } from "react-native"; import useTheme, { StyleBuilder } from "./useTheme"; -import PropTypes from "prop-types"; export interface DialogSwitchProps extends SwitchProps { label?: ReactNode; @@ -28,11 +26,6 @@ const DialogSwitch: React.FC = (props) => { ); }; -DialogSwitch.propTypes = { - ...ViewPropTypes, - label: PropTypes.node, -}; - DialogSwitch.displayName = "DialogSwitch"; const buildStyles: StyleBuilder = (isDark) => diff --git a/src/Title.tsx b/src/Title.tsx index 8dc9d61..7e8f2b6 100644 --- a/src/Title.tsx +++ b/src/Title.tsx @@ -4,7 +4,6 @@ import { StyleSheet, Text, PlatformColor, - TextPropTypes, TextProps, } from "react-native"; import useTheme, { StyleBuilder } from "./useTheme"; @@ -22,8 +21,6 @@ const DialogTitle: React.FC = (props) => { ); }; -DialogTitle.propTypes = TextPropTypes; - DialogTitle.displayName = "DialogTitle"; const buildStyles: StyleBuilder = (isDark) =>