Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[No QA] Update propTypes files to use camelCase #6005

Merged
merged 3 commits into from
Oct 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/AttachmentPicker/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import CONST from '../../CONST';
import * as attachmentPickerPropTypes from './AttachmentPickerPropTypes';
import * as attachmentPickerPropTypes from './attachmentPickerPropTypes';

/**
* Returns acceptable FileTypes based on ATTACHMENT_PICKER_TYPE
Expand Down
2 changes: 1 addition & 1 deletion src/components/AttachmentPicker/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import React, {Component} from 'react';
import {Alert, Linking, View} from 'react-native';
import {launchImageLibrary} from 'react-native-image-picker';
import RNDocumentPicker from 'react-native-document-picker';
import {propTypes as basePropTypes, defaultProps} from './AttachmentPickerPropTypes';
import {propTypes as basePropTypes, defaultProps} from './attachmentPickerPropTypes';
import styles from '../../styles/styles';
import Popover from '../Popover';
import MenuItem from '../MenuItem';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import {View} from 'react-native';
import Checkbox from '../Checkbox';
import {propTypes, defaultProps} from './CheckboxWithTooltipPropTypes';
import {propTypes, defaultProps} from './checkboxWithTooltipPropTypes';
import Growl from '../../libs/Growl';
import withWindowDimensions from '../withWindowDimensions';

Expand Down
2 changes: 1 addition & 1 deletion src/components/CheckboxWithTooltip/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import {View} from 'react-native';
import CheckboxWithTooltipForMobileWebAndNative from './CheckboxWithTooltipForMobileWebAndNative';
import Checkbox from '../Checkbox';
import {propTypes, defaultProps} from './CheckboxWithTooltipPropTypes';
import {propTypes, defaultProps} from './checkboxWithTooltipPropTypes';
import Tooltip from '../Tooltip';
import withWindowDimensions from '../withWindowDimensions';

Expand Down
2 changes: 1 addition & 1 deletion src/components/CheckboxWithTooltip/index.native.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import {propTypes, defaultProps} from './CheckboxWithTooltipPropTypes';
import {propTypes, defaultProps} from './checkboxWithTooltipPropTypes';
import withWindowDimensions from '../withWindowDimensions';
import CheckboxWithTooltipForMobileWebAndNative from './CheckboxWithTooltipForMobileWebAndNative';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {memo} from 'react';
import {Animated} from 'react-native';
import styles from '../../../styles/styles';
import propTypes from './propTypes';
import propTypes from './expensiTextInputLabelPropTypes';

const ExpensiTextInputLabel = ({
label,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {memo} from 'react';
import {Animated} from 'react-native';
import styles from '../../../styles/styles';
import propTypes from './propTypes';
import propTypes from './expensiTextInputLabelPropTypes';

const ExpensiTextInputLabel = ({
label,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from 'react';
import {Animated} from 'react-native';
import styles from '../../../styles/styles';
import withWindowDimensions, {windowDimensionsPropTypes} from '../../withWindowDimensions';
import GrowlNotificationContainerPropTypes from './GrowlNotificationContainerPropTypes';
import growlNotificationContainerPropTypes from './growlNotificationContainerPropTypes';

const propTypes = {
...GrowlNotificationContainerPropTypes,
...growlNotificationContainerPropTypes,
...windowDimensionsPropTypes,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React from 'react';
import {Animated} from 'react-native';
import {SafeAreaInsetsContext} from 'react-native-safe-area-context';
import styles, {getSafeAreaPadding} from '../../../styles/styles';
import GrowlNotificationContainerPropTypes from './GrowlNotificationContainerPropTypes';
import growlNotificationContainerPropTypes from './growlNotificationContainerPropTypes';

const propTypes = {
...GrowlNotificationContainerPropTypes,
...growlNotificationContainerPropTypes,
};

const GrowlNotificationContainer = ({children, translateY}) => (
Expand Down
2 changes: 1 addition & 1 deletion src/components/Hoverable/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import _ from 'underscore';
import React, {Component} from 'react';
import {View} from 'react-native';
import {propTypes, defaultProps} from './HoverablePropTypes';
import {propTypes, defaultProps} from './hoverablePropTypes';

/**
* It is necessary to create a Hoverable component instead of relying solely on Pressable support for hover state,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Hoverable/index.native.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import _ from 'underscore';
import React from 'react';
import {View} from 'react-native';
import {propTypes, defaultProps} from './HoverablePropTypes';
import {propTypes, defaultProps} from './hoverablePropTypes';

/**
* On mobile, there is no concept of hovering, so we return a plain wrapper around the component's children,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal/BaseModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ReactNativeModal from 'react-native-modal';
import {SafeAreaInsetsContext} from 'react-native-safe-area-context';
import styles, {getModalPaddingStyles, getSafeAreaPadding} from '../../styles/styles';
import themeColors from '../../styles/themes/default';
import {propTypes as modalPropTypes, defaultProps as modalDefaultProps} from './ModalPropTypes';
import {propTypes as modalPropTypes, defaultProps as modalDefaultProps} from './modalPropTypes';
import getModalStyles from '../../styles/getModalStyles';
import {setModalVisibility, willAlertModalBecomeVisible} from '../../libs/actions/Modal';

Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal/index.android.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import withWindowDimensions from '../withWindowDimensions';
import BaseModal from './BaseModal';
import {propTypes, defaultProps} from './ModalPropTypes';
import {propTypes, defaultProps} from './modalPropTypes';

// Only want to use useNativeDriver on Android. It has strange flashes issue on IOS
// https://github.com/react-native-modal/react-native-modal#the-modal-flashes-in-a-weird-way-when-animating
Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal/index.ios.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import withWindowDimensions from '../withWindowDimensions';
import BaseModal from './BaseModal';
import {propTypes, defaultProps} from './ModalPropTypes';
import {propTypes, defaultProps} from './modalPropTypes';

const Modal = props => (
<BaseModal
Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component} from 'react';
import withWindowDimensions from '../withWindowDimensions';
import BaseModal from './BaseModal';
import {propTypes, defaultProps} from './ModalPropTypes';
import {propTypes, defaultProps} from './modalPropTypes';

class Modal extends Component {
constructor(props) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Picker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import RNPickerSelect from 'react-native-picker-select';

import styles from '../../styles/styles';
import * as pickerPropTypes from './PickerPropTypes';
import * as pickerPropTypes from './pickerPropTypes';
import pickerStyles from './pickerStyles';

const Picker = ({
Expand Down
2 changes: 1 addition & 1 deletion src/components/Popover/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {createPortal} from 'react-dom';
import {propTypes, defaultProps} from './PopoverPropTypes';
import {propTypes, defaultProps} from './popoverPropTypes';
import CONST from '../../CONST';
import Modal from '../Modal';
import withWindowDimensions from '../withWindowDimensions';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Popover/index.native.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import _ from 'underscore';
import React from 'react';
import {propTypes as popoverPropTypes, defaultProps} from './PopoverPropTypes';
import {propTypes as popoverPropTypes, defaultProps} from './popoverPropTypes';
import CONST from '../../CONST';
import Modal from '../Modal';
import {windowDimensionsPropTypes} from '../withWindowDimensions';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import _ from 'underscore';
import PropTypes from 'prop-types';
import {propTypes as modalPropTypes, defaultProps as defaultModalProps} from '../Modal/ModalPropTypes';
import {propTypes as modalPropTypes, defaultProps as defaultModalProps} from '../Modal/modalPropTypes';

const propTypes = {
...(_.omit(modalPropTypes, ['type', 'popoverAnchorPosition'])),
Expand Down
2 changes: 1 addition & 1 deletion src/components/PopoverMenu/BasePopoverMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import MenuItem from '../MenuItem';
import {
propTypes as createMenuPropTypes,
defaultProps as defaultCreateMenuPropTypes,
} from './PopoverMenuPropTypes';
} from './popoverMenuPropTypes';
import Text from '../Text';

const propTypes = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/PopoverMenu/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import BasePopoverMenu from './BasePopoverMenu';
import {propTypes, defaultProps} from './PopoverMenuPropTypes';
import {propTypes, defaultProps} from './popoverMenuPropTypes';

/**
* The web implementation of the menu needs to trigger actions before the popup closes
Expand Down
2 changes: 1 addition & 1 deletion src/components/PopoverMenu/index.native.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {Component} from 'react';
import BasePopoverMenu from './BasePopoverMenu';
import {propTypes, defaultProps} from './PopoverMenuPropTypes';
import {propTypes, defaultProps} from './popoverMenuPropTypes';

/**
* The mobile native implementation of the PopoverMenu needs to trigger actions after the popup closes
Expand Down
2 changes: 1 addition & 1 deletion src/components/PopoverWithMeasuredContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {View} from 'react-native';
import Popover from './Popover';
import {propTypes as popoverPropTypes, defaultProps as defaultPopoverProps} from './Popover/PopoverPropTypes';
import {propTypes as popoverPropTypes, defaultProps as defaultPopoverProps} from './Popover/popoverPropTypes';
import withWindowDimensions, {windowDimensionsPropTypes} from './withWindowDimensions';
import CONST from '../CONST';
import styles from '../styles/styles';
Expand Down
4 changes: 2 additions & 2 deletions src/components/ReportActionItem/IOUAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import PropTypes from 'prop-types';
import {withOnyx} from 'react-native-onyx';
import ONYXKEYS from '../../ONYXKEYS';
import IOUQuote from './IOUQuote';
import ReportActionPropTypes from '../../pages/home/report/ReportActionPropTypes';
import reportActionPropTypes from '../../pages/home/report/reportActionPropTypes';
import IOUPreview from './IOUPreview';
import Navigation from '../../libs/Navigation/Navigation';
import ROUTES from '../../ROUTES';

const propTypes = {
/** All the data of the action */
action: PropTypes.shape(ReportActionPropTypes).isRequired,
action: PropTypes.shape(reportActionPropTypes).isRequired,

/** The associated chatReport */
chatReportID: PropTypes.number.isRequired,
Expand Down
4 changes: 2 additions & 2 deletions src/components/ReportActionItem/IOUQuote.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import PropTypes from 'prop-types';
import _ from 'underscore';
import Text from '../Text';
import styles from '../../styles/styles';
import ReportActionPropTypes from '../../pages/home/report/ReportActionPropTypes';
import reportActionPropTypes from '../../pages/home/report/reportActionPropTypes';
import withLocalize, {withLocalizePropTypes} from '../withLocalize';

const propTypes = {
/** All the data of the action */
action: PropTypes.shape(ReportActionPropTypes).isRequired,
action: PropTypes.shape(reportActionPropTypes).isRequired,

/** Should the View Details link be displayed? */
shouldShowViewDetailsLink: PropTypes.bool,
Expand Down
4 changes: 2 additions & 2 deletions src/components/ReportTransaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import ONYXKEYS from '../ONYXKEYS';
import styles from '../styles/styles';
import themeColors from '../styles/themes/default';
import {rejectTransaction} from '../libs/actions/IOU';
import ReportActionPropTypes from '../pages/home/report/ReportActionPropTypes';
import reportActionPropTypes from '../pages/home/report/reportActionPropTypes';
import ReportActionItemSingle from '../pages/home/report/ReportActionItemSingle';
import Text from './Text';

Expand All @@ -24,7 +24,7 @@ const propTypes = {
iouReportID: PropTypes.number.isRequired,

/** The report action which we are displaying */
action: PropTypes.shape(ReportActionPropTypes).isRequired,
action: PropTypes.shape(reportActionPropTypes).isRequired,

/** Can this transaction be rejected? */
canBeRejected: PropTypes.bool,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tooltip/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {Animated, View} from 'react-native';
import TooltipRenderedOnPageBody from './TooltipRenderedOnPageBody';
import Hoverable from '../Hoverable';
import withWindowDimensions from '../withWindowDimensions';
import {propTypes, defaultProps} from './TooltipPropTypes';
import {propTypes, defaultProps} from './tooltipPropTypes';
import TooltipSense from './TooltipSense';

class Tooltip extends PureComponent {
Expand Down
2 changes: 1 addition & 1 deletion src/components/UpdateAppModal/BaseUpdateAppModal.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {PureComponent} from 'react';
import {propTypes, defaultProps} from './UpdateAppModalPropTypes';
import {propTypes, defaultProps} from './updateAppModalPropTypes';
import ConfirmModal from '../ConfirmModal';
import withLocalize from '../withLocalize';

Expand Down
2 changes: 1 addition & 1 deletion src/components/UpdateAppModal/index.desktop.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import {ipcRenderer} from 'electron';
import BaseUpdateAppModal from './BaseUpdateAppModal';
import {propTypes} from './UpdateAppModalPropTypes';
import {propTypes} from './updateAppModalPropTypes';

const UpdateAppModal = (props) => {
const updateApp = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/UpdateAppModal/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import BaseUpdateAppModal from './BaseUpdateAppModal';
import {propTypes} from './UpdateAppModalPropTypes';
import {propTypes} from './updateAppModalPropTypes';

const UpdateAppModal = props => (
<BaseUpdateAppModal
Expand Down
4 changes: 2 additions & 2 deletions src/pages/home/ReportScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import KeyboardSpacer from '../../components/KeyboardSpacer';
import SwipeableView from '../../components/SwipeableView';
import CONST from '../../CONST';
import FullScreenLoadingIndicator from '../../components/FullscreenLoadingIndicator';
import ReportActionPropTypes from './report/ReportActionPropTypes';
import reportActionPropTypes from './report/reportActionPropTypes';

const propTypes = {
/** Navigation route context info provided by react navigation */
Expand Down Expand Up @@ -55,7 +55,7 @@ const propTypes = {
}),

/** Array of report actions for this report */
reportActions: PropTypes.objectOf(PropTypes.shape(ReportActionPropTypes)),
reportActions: PropTypes.objectOf(PropTypes.shape(reportActionPropTypes)),

/** Beta features list */
betas: PropTypes.arrayOf(PropTypes.string),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import PropTypes from 'prop-types';
import getReportActionContextMenuStyles from '../../../../styles/getReportActionContextMenuStyles';
import ContextMenuItem from '../../../../components/ContextMenuItem';
import {
propTypes as GenericReportActionContextMenuPropTypes,
propTypes as genericReportActionContextMenuPropTypes,
defaultProps as GenericReportActionContextMenuDefaultProps,
} from './GenericReportActionContextMenuPropTypes';
} from './genericReportActionContextMenuPropTypes';
import withLocalize, {withLocalizePropTypes} from '../../../../components/withLocalize';
import ContextMenuActions, {CONTEXT_MENU_TYPES} from './ContextMenuActions';

const propTypes = {
/** String representing the context menu type [LINK, REPORT_ACTION] which controls context menu choices */
type: PropTypes.string,
...GenericReportActionContextMenuPropTypes,
...genericReportActionContextMenuPropTypes,
...withLocalizePropTypes,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import React from 'react';
import {View} from 'react-native';
import PropTypes from 'prop-types';
import {
propTypes as GenericReportActionContextMenuPropTypes,
propTypes as genericReportActionContextMenuPropTypes,
defaultProps as GenericReportActionContextMenuDefaultProps,
} from '../GenericReportActionContextMenuPropTypes';
} from '../genericReportActionContextMenuPropTypes';
import {getMiniReportActionContextMenuWrapperStyle} from '../../../../../styles/getReportActionItemStyles';
import BaseReportActionContextMenu from '../BaseReportActionContextMenu';

const propTypes = {
..._.omit(GenericReportActionContextMenuPropTypes, ['isMini']),
..._.omit(genericReportActionContextMenuPropTypes, ['isMini']),

/** Should the reportAction this menu is attached to have the appearance of being
* grouped with the previous reportAction? */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import PropTypes from 'prop-types';
import ReportActionPropTypes from '../ReportActionPropTypes';
import reportActionPropTypes from '../reportActionPropTypes';

const propTypes = {
/** The ID of the report this report action is attached to. */
reportID: PropTypes.number.isRequired,

/** The report action this context menu is attached to. */
reportAction: PropTypes.shape(ReportActionPropTypes).isRequired,
reportAction: PropTypes.shape(reportActionPropTypes).isRequired,

/** If true, this component will be a small, row-oriented menu that displays icons but not text.
If false, this component will be a larger, column-oriented menu that displays icons alongside text in each row. */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import {View, Animated} from 'react-native';
import styles from '../../../../../styles/styles';
import propTypes from './MarkerBadgeContainerPropTypes';
import propTypes from './markerBadgeContainerPropTypes';

const MarkerBadgeContainer = props => (
<Animated.View style={[styles.reportMarkerBadgeWrapperAndroid, ...props.containerStyles]}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import {Animated} from 'react-native';
import styles from '../../../../../styles/styles';
import propTypes from './MarkerBadgeContainerPropTypes';
import propTypes from './markerBadgeContainerPropTypes';

const MarkerBadgeContainer = props => (
<Animated.View style={[styles.reportMarkerBadgeWrapper, ...props.containerStyles]}>
Expand Down
4 changes: 2 additions & 2 deletions src/pages/home/report/ReportActionCompose.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import Permissions from '../../../libs/Permissions';
import Navigation from '../../../libs/Navigation/Navigation';
import ROUTES from '../../../ROUTES';
import * as User from '../../../libs/actions/User';
import ReportActionPropTypes from './ReportActionPropTypes';
import reportActionPropTypes from './reportActionPropTypes';
import {canEditReportAction, hasExpensifyEmails, isArchivedRoom} from '../../../libs/reportUtils';
import ReportActionComposeFocusManager from '../../../libs/ReportActionComposeFocusManager';
import Text from '../../../components/Text';
Expand Down Expand Up @@ -95,7 +95,7 @@ const propTypes = {
}),

/** Array of report actions for this report */
reportActions: PropTypes.objectOf(PropTypes.shape(ReportActionPropTypes)),
reportActions: PropTypes.objectOf(PropTypes.shape(reportActionPropTypes)),

/** Is the report view covered by the drawer */
isDrawerOpen: PropTypes.bool.isRequired,
Expand Down
Loading