From fca8b79c231b001aca4300846c621c564c15cbb7 Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Thu, 21 May 2020 11:31:45 -0400 Subject: [PATCH] MM-22155 Re-enable comma-dangle rule (#5535) * MM-22155 Re-enable comma-dangle rule * Re-enable comma-dangle for TS files --- .eslintrc.json | 2 - actions/channel_actions.test.js | 6 +- actions/emoji_actions.mock.test.js | 4 +- actions/global_actions.jsx | 2 +- actions/invite_actions.test.js | 20 +- actions/notification_actions.jsx | 2 +- actions/post_actions.jsx | 2 +- actions/post_actions.test.js | 8 +- actions/status_actions.jsx | 2 +- actions/storage.test.js | 8 +- actions/user_actions.jsx | 10 +- actions/views/channel.test.js | 2 +- actions/views/channel_sidebar.test.ts | 4 +- actions/views/create_comment.test.jsx | 14 +- actions/views/rhs.test.js | 2 +- actions/websocket_actions.jsx | 12 +- actions/websocket_actions.test.jsx | 6 +- babel.config.js | 2 +- client/websocket_client.jsx | 2 +- .../about_build_modal.test.jsx | 4 +- .../access_history_modal.test.tsx | 8 +- .../activity_log_modal/activity_log_modal.jsx | 2 +- .../activity_log_modal.test.jsx | 10 +- .../components/activity_log.test.jsx | 10 +- .../components/more_info.test.tsx | 4 +- .../add_groups_to_channel_modal.jsx | 2 +- .../add_groups_to_channel_modal.test.jsx | 18 +- .../add_groups_to_team_modal.jsx | 2 +- .../add_groups_to_team_modal.test.jsx | 18 +- .../add_user_to_channel_modal.test.jsx | 26 +-- .../add_users_to_team_modal.test.tsx | 8 +- .../admin_console/admin_console.test.tsx | 4 +- components/admin_console/admin_definition.jsx | 36 ++-- .../admin_console/admin_definition.test.jsx | 2 +- .../admin_navbar_dropdown.tsx | 2 +- .../menu_item_blockable_link.test.tsx | 2 +- .../admin_sidebar/admin_sidebar.jsx | 2 +- components/admin_console/audits/audits.tsx | 10 +- components/admin_console/audits/index.ts | 6 +- .../admin_console/bleve_settings.test.jsx | 8 +- .../admin_console/blockable_link/index.ts | 6 +- .../brand_image_setting.jsx | 6 +- .../brand_image_setting.test.jsx | 2 +- .../upload_button.test.jsx | 4 +- .../admin_console/cluster_table_container.jsx | 2 +- .../admin_console/color_setting.test.tsx | 8 +- .../compliance_reports/compliance_reports.jsx | 6 +- .../admin_console/compliance_reports/index.js | 2 +- ...le_disable_guest_accounts_setting.test.tsx | 10 +- .../custom_plugin_settings.test.jsx | 6 +- .../custom_plugin_settings/index.js | 2 +- .../custom_terms_of_service_settings.test.jsx | 2 +- .../custom_url_schemes_setting.jsx | 2 +- .../custom_url_schemes_setting.test.jsx | 20 +- .../data_grid/data_grid.test.tsx | 6 +- .../admin_console/data_retention_settings.jsx | 8 +- components/admin_console/dropdown_setting.jsx | 2 +- .../admin_console/elasticsearch_settings.jsx | 2 +- .../elasticsearch_settings.test.jsx | 12 +- .../feature_discovery.test.tsx | 2 +- .../group_details/group_details.jsx | 4 +- .../group_details/group_details.test.jsx | 6 +- .../group_teams_and_channels.test.jsx | 10 +- .../group_teams_and_channels_row.test.jsx | 10 +- .../group_details/group_users.test.jsx | 12 +- .../group_details/group_users_row.test.jsx | 2 +- .../group_settings/group_details/index.jsx | 2 +- .../group_settings/group_row.test.jsx | 18 +- .../group_settings/group_settings.test.jsx | 2 +- .../groups_list/groups_list.test.tsx | 44 ++--- .../group_settings/groups_list/index.ts | 2 +- components/admin_console/jobs/table.jsx | 4 +- components/admin_console/jobs/table.test.jsx | 4 +- .../manage_roles_modal/manage_roles_modal.tsx | 2 +- .../manage_teams_dropdown.test.jsx | 8 +- .../manage_teams_modal.test.jsx | 6 +- .../remove_from_team_button.test.jsx | 4 +- .../admin_console/message_export_settings.jsx | 4 +- .../message_export_settings.test.jsx | 8 +- .../guest_permissions_tree.test.jsx | 16 +- .../permission_checkbox.test.jsx | 10 +- .../permission_group.test.jsx | 42 ++--- .../permission_row.test.jsx | 12 +- .../permission_schemes_settings.jsx | 2 +- .../permission_schemes_settings.test.jsx | 12 +- ...permission_system_scheme_settings.test.jsx | 20 +- .../permission_team_scheme_settings.jsx | 8 +- .../permission_team_scheme_settings.test.jsx | 20 +- .../team_in_list/team_in_list.test.jsx | 6 +- .../permissions_scheme_summary.test.jsx | 8 +- .../permissions_tree.test.jsx | 16 +- .../plugin_management/plugin_management.jsx | 6 +- .../admin_console/radio_setting.test.tsx | 4 +- components/admin_console/radio_setting.tsx | 2 +- .../request_button/request_button.jsx | 2 +- .../request_button/request_button.test.jsx | 14 +- .../reset_email_modal/reset_email_modal.jsx | 2 +- .../reset_password_modal.test.tsx | 6 +- .../schema_admin_settings.test.jsx | 6 +- .../admin_console/server_logs/log_list.jsx | 2 +- components/admin_console/server_logs/logs.jsx | 6 +- .../system_user_detail/system_user_detail.jsx | 2 +- .../team_list/abstract_list.test.tsx | 6 +- .../team_list/team_list.test.tsx | 2 +- .../system_users/list/system_users_list.jsx | 10 +- .../list/system_users_list.test.jsx | 10 +- .../team_channel_settings/abstract_list.jsx | 2 +- .../channel/channel_settings.test.jsx | 2 +- .../channel/details/channel_details.test.tsx | 4 +- .../channel/details/channel_details.tsx | 44 ++--- .../channel/details/channel_groups.test.tsx | 2 +- .../channel_members/channel_members.test.tsx | 6 +- .../channel_members/channel_members.tsx | 2 +- .../details/channel_moderation.test.tsx | 52 ++--- .../channel/details/channel_moderation.tsx | 80 ++++---- .../channel/details/channel_modes.test.tsx | 2 +- .../channel/details/channel_profile.test.tsx | 2 +- .../channel/details/index.js | 2 +- .../channel/list/channel_row.test.tsx | 2 +- .../channel/list/index.ts | 2 +- .../group/group_row.test.tsx | 2 +- .../group/group_users.test.tsx | 4 +- .../group/group_users.tsx | 4 +- .../group/group_users_row.test.tsx | 4 +- .../group/group_users_row.tsx | 2 +- .../team/details/team_details.test.jsx | 2 +- .../team/details/team_groups.test.jsx | 2 +- .../team_members/team_members.test.tsx | 6 +- .../details/team_members/team_members.tsx | 2 +- .../team/details/team_modes.test.jsx | 2 +- .../team/details/team_profile.test.jsx | 2 +- .../team_channel_settings/team/list/index.js | 2 +- .../team/list/team_row.test.jsx | 2 +- .../team/team_settings.test.jsx | 2 +- .../admin_console/text_setting.test.tsx | 2 +- .../user_grid/user_grid.test.tsx | 8 +- .../user_grid/user_grid_role_dropdown.tsx | 4 +- components/analytics/doughnut_chart.test.tsx | 10 +- components/analytics/format.test.tsx | 2 +- components/analytics/line_chart.test.tsx | 6 +- components/analytics/statistic_count.test.tsx | 6 +- components/analytics/table_chart.test.jsx | 4 +- .../announcement_bar.test.jsx | 12 +- .../default_announcement_bar/index.js | 2 +- .../announcement_bar/text_dismissable_bar.jsx | 2 +- .../text_dismissable_bar.test.jsx | 10 +- .../version_bar/version_bar.test.jsx | 2 +- components/at_mention/at_mention.test.jsx | 32 ++-- components/audio_video_preview.test.jsx | 4 +- components/audit_table/audit_table.test.jsx | 4 +- components/authorize/authorize.jsx | 2 +- components/autocomplete_selector.test.jsx | 6 +- components/autosize_textarea.test.jsx | 2 +- components/autosize_textarea.tsx | 2 +- .../backstage/components/backstage_header.jsx | 2 +- .../components/backstage_header.test.jsx | 4 +- .../components/backstage_sidebar.test.jsx | 16 +- .../change_url_modal.test.tsx | 22 +-- .../channel_groups_manage_modal/index.ts | 6 +- components/channel_header/channel_header.js | 4 +- .../channel_header/channel_header.test.jsx | 28 +-- .../components/header_icon_wrapper.test.js | 12 +- components/channel_header/index.js | 2 +- components/channel_header_dropdown/index.js | 2 +- .../toggle_mute_channel.test.js | 6 +- .../channel_header_mobile.test.js | 6 +- .../channel_info_button.test.js | 4 +- .../channel_info_modal.test.jsx | 6 +- .../channel_invite_modal.jsx | 2 +- .../channel_invite_modal.test.jsx | 20 +- .../center_channel/center_channel.test.tsx | 14 +- .../center_channel/center_channel.tsx | 4 +- .../channel_identifier_router.test.jsx | 2 +- .../channel_identifier_router/index.js | 2 +- .../channel_members_dropdown.test.jsx | 16 +- components/channel_members_dropdown/index.js | 2 +- .../channel_members_modal.test.tsx | 18 +- .../channel_notifications_modal.test.jsx | 32 ++-- .../components/collapse_view.test.jsx | 6 +- .../components/describe.test.jsx | 10 +- .../components/expand_view.test.jsx | 6 +- .../components/extra_info.test.jsx | 6 +- .../components/notification_section.test.jsx | 20 +- .../components/section_title.test.jsx | 6 +- components/channel_select/channel_select.jsx | 6 +- components/channel_select/index.js | 2 +- .../channel_selector_modal.jsx | 2 +- components/channel_view/channel_view.jsx | 2 +- components/channel_view/channel_view.test.jsx | 4 +- components/channel_view/index.js | 2 +- components/claim/components/email_to_ldap.jsx | 2 +- .../claim/components/email_to_oauth.jsx | 2 +- .../claim/components/oauth_to_email.jsx | 2 +- components/color_input.test.tsx | 12 +- components/common/back_button.tsx | 2 +- .../common/site_name_and_description.tsx | 2 +- .../copy_url_context_menu.test.jsx | 4 +- components/create_comment/create_comment.jsx | 2 +- .../create_comment/create_comment.test.jsx | 132 ++++++------- components/create_comment/index.js | 4 +- components/create_post/create_post.jsx | 4 +- components/create_post/create_post.test.jsx | 44 ++--- components/create_post/index.js | 2 +- .../components/display_name.test.jsx | 4 +- .../components/team_url/team_url.test.jsx | 8 +- components/create_team/create_team.test.tsx | 12 +- components/create_team/create_team.tsx | 2 +- .../delete_channel_modal.test.tsx | 12 +- components/delete_channel_modal/index.ts | 4 +- components/delete_modal_trigger.test.jsx | 18 +- .../delete_post_modal.test.jsx | 32 ++-- .../do_verify_email/do_verify_email.test.tsx | 8 +- components/dot_menu/dot_menu.test.jsx | 18 +- components/dot_menu/dot_menu_empty.test.jsx | 2 +- components/dot_menu/dot_menu_mobile.test.jsx | 2 +- .../edit_channel_header_modal.test.jsx | 24 +-- .../edit_channel_purpose_modal.jsx | 2 +- .../edit_channel_purpose_modal.test.jsx | 26 +-- components/emoji/add_emoji/add_emoji.test.js | 8 +- components/emoji/emoji_list/emoji_list.jsx | 8 +- .../components/emoji_picker_header.test.jsx | 4 +- components/emoji_picker/emoji_picker.jsx | 2 +- components/emoji_picker/emoji_picker.test.jsx | 8 +- components/emoji_picker/emoji_picker_tabs.jsx | 2 +- components/error_page/error_link.test.tsx | 2 +- components/error_page/error_message.test.tsx | 22 +-- components/error_page/error_title.test.tsx | 20 +- .../favicon_title_handler.test.jsx | 4 +- .../file_thumbnail/file_thumbnail.test.tsx | 10 +- .../file_attachment/filename_overlay.test.tsx | 8 +- .../file_attachment_list.jsx | 4 +- .../file_attachment_list.test.jsx | 14 +- .../file_info_preview.test.tsx | 4 +- components/file_preview/file_preview.test.tsx | 14 +- components/file_preview/file_preview.tsx | 4 +- .../file_progress_preview.test.tsx | 4 +- components/file_upload/file_upload.test.jsx | 32 ++-- components/file_upload_overlay.test.tsx | 6 +- components/formatted_markdown_message.jsx | 2 +- .../formatted_markdown_message.test.jsx | 2 +- components/get_link_modal.test.tsx | 8 +- .../get_public_link_modal.test.jsx | 12 +- .../gif_picker/components/App/index.jsx | 4 +- .../gif_picker/components/Header/index.jsx | 2 +- .../gif_picker/components/SearchBar/index.jsx | 2 +- components/gif_picker/gif_picker.jsx | 4 +- .../header_footer_template.jsx | 8 +- .../header_footer_template.test.jsx | 16 +- .../integrations/abstract_command.test.jsx | 16 +- .../abstract_incoming_hook.test.jsx | 2 +- .../integrations/abstract_oauth_app.test.jsx | 26 +-- .../add_command/add_command.test.jsx | 2 +- .../add_oauth_app/add_oauth_app.test.jsx | 2 +- .../add_outgoing_webhook.test.jsx | 2 +- .../integrations/bots/add_bot/add_bot.jsx | 2 +- .../bots/add_bot/add_bot.test.jsx | 18 +- components/integrations/bots/bot.jsx | 6 +- components/integrations/bots/bot.test.jsx | 40 ++-- components/integrations/bots/bots.jsx | 4 +- components/integrations/bots/bots.test.jsx | 12 +- .../commands_container/commands_container.jsx | 2 +- .../confirm_integration.jsx | 6 +- .../confirm_integration.test.jsx | 14 +- .../edit_command/edit_command.jsx | 2 +- .../edit_command/edit_command.test.jsx | 16 +- .../edit_oauth_app/edit_oauth_app.test.jsx | 22 +-- .../edit_outgoing_webhook.test.jsx | 18 +- .../installed_incoming_webhook.test.jsx | 14 +- .../installed_incoming_webhooks.jsx | 4 +- .../installed_oauth_app.jsx | 2 +- .../installed_oauth_app.test.jsx | 20 +- .../installed_oauth_apps.jsx | 2 +- .../installed_oauth_apps.test.jsx | 6 +- .../installed_outgoing_webhook.test.jsx | 20 +- .../installed_outgoing_webhooks.jsx | 4 +- .../installed_outgoing_webhooks.test.jsx | 6 +- components/integrations/integrations.jsx | 10 +- .../dialog_element/dialog_element.jsx | 2 +- .../dialog_element/dialog_element.test.jsx | 30 +-- .../dialog_introduction_text.jsx | 6 +- .../dialog_introduction_text.test.jsx | 4 +- components/interactive_dialog/index.js | 6 +- .../interactive_dialog/interactive_dialog.jsx | 20 +- .../interactive_dialog.test.jsx | 10 +- .../invitation_modal.test.jsx | 12 +- .../invitation_modal_confirm_step.test.jsx | 10 +- ...invitation_modal_confirm_step_row.test.jsx | 8 +- ...vitation_modal_confirm_step_table.test.jsx | 2 +- .../invitation_modal_guests_step.test.jsx | 4 +- .../invitation_modal_initial_step.test.jsx | 4 +- .../invitation_modal_members_step.test.jsx | 6 +- components/latex_block/latex_block.jsx | 2 +- .../leave_private_channel_modal.test.tsx | 14 +- .../leave_private_channel_modal.tsx | 4 +- components/legacy_sidebar/index.js | 4 +- components/legacy_sidebar/sidebar.jsx | 2 +- components/legacy_sidebar/sidebar.test.jsx | 30 +-- .../sidebar_channel/sidebar_channel.jsx | 2 +- .../sidebar_channel/sidebar_channel.test.jsx | 4 +- .../sidebar_channel_button_or_link.test.jsx | 12 +- ...annel_button_or_link_close_button.test.jsx | 14 +- ...debar_channel_button_or_link_icon.test.jsx | 14 +- .../legacy_sidebar/sidebar_tutorial_tip.jsx | 8 +- .../sidebar_tutorial_tip.test.jsx | 6 +- .../legacy_team_sidebar_controller.jsx | 8 +- components/link_tooltip/link_tooltip.test.tsx | 2 +- components/link_tooltip/link_tooltip.tsx | 2 +- components/list_modal.test.jsx | 12 +- components/loading_image_preview.test.tsx | 2 +- .../local_date_time/local_date_time.test.tsx | 12 +- .../localized_input/localized_input.test.tsx | 4 +- components/logged_in/logged_in.jsx | 4 +- components/logged_in/logged_in.test.jsx | 14 +- .../login_controller/login_controller.jsx | 22 +-- .../login_controller.test.jsx | 12 +- components/login/login_mfa.jsx | 2 +- components/login/login_mfa.test.jsx | 6 +- components/markdown/index.ts | 4 +- components/markdown/markdown.test.tsx | 4 +- components/markdown_image.test.jsx | 36 ++-- components/member_list_channel/index.ts | 2 +- .../member_list_channel.tsx | 2 +- .../member_list_team/member_list_team.tsx | 10 +- components/message_submit_error.test.tsx | 4 +- .../modal_controller.test.jsx | 4 +- components/more_channels/index.js | 4 +- components/more_channels/more_channels.jsx | 2 +- .../more_channels/more_channels.test.jsx | 24 +-- .../group_message_option.test.jsx | 2 +- .../more_direct_channels.tsx | 2 +- components/multiselect/multiselect.test.tsx | 6 +- components/multiselect/multiselect.tsx | 2 +- components/needs_team/needs_team.test.tsx | 8 +- components/needs_team/needs_team.tsx | 6 +- .../new_channel_flow.test.tsx | 32 ++-- .../new_channel_modal.test.jsx | 22 +-- .../no_results_indicator.tsx | 6 +- components/overlay_trigger.test.tsx | 8 +- components/overlay_trigger.tsx | 2 +- .../password_reset_form.js | 2 +- .../password_reset_send_link.test.js | 2 +- components/pdf_preview.jsx | 6 +- components/pdf_preview.test.jsx | 8 +- .../permalink_redirector.test.jsx | 6 +- .../permalink_view/permalink_view.test.jsx | 16 +- .../any_team_permission_gate.test.jsx | 16 +- .../channel_permission_gate.test.jsx | 20 +- .../system_permission_gate.test.jsx | 10 +- .../team_permission_gate.test.tsx | 14 +- .../marketplace_item/marketplace_item.js | 10 +- .../marketplace_item/marketplace_item.test.js | 64 +++---- .../marketplace_list/marketplace_list.jsx | 4 +- .../marketplace_list.test.jsx | 6 +- .../navigation_row/navigation_row.test.jsx | 8 +- .../marketplace_modal.test.js | 18 +- components/popover_list_members/index.js | 2 +- .../popover_list_members.jsx | 2 +- .../popover_list_members.test.jsx | 10 +- components/post_deleted_modal.test.tsx | 8 +- components/post_markdown/index.js | 2 +- components/post_markdown/index.test.js | 8 +- .../post_markdown/post_markdown.test.jsx | 16 +- .../combined_system_message.test.jsx | 12 +- .../combined_system_message/last_users.jsx | 6 +- .../last_users.test.jsx | 6 +- .../commented_on_files_message.test.jsx | 6 +- .../date_separator/date_separator.test.jsx | 6 +- .../action_button/action_button.jsx | 2 +- .../message_attachment/message_attachment.jsx | 16 +- .../message_attachment_list.jsx | 2 +- .../new_message_separator.test.jsx | 2 +- .../post_add_channel_member.test.jsx | 4 +- components/post_view/post_body/post_body.jsx | 2 +- components/post_view/post_info/index.js | 2 +- components/post_view/post_info/post_info.jsx | 8 +- .../post_view/post_info/post_info.test.jsx | 2 +- .../post_view/post_list/post_list.test.jsx | 22 +-- components/post_view/post_list_row/index.js | 2 +- .../post_view/post_list_row/post_list_row.jsx | 4 +- .../post_list_row/post_list_row.test.jsx | 14 +- .../post_list_virtualized.jsx | 4 +- .../post_view/post_message_view/index.js | 2 +- .../post_view/reaction/reaction.test.jsx | 6 +- .../reaction_list/reactions_list.test.jsx | 4 +- .../post_view/show_more/show_more.test.jsx | 6 +- components/profile_picture.test.tsx | 10 +- components/profile_popover/index.js | 2 +- .../profile_popover/profile_popover.test.jsx | 10 +- components/quick_input.jsx | 2 +- components/quick_input.test.jsx | 10 +- .../quick_switch_modal.test.jsx | 12 +- components/recent_date.tsx | 2 +- .../removed_from_channel_modal.test.tsx | 8 +- components/rename_channel_modal/index.js | 2 +- .../rename_channel_modal.test.jsx | 28 +-- .../reset_status_modal/reset_status_modal.jsx | 2 +- .../reset_status_modal.test.jsx | 14 +- components/rhs_comment/index.js | 2 +- components/rhs_comment/rhs_comment.jsx | 4 +- components/rhs_comment/rhs_comment.test.jsx | 22 +-- .../rhs_header_post/rhs_header_post.jsx | 2 +- components/rhs_root_post/index.js | 2 +- components/rhs_root_post/rhs_root_post.jsx | 2 +- .../rhs_root_post/rhs_root_post.test.jsx | 20 +- components/rhs_thread/rhs_thread.test.tsx | 6 +- components/rhs_thread/rhs_thread.tsx | 2 +- components/root/root.jsx | 4 +- components/save_button.test.tsx | 6 +- components/search_bar/search_bar.test.jsx | 8 +- .../search_hint/data_retention_hint.test.jsx | 2 +- .../flag_post_search_hint.test.jsx | 4 +- .../no_result_search_hint.test.jsx | 4 +- .../search_hint/pin_post_search_hint.test.jsx | 4 +- components/search_hint/search_hint.test.tsx | 4 +- .../search_results_item.test.jsx | 16 +- components/searchable_channel_list.jsx | 2 +- components/searchable_channel_list.test.jsx | 4 +- components/setting_item_max.test.jsx | 20 +- .../setting_item_min.test.tsx | 8 +- components/setting_picture.test.jsx | 28 +-- components/shortcuts_modal.jsx | 2 +- components/shortcuts_modal.test.jsx | 4 +- .../channel_filter/channel_filter.test.tsx | 8 +- components/sidebar/sidebar.test.tsx | 8 +- .../sidebar_category.test.tsx | 12 +- .../sidebar_category_list.test.tsx | 12 +- .../sidebar_category_list.tsx | 2 +- .../sidebar_base_channel.test.tsx | 6 +- .../sidebar_channel/sidebar_channel.test.tsx | 20 +- .../sidebar_channel_link.test.tsx | 12 +- .../sidebar_direct_channel.test.tsx | 8 +- .../signup_controller/signup_controller.jsx | 12 +- .../signup_controller.test.jsx | 8 +- .../signup/signup_email/signup_email.test.jsx | 6 +- .../single_image_view/single_image_view.jsx | 2 +- .../single_image_view.test.jsx | 14 +- components/size_aware_image.test.jsx | 2 +- components/spinner_button.test.tsx | 8 +- .../at_mention_provider.jsx | 2 +- components/suggestion/command_provider.jsx | 8 +- .../suggestion/command_provider.test.js | 2 +- .../suggestion/generic_channel_provider.jsx | 2 +- .../search_suggestion_list.test.jsx | 2 +- components/suggestion/suggestion_box.test.jsx | 14 +- components/suggestion/suggestion_list.jsx | 4 +- .../suggestion/suggestion_list.test.jsx | 2 +- .../suggestion/switch_channel_provider.jsx | 4 +- .../switch_channel_provider.test.jsx | 6 +- components/system_notice/index.js | 2 +- .../team_general_tab/team_general_tab.jsx | 8 +- .../team_general_tab.test.jsx | 2 +- .../team_members_dropdown.test.jsx | 8 +- .../team_members_modal.test.tsx | 8 +- .../team_selector_modal.jsx | 2 +- .../team_settings_modal.test.jsx | 2 +- components/terms_of_service/index.js | 2 +- .../terms_of_service/terms_of_service.jsx | 4 +- components/textbox.test.jsx | 6 +- components/toast_wrapper/index.jsx | 2 +- components/toast_wrapper/toast_wrapper.jsx | 4 +- .../toast_wrapper/toast_wrapper.test.jsx | 18 +- .../toggle_modal_button_redux.test.jsx | 2 +- components/tutorial/menu_tutorial_tip.jsx | 2 +- .../tutorial_intro_screens.jsx | 2 +- .../tutorial_tip/tutorial_tip.test.tsx | 12 +- .../tutorial/tutorial_tip/tutorial_tip.tsx | 4 +- .../unarchive_channel_modal.test.jsx | 8 +- components/unread_channel_indicator.test.tsx | 10 +- components/user_profile/user_profile.test.jsx | 4 +- .../advanced/join_leave_section/index.js | 2 +- .../join_leave_section.test.jsx | 8 +- .../advanced/user_settings_advanced.jsx | 4 +- .../manage_languages/manage_languages.jsx | 2 +- .../manage_timezones/manage_timezones.jsx | 2 +- .../display/user_settings_display.jsx | 2 +- .../color_chooser.test.jsx | 2 +- .../custom_theme_chooser.test.jsx | 4 +- .../premade_theme_chooser.jsx | 2 +- .../user_settings_theme.jsx | 8 +- .../user_settings_theme.test.jsx | 6 +- .../general/user_settings_general.jsx | 28 +-- .../general/user_settings_general.test.js | 10 +- .../modal/user_settings_modal.tsx | 4 +- .../desktop_notification_settings.jsx | 2 +- .../desktop_notification_settings.test.jsx | 14 +- .../manage_auto_responder.test.jsx | 4 +- .../user_settings_notifications.jsx | 18 +- .../security/mfa_section/mfa_section.test.tsx | 8 +- .../user_access_token_section.jsx | 4 +- .../security/user_settings_security.jsx | 22 +-- components/user_settings/sidebar/index.ts | 4 +- .../sidebar/user_settings_sidebar.tsx | 24 +-- components/view_image/image_preview.test.jsx | 12 +- .../popover_bar/popover_bar.test.jsx | 4 +- components/view_image/view_image.jsx | 2 +- .../admin_console/admin_console.stories.js | 12 +- .../admin_console/admin_header.test.tsx | 2 +- .../admin_console/admin_panel.test.tsx | 6 +- .../admin_panel_togglable.test.tsx | 4 +- .../admin_panel_with_button.test.tsx | 8 +- .../admin_panel_with_link.test.tsx | 8 +- .../formatted_admin_header.test.tsx | 8 +- components/widgets/badges/badge.test.tsx | 4 +- components/widgets/badges/badges.stories.js | 2 +- components/widgets/badges/bot_badge.test.tsx | 2 +- .../widgets/badges/guest_badge.test.tsx | 2 +- .../widgets/inputs/channels_input.test.jsx | 2 +- components/widgets/inputs/inputs.stories.js | 4 +- .../inputs/users_emails_input.test.jsx | 2 +- components/widgets/loading/loading.stories.js | 2 +- .../widgets/loading/loading_wrapper.test.tsx | 2 +- components/widgets/menu/menu.stories.tsx | 6 +- components/widgets/menu/menu.test.tsx | 6 +- .../menu/menu_items/menu_item.test.tsx | 6 +- .../menu/menu_items/menu_item_action.test.tsx | 4 +- .../menu_item_external_link.test.tsx | 2 +- .../menu/menu_items/menu_item_link.test.tsx | 2 +- .../menu_item_toggle_modal_redux.test.tsx | 4 +- .../menu/menu_items/submenu_item.test.tsx | 6 +- .../submenu_modal/submenu_modal.test.tsx | 8 +- components/widgets/menu/menu_wrapper.test.tsx | 10 +- .../widgets/modals/full_screen_modal.test.tsx | 12 +- components/widgets/popover/index.tsx | 2 +- components/widgets/popover/popover.test.tsx | 2 +- .../widgets/separator/separator.stories.js | 6 +- .../widgets/separator/separator.test.tsx | 2 +- .../widgets/settings/bool_setting.test.tsx | 4 +- .../widgets/settings/radio_setting.test.tsx | 4 +- .../widgets/settings/text_setting.test.tsx | 6 +- .../widgets/team_icon/team_icon.stories.js | 4 +- .../widgets/team_icon/team_icon.test.tsx | 8 +- components/widgets/users/avatar.test.tsx | 4 +- components/widgets/users/users.stories.tsx | 2 +- .../Ignore-X-Frame-headers/background.js | 4 +- .../theme/custom_theme_color_picker_spec.js | 6 +- .../channel/channel_name_tooltips_spec.js | 6 +- ...dates_manage_channel_members_modal_spec.js | 4 +- .../react_to_last_message_shortcut_spec.js | 10 +- .../helpers/index.js | 2 +- .../enterprise/ldap/ldap_login_spec.js | 6 +- .../enterprise/saml/okta_login_spec.js | 6 +- .../system_console/channel_moderation_spec.js | 14 +- .../system_scheme_permission_spec.js | 4 +- .../team_scheme_permission_spec.js | 4 +- .../slack_parsing_message_button_spec.js | 2 +- .../messaging/local_date_time_spec.js | 6 +- .../multi_team_and_dm/system_message_spec.js | 2 +- e2e/cypress/plugins/okta_request.js | 2 +- e2e/cypress/support/api_commands.js | 4 +- e2e/cypress/support/okta_commands.js | 26 +-- e2e/cypress/support/saml_commands.js | 2 +- e2e/run_tests.js | 2 +- e2e/utils/report.js | 4 +- e2e/utils/save_artifacts.js | 10 +- e2e/utils/webhook_utils.js | 4 +- .../channel_header_plug.test.jsx | 6 +- .../mobile_channel_header_plug.test.jsx | 14 +- plugins/pluggable/pluggable.test.jsx | 10 +- plugins/rhs_plugin/rhs_plugin.jsx | 2 +- plugins/test/main_menu_action.test.jsx | 2 +- plugins/test/post_type.test.jsx | 4 +- reducers/storage.test.js | 48 ++--- reducers/views/announcement_bar.js | 4 +- reducers/views/browser.test.js | 6 +- reducers/views/emoji.js | 2 +- reducers/views/lhs.test.js | 12 +- reducers/views/modals.test.jsx | 6 +- reducers/views/rhs.test.js | 42 ++--- reducers/views/search.test.js | 4 +- reducers/views/textbox.test.js | 10 +- selectors/admin_console.jsx | 2 +- selectors/emojis.js | 4 +- selectors/posts.js | 4 +- selectors/rhs.ts | 2 +- selectors/views/channel_selector_modal.js | 2 +- selectors/views/channel_sidebar.ts | 4 +- store/index.js | 2 +- tests/helpers/client-test-helper.jsx | 10 +- utils/channel_utils.jsx | 4 +- utils/constants.jsx | 4 +- utils/emoji.test.jsx | 6 +- utils/emoticons.tsx | 6 +- utils/file_utils.test.jsx | 4 +- utils/markdown/index.ts | 2 +- utils/markdown/renderer.tsx | 16 +- utils/position_utils.tsx | 2 +- utils/post_utils.jsx | 6 +- utils/test_helper.ts | 6 +- utils/text_formatting.test.jsx | 8 +- utils/text_formatting.tsx | 42 ++--- utils/text_formatting_at_mentions.test.jsx | 38 ++-- utils/text_formatting_channel_links.test.jsx | 32 ++-- utils/text_formatting_hashtags.test.jsx | 70 +++---- utils/text_formatting_imgs.test.jsx | 12 +- utils/text_formatting_links.test.jsx | 178 +++++++++--------- utils/utils.jsx | 2 +- utils/utils.test.jsx | 2 +- webpack.config.js | 2 +- 598 files changed, 2536 insertions(+), 2538 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 5352f2bd6838..e00d56cbbf93 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -21,7 +21,6 @@ }, "rules": { "import/no-unresolved": 2, - "comma-dangle": 0, "import/order": [ "error", { @@ -70,7 +69,6 @@ "plugin:@typescript-eslint/recommended" ], "rules": { - "comma-dangle": 0, "@typescript-eslint/no-non-null-assertion": 0, "@typescript-eslint/no-var-requires": 0, "@typescript-eslint/no-empty-function": 0, diff --git a/actions/channel_actions.test.js b/actions/channel_actions.test.js index 3303a59ebff9..2b2310faf889 100644 --- a/actions/channel_actions.test.js +++ b/actions/channel_actions.test.js @@ -40,7 +40,7 @@ const initialState = { type: '0', total_msg_count: 0, team_id: 'team_id', - } + }, }, channelsInTeam: { 'team-id': ['current_channel_id'], @@ -280,11 +280,11 @@ describe('Actions.Channel', () => { const expectedActions = [{ type: 'MOCK_CREATE_GROUP_CHANNEL', - args: [['testuserid1', 'testuserid2']] + args: [['testuserid1', 'testuserid2']], }]; const fakeData = { - userIds: ['testuserid1', 'testuserid2'] + userIds: ['testuserid1', 'testuserid2'], }; await testStore.dispatch(Actions.openGroupChannelToUserIds(fakeData.userIds)); diff --git a/actions/emoji_actions.mock.test.js b/actions/emoji_actions.mock.test.js index 4c89cdca3571..4fe2bca89ea3 100644 --- a/actions/emoji_actions.mock.test.js +++ b/actions/emoji_actions.mock.test.js @@ -14,7 +14,7 @@ const initialState = { general: { config: {EnableCustomEmoji: 'true'}, }, - } + }, }; jest.mock('selectors/emojis', () => ({ @@ -23,7 +23,7 @@ jest.mock('selectors/emojis', () => ({ })); jest.mock('mattermost-redux/actions/emojis', () => ({ - getCustomEmojiByName: (...args) => ({type: 'MOCK_GET_CUSTOM_EMOJI_BY_NAME', args}) + getCustomEmojiByName: (...args) => ({type: 'MOCK_GET_CUSTOM_EMOJI_BY_NAME', args}), })); describe('loadRecentlyUsedCustomEmojis', () => { diff --git a/actions/global_actions.jsx b/actions/global_actions.jsx index e91c27cc494b..9a2dc1259657 100644 --- a/actions/global_actions.jsx +++ b/actions/global_actions.jsx @@ -100,7 +100,7 @@ export function emitChannelClickEvent(channel) { }, () => { browserHistory.push('/' + this.state.currentTeam.name); - } + }, ); } else { switchToChannel(channel); diff --git a/actions/invite_actions.test.js b/actions/invite_actions.test.js index 33833a007a23..ff9df74e063c 100644 --- a/actions/invite_actions.test.js +++ b/actions/invite_actions.test.js @@ -7,7 +7,7 @@ import {sendMembersInvites, sendGuestsInvites} from 'actions/invite_actions.jsx' jest.mock('actions/team_actions', () => ({ addUsersToTeam: () => ({ // since we are using addUsersToTeamGracefully, this call will always succeed - type: 'MOCK_RECEIVED_ME' + type: 'MOCK_RECEIVED_ME', }), })); @@ -372,29 +372,29 @@ describe('actions/invite_actions', () => { { user: { id: 'guest1', - roles: 'system_guest' + roles: 'system_guest', }, reason: { id: 'invite.guests.new-member', message: 'This guest has been added to the team and {count, plural, one {channel} other {channels}}.', values: { - count: 1 - } - } + count: 1, + }, + }, }, { user: { id: 'other-guest', - roles: 'system_guest' + roles: 'system_guest', }, reason: { id: 'invite.guests.new-member', message: 'This guest has been added to the team and {count, plural, one {channel} other {channels}}.', values: { - count: 1 - } - } - } + count: 1, + }, + }, + }, ], notSent: [ { diff --git a/actions/notification_actions.jsx b/actions/notification_actions.jsx index 42a3a76fd533..0c1116de4b2b 100644 --- a/actions/notification_actions.jsx +++ b/actions/notification_actions.jsx @@ -168,7 +168,7 @@ const notifyMe = (title, body, channel, teamId, silent) => (dispatch, getState) silent, }, }, - window.location.origin + window.location.origin, ); } else { showNotification({ diff --git a/actions/post_actions.jsx b/actions/post_actions.jsx index 60c6a8605b82..cca600c5524a 100644 --- a/actions/post_actions.jsx +++ b/actions/post_actions.jsx @@ -296,6 +296,6 @@ export function resetEmbedVisibility() { export function emitShortcutReactToLastPostFrom(emittedFrom) { return { type: ActionTypes.EMITTED_SHORTCUT_REACT_TO_LAST_POST, - payload: emittedFrom + payload: emittedFrom, }; } diff --git a/actions/post_actions.test.js b/actions/post_actions.test.js index 71786d6579ed..b99e7f29f818 100644 --- a/actions/post_actions.test.js +++ b/actions/post_actions.test.js @@ -196,8 +196,8 @@ describe('Actions.Posts', () => { data: { id: 'other_channel_idundefined', now: POST_CREATED_TIME, - userId: newPost.user_id} - } + userId: newPost.user_id}, + }, ], type: 'BATCHING_REDUCER.BATCH', }, @@ -211,7 +211,7 @@ describe('Actions.Posts', () => { expect(data).toEqual(true); expect(testStore.getActions()).toEqual( - [{data: {commentCount: 0, isRHS: false, postId: 'latest_post_id', refocusId: 'test', title: 'title'}, type: ActionTypes.SHOW_EDIT_POST_MODAL}] + [{data: {commentCount: 0, isRHS: false, postId: 'latest_post_id', refocusId: 'test', title: 'title'}, type: ActionTypes.SHOW_EDIT_POST_MODAL}], ); const general = { @@ -227,7 +227,7 @@ describe('Actions.Posts', () => { const {data: withLicenseData} = await testStore.dispatch(Actions.setEditingPost('latest_post_id', 0, 'test', 'title')); expect(withLicenseData).toEqual(true); expect(testStore.getActions()).toEqual( - [{data: {commentCount: 0, isRHS: false, postId: 'latest_post_id', refocusId: 'test', title: 'title'}, type: ActionTypes.SHOW_EDIT_POST_MODAL}] + [{data: {commentCount: 0, isRHS: false, postId: 'latest_post_id', refocusId: 'test', title: 'title'}, type: ActionTypes.SHOW_EDIT_POST_MODAL}], ); // should not allow edit for pending post diff --git a/actions/status_actions.jsx b/actions/status_actions.jsx index 10bec6b76fe4..5c58b02d9f0d 100644 --- a/actions/status_actions.jsx +++ b/actions/status_actions.jsx @@ -95,7 +95,7 @@ export function startPeriodicStatusUpdates() { () => { store.dispatch(loadStatusesForChannelAndSidebar()); }, - Constants.STATUS_INTERVAL + Constants.STATUS_INTERVAL, ); } diff --git a/actions/storage.test.js b/actions/storage.test.js index caba04b797a7..4daa5cc08565 100644 --- a/actions/storage.test.js +++ b/actions/storage.test.js @@ -61,12 +61,12 @@ describe('Actions.Storage', () => { store.dispatch(Actions.actionOnGlobalItemsWithPrefix( 'prefix', - (key, value) => touchedPairs.push([key, value]) + (key, value) => touchedPairs.push([key, value]), )); assert.deepEqual( touchedPairs, - [['prefix_test1', 1], ['prefix_test2', 2]] + [['prefix_test1', 1], ['prefix_test2', 2]], ); }); @@ -78,12 +78,12 @@ describe('Actions.Storage', () => { const touchedPairs = []; store.dispatch(Actions.actionOnItemsWithPrefix( 'prefix', - (key, value) => touchedPairs.push([key, value]) + (key, value) => touchedPairs.push([key, value]), )); assert.deepEqual( touchedPairs, - [['prefix_test1', 1], ['prefix_test2', 2]] + [['prefix_test1', 1], ['prefix_test2', 2]], ); }); diff --git a/actions/user_actions.jsx b/actions/user_actions.jsx index 82c51af84c33..5f85d43df138 100644 --- a/actions/user_actions.jsx +++ b/actions/user_actions.jsx @@ -12,7 +12,7 @@ import { getCurrentChannelId, getMyChannels, getMyChannelMember, - getChannelMembersInChannels + getChannelMembersInChannels, } from 'mattermost-redux/selectors/entities/channels'; import {getBool} from 'mattermost-redux/selectors/entities/preferences'; import {getCurrentTeamId, getTeamMember} from 'mattermost-redux/selectors/entities/teams'; @@ -49,7 +49,7 @@ export function loadProfilesAndReloadTeamMembers(page, perPage, teamId, options if (data) { await Promise.all([ doDispatch(loadTeamMembersForProfilesList(data, newTeamId, true)), - doDispatch(loadStatusesForProfilesList(data)) + doDispatch(loadStatusesForProfilesList(data)), ]); } @@ -64,7 +64,7 @@ export function loadProfilesAndReloadChannelMembers(page, perPage, channelId, so if (data) { await Promise.all([ doDispatch(loadChannelMembersForProfilesList(data, newChannelId, true)), - doDispatch(loadStatusesForProfilesList(data)) + doDispatch(loadStatusesForProfilesList(data)), ]); } @@ -92,7 +92,7 @@ export function searchProfilesAndTeamMembers(term = '', options = {}) { if (data) { await Promise.all([ doDispatch(loadTeamMembersForProfilesList(data, newTeamId)), - doDispatch(loadStatusesForProfilesList(data)) + doDispatch(loadStatusesForProfilesList(data)), ]); } @@ -107,7 +107,7 @@ export function searchProfilesAndChannelMembers(term, options = {}) { if (data) { await Promise.all([ doDispatch(loadChannelMembersForProfilesList(data, newChannelId)), - doDispatch(loadStatusesForProfilesList(data)) + doDispatch(loadStatusesForProfilesList(data)), ]); } diff --git a/actions/views/channel.test.js b/actions/views/channel.test.js index 266d24e38302..84d91c935c61 100644 --- a/actions/views/channel.test.js +++ b/actions/views/channel.test.js @@ -526,7 +526,7 @@ describe('channel view actions', () => { expect(store.getActions()).toEqual([{ data: true, - type: 'UPDATE_TOAST_STATUS' + type: 'UPDATE_TOAST_STATUS', }]); }); }); diff --git a/actions/views/channel_sidebar.test.ts b/actions/views/channel_sidebar.test.ts index 71a86bf834e9..b4a5ce901b2c 100644 --- a/actions/views/channel_sidebar.test.ts +++ b/actions/views/channel_sidebar.test.ts @@ -16,8 +16,8 @@ describe('setCategoryCollapsed', () => { currentUserId: 'user1', profiles: { user1: {}, - } - } + }, + }, }; const store = await configureStore(initialState); diff --git a/actions/views/create_comment.test.jsx b/actions/views/create_comment.test.jsx index 5169ca575380..ad15d481c443 100644 --- a/actions/views/create_comment.test.jsx +++ b/actions/views/create_comment.test.jsx @@ -196,7 +196,7 @@ describe('rhs view actions', () => { testStore.dispatch(moveHistoryIndexBack(Posts.MESSAGE_TYPES.COMMENT)); expect(store.getActions()).toEqual( - expect.arrayContaining(testStore.getActions()) + expect.arrayContaining(testStore.getActions()), ); }); @@ -210,7 +210,7 @@ describe('rhs view actions', () => { testStore.dispatch(updateCommentDraft(rootId, {message: 'test message', fileInfos: [], uploadsInProgress: []})); expect(store.getActions()).toEqual( - expect.arrayContaining(testStore.getActions()) + expect.arrayContaining(testStore.getActions()), ); }); }); @@ -234,7 +234,7 @@ describe('rhs view actions', () => { expect(PostActions.createPost).toHaveBeenCalled(); expect(lastCall(PostActions.createPost.mock.calls)[0]).toEqual( - expect.objectContaining(post) + expect.objectContaining(post), ); expect(lastCall(PostActions.createPost.mock.calls)[1]).toBe(draft.fileInfos); @@ -327,7 +327,7 @@ describe('rhs view actions', () => { testStore.dispatch(addMessageIntoHistory('')); expect(store.getActions()).toEqual( - expect.arrayContaining(testStore.getActions()) + expect.arrayContaining(testStore.getActions()), ); }); @@ -338,7 +338,7 @@ describe('rhs view actions', () => { testStore.dispatch(updateCommentDraft(rootId, null)); expect(store.getActions()).toEqual( - expect.arrayContaining(testStore.getActions()) + expect.arrayContaining(testStore.getActions()), ); }); @@ -365,7 +365,7 @@ describe('rhs view actions', () => { testStore.dispatch(submitReaction(latestPostId, '+', 'smile')); expect(store.getActions()).toEqual( - expect.arrayContaining(testStore.getActions()) + expect.arrayContaining(testStore.getActions()), ); }); @@ -467,7 +467,7 @@ describe('rhs view actions', () => { 0, 'reply_textbox', 'Comment', - true + true, ), ]); }); diff --git a/actions/views/rhs.test.js b/actions/views/rhs.test.js index 64dd2e9ec486..cf61485ba671 100644 --- a/actions/views/rhs.test.js +++ b/actions/views/rhs.test.js @@ -94,7 +94,7 @@ describe('rhs view actions', () => { posts: { posts: { [previousSelectedPost.id]: previousSelectedPost, - } + }, }, preferences: {myPreferences: {}}, }, diff --git a/actions/websocket_actions.jsx b/actions/websocket_actions.jsx index 2b2d1dd6d2e8..f4509c9e9aaa 100644 --- a/actions/websocket_actions.jsx +++ b/actions/websocket_actions.jsx @@ -207,7 +207,7 @@ export function startPeriodicSync() { reconnect(false); } }, - SYNC_INTERVAL_MILLISECONDS + SYNC_INTERVAL_MILLISECONDS, ); } @@ -599,7 +599,7 @@ export function handlePostUnreadEvent(msg) { msgCount: msg.data.msg_count, mentionCount: msg.data.mention_count, }, - } + }, ); } @@ -1160,27 +1160,27 @@ function handleGroupUpdatedEvent(msg) { function handleGroupAssociatedToTeamEvent(msg) { store.dispatch({ type: GroupTypes.RECEIVED_GROUP_ASSOCIATED_TO_TEAM, - data: {teamID: msg.broadcast.team_id, groups: [{id: msg.data.group_id}]} + data: {teamID: msg.broadcast.team_id, groups: [{id: msg.data.group_id}]}, }); } function handleGroupNotAssociatedToTeamEvent(msg) { store.dispatch({ type: GroupTypes.RECEIVED_GROUP_NOT_ASSOCIATED_TO_TEAM, - data: {teamID: msg.broadcast.team_id, groups: [{id: msg.data.group_id}]} + data: {teamID: msg.broadcast.team_id, groups: [{id: msg.data.group_id}]}, }); } function handleGroupAssociatedToChannelEvent(msg) { store.dispatch({ type: GroupTypes.RECEIVED_GROUP_ASSOCIATED_TO_CHANNEL, - data: {channelID: msg.broadcast.channel_id, groups: [{id: msg.data.group_id}]} + data: {channelID: msg.broadcast.channel_id, groups: [{id: msg.data.group_id}]}, }); } function handleGroupNotAssociatedToChannelEvent(msg) { store.dispatch({ type: GroupTypes.RECEIVED_GROUP_NOT_ASSOCIATED_TO_CHANNEL, - data: {channelID: msg.broadcast.channel_id, groups: [{id: msg.data.group_id}]} + data: {channelID: msg.broadcast.channel_id, groups: [{id: msg.data.group_id}]}, }); } \ No newline at end of file diff --git a/actions/websocket_actions.test.jsx b/actions/websocket_actions.test.jsx index 9437d1219bd4..17c84fdb6585 100644 --- a/actions/websocket_actions.test.jsx +++ b/actions/websocket_actions.test.jsx @@ -117,7 +117,7 @@ const mockState = { team: ['channel1', 'channel2'], }, membersInChannel: { - otherChannel: {} + otherChannel: {}, }, }, preferences: { @@ -477,7 +477,7 @@ describe('handleNewPostEvent', () => { ...initialState.entities.users, isManualStatus: { user2: true, - } + }, }, }, }); @@ -609,7 +609,7 @@ describe('handleUserTypingEvent', () => { otheruser: { id: 'otheruser', roles: 'system_user', - } + }, }, statuses: { ...initialState.entities.users.statuses, diff --git a/babel.config.js b/babel.config.js index e60fff39b6b4..6a571d810845 100644 --- a/babel.config.js +++ b/babel.config.js @@ -31,7 +31,7 @@ const config = { 'react-hot-loader/babel', 'babel-plugin-typescript-to-proptypes', '@babel/plugin-proposal-optional-chaining', - '@babel/plugin-proposal-nullish-coalescing-operator' + '@babel/plugin-proposal-nullish-coalescing-operator', ], }; diff --git a/client/websocket_client.jsx b/client/websocket_client.jsx index 0779577d9584..02dbfe20536a 100644 --- a/client/websocket_client.jsx +++ b/client/websocket_client.jsx @@ -85,7 +85,7 @@ export default class WebSocketClient { () => { this.initialize(connectionUrl, token); }, - retryTime + retryTime, ); }; diff --git a/components/about_build_modal/about_build_modal.test.jsx b/components/about_build_modal/about_build_modal.test.jsx index 1a8bd69a7349..3a08fe2f7ebe 100644 --- a/components/about_build_modal/about_build_modal.test.jsx +++ b/components/about_build_modal/about_build_modal.test.jsx @@ -111,7 +111,7 @@ describe('components/AboutBuildModal', () => { webappBuildHash='0a1b2c3d4f' show={true} onHide={onHide} - /> + />, ); wrapper.find(Modal).first().props().onExited(); @@ -125,7 +125,7 @@ describe('components/AboutBuildModal', () => { license={license} show={true} onHide={jest.fn()} - /> + />, ); expect(wrapper.find('#tosLink').props().href).toBe(AboutLinks.TERMS_OF_SERVICE); diff --git a/components/access_history_modal/access_history_modal.test.tsx b/components/access_history_modal/access_history_modal.test.tsx index 6ce4e0cb7cec..f616cf5f5f8f 100644 --- a/components/access_history_modal/access_history_modal.test.tsx +++ b/components/access_history_modal/access_history_modal.test.tsx @@ -20,7 +20,7 @@ describe('components/AccessHistoryModal', () => { test('should match snapshot when no audits exist', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); expect(wrapper.find(LoadingScreen).exists()).toBe(true); @@ -29,7 +29,7 @@ describe('components/AccessHistoryModal', () => { test('should match snapshot when audits exist', () => { const wrapper = shallow( - + , ); wrapper.setProps({userAudits: ['audit1', 'audit2']}); @@ -44,7 +44,7 @@ describe('components/AccessHistoryModal', () => { }; const props = {...baseProps, actions}; const wrapper: ShallowWrapper = shallow( - + , ); wrapper.instance().onShow(); @@ -53,7 +53,7 @@ describe('components/AccessHistoryModal', () => { test('should match state when onHide is called', () => { const wrapper: ShallowWrapper = shallow( - + , ); wrapper.setState({show: true}); diff --git a/components/activity_log_modal/activity_log_modal.jsx b/components/activity_log_modal/activity_log_modal.jsx index 595b4c418490..0d2c8e3a154e 100644 --- a/components/activity_log_modal/activity_log_modal.jsx +++ b/components/activity_log_modal/activity_log_modal.jsx @@ -98,7 +98,7 @@ export default class ActivityLogModal extends React.PureComponent { locale={this.props.locale} currentSession={currentSession} submitRevoke={this.submitRevoke} - /> + />, ); return array; }, []); diff --git a/components/activity_log_modal/activity_log_modal.test.jsx b/components/activity_log_modal/activity_log_modal.test.jsx index 8273eb59b17b..672b439efef5 100644 --- a/components/activity_log_modal/activity_log_modal.test.jsx +++ b/components/activity_log_modal/activity_log_modal.test.jsx @@ -23,7 +23,7 @@ describe('components/ActivityLogModal', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); expect(wrapper.find(LoadingScreen).exists()).toBe(false); @@ -39,7 +39,7 @@ describe('components/ActivityLogModal', () => { return new Promise((resolve) => { process.nextTick(() => resolve()); }); - } + }, ); const actions = { getSessions: jest.fn(), @@ -48,7 +48,7 @@ describe('components/ActivityLogModal', () => { const props = {...baseProps, actions}; const wrapper = shallow( - + , ); wrapper.instance().submitRevoke('altId', {preventDefault: jest.fn()}); @@ -64,7 +64,7 @@ describe('components/ActivityLogModal', () => { }; const props = {...baseProps, actions}; const wrapper = shallow( - + , ); wrapper.instance().onShow(); @@ -73,7 +73,7 @@ describe('components/ActivityLogModal', () => { test('should match state when onHide is called', () => { const wrapper = shallow( - + , ); wrapper.setState({show: true}); diff --git a/components/activity_log_modal/components/activity_log.test.jsx b/components/activity_log_modal/components/activity_log.test.jsx index 5a208ec2e790..f5caaf8305d3 100644 --- a/components/activity_log_modal/components/activity_log.test.jsx +++ b/components/activity_log_modal/components/activity_log.test.jsx @@ -25,7 +25,7 @@ describe('components/activity_log_modal/ActivityLog', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -33,7 +33,7 @@ describe('components/activity_log_modal/ActivityLog', () => { test('submitRevoke is called correctly', () => { const wrapper = shallow( - + , ); wrapper.instance().submitRevoke('e'); @@ -44,7 +44,7 @@ describe('components/activity_log_modal/ActivityLog', () => { test('handleMoreInfo updates state correctly', () => { const wrapper = shallow( - + , ); wrapper.instance().handleMoreInfo(); @@ -53,7 +53,7 @@ describe('components/activity_log_modal/ActivityLog', () => { test('should match when isMobileSession is called', () => { const wrapper = shallow( - + , ); const isMobileSession = wrapper.instance().isMobileSession; @@ -64,7 +64,7 @@ describe('components/activity_log_modal/ActivityLog', () => { test('should match when mobileSessionInfo is called', () => { const wrapper = shallow( - + , ); const mobileSessionInfo = wrapper.instance().mobileSessionInfo; diff --git a/components/activity_log_modal/components/more_info.test.tsx b/components/activity_log_modal/components/more_info.test.tsx index 1d03dff6071a..536a5843f144 100644 --- a/components/activity_log_modal/components/more_info.test.tsx +++ b/components/activity_log_modal/components/more_info.test.tsx @@ -23,7 +23,7 @@ describe('components/activity_log_modal/MoreInfo', () => { test('should match snapshot extra info toggled off', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -32,7 +32,7 @@ describe('components/activity_log_modal/MoreInfo', () => { test('should match snapshot, extra info toggled on', () => { const props = {...baseProps, moreInfo: true}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/add_groups_to_channel_modal/add_groups_to_channel_modal.jsx b/components/add_groups_to_channel_modal/add_groups_to_channel_modal.jsx index 36c43d4bec0e..63c170607ed9 100644 --- a/components/add_groups_to_channel_modal/add_groups_to_channel_modal.jsx +++ b/components/add_groups_to_channel_modal/add_groups_to_channel_modal.jsx @@ -78,7 +78,7 @@ export default class AddGroupsToChannelModal extends React.Component { await this.props.actions.getGroupsNotAssociatedToChannel(this.props.currentChannelId, searchTerm); this.setGroupsLoadingState(false); }, - Constants.SEARCH_TIMEOUT_MILLISECONDS + Constants.SEARCH_TIMEOUT_MILLISECONDS, ); } } diff --git a/components/add_groups_to_channel_modal/add_groups_to_channel_modal.test.jsx b/components/add_groups_to_channel_modal/add_groups_to_channel_modal.test.jsx index 561609a5c794..751a268f9718 100644 --- a/components/add_groups_to_channel_modal/add_groups_to_channel_modal.test.jsx +++ b/components/add_groups_to_channel_modal/add_groups_to_channel_modal.test.jsx @@ -23,7 +23,7 @@ describe('components/AddGroupsToChannelModal', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -32,7 +32,7 @@ describe('components/AddGroupsToChannelModal', () => { const onHide = jest.fn(); const props = {...baseProps, onHide}; const wrapper = shallow( - + , ); wrapper.instance().handleExit(); @@ -41,7 +41,7 @@ describe('components/AddGroupsToChannelModal', () => { test('should match state when handleResponse is called', () => { const wrapper = shallow( - + , ); wrapper.setState({saving: true, addError: ''}); @@ -89,7 +89,7 @@ describe('components/AddGroupsToChannelModal', () => { test('should match state when addValue is called', () => { const wrapper = shallow( - + , ); const value1 = {id: 'id_1', label: 'label_1', value: 'value_1'}; const value2 = {id: 'id_2', label: 'label_2', value: 'value_2'}; @@ -105,7 +105,7 @@ describe('components/AddGroupsToChannelModal', () => { test('should match state when handlePageChange is called', () => { const wrapper = shallow( - + , ); wrapper.setState({users: [{id: 'id_1'}]}); @@ -121,7 +121,7 @@ describe('components/AddGroupsToChannelModal', () => { test('should match state when search is called', () => { const wrapper = shallow( - + , ); wrapper.instance().search(''); @@ -137,7 +137,7 @@ describe('components/AddGroupsToChannelModal', () => { test('should match state when handleDelete is called', () => { const wrapper = shallow( - + , ); const value1 = {id: 'id_1', label: 'label_1', value: 'value_1'}; @@ -152,7 +152,7 @@ describe('components/AddGroupsToChannelModal', () => { test('should match when renderOption is called', () => { const wrapper = shallow( - + , ); const option = {id: 'id', last_picture_update: '12345', email: 'test@test.com'}; @@ -170,7 +170,7 @@ describe('components/AddGroupsToChannelModal', () => { test('should match when renderValue is called', () => { const wrapper = shallow( - + , ); expect(wrapper.instance().renderValue({data: {display_name: 'foo'}})).toEqual('foo'); diff --git a/components/add_groups_to_team_modal/add_groups_to_team_modal.jsx b/components/add_groups_to_team_modal/add_groups_to_team_modal.jsx index 5a9a32dde207..0874a2496e57 100644 --- a/components/add_groups_to_team_modal/add_groups_to_team_modal.jsx +++ b/components/add_groups_to_team_modal/add_groups_to_team_modal.jsx @@ -78,7 +78,7 @@ export default class AddGroupsToTeamModal extends React.Component { await this.props.actions.getGroupsNotAssociatedToTeam(this.props.currentTeamId, searchTerm); this.setGroupsLoadingState(false); }, - Constants.SEARCH_TIMEOUT_MILLISECONDS + Constants.SEARCH_TIMEOUT_MILLISECONDS, ); } } diff --git a/components/add_groups_to_team_modal/add_groups_to_team_modal.test.jsx b/components/add_groups_to_team_modal/add_groups_to_team_modal.test.jsx index ef37997d99c9..8270a45891f9 100644 --- a/components/add_groups_to_team_modal/add_groups_to_team_modal.test.jsx +++ b/components/add_groups_to_team_modal/add_groups_to_team_modal.test.jsx @@ -23,7 +23,7 @@ describe('components/AddGroupsToTeamModal', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -32,7 +32,7 @@ describe('components/AddGroupsToTeamModal', () => { const onHide = jest.fn(); const props = {...baseProps, onHide}; const wrapper = shallow( - + , ); wrapper.instance().handleExit(); @@ -41,7 +41,7 @@ describe('components/AddGroupsToTeamModal', () => { test('should match state when handleResponse is called', () => { const wrapper = shallow( - + , ); wrapper.setState({saving: true, addError: ''}); @@ -89,7 +89,7 @@ describe('components/AddGroupsToTeamModal', () => { test('should match state when addValue is called', () => { const wrapper = shallow( - + , ); const value1 = {id: 'id_1', label: 'label_1', value: 'value_1'}; @@ -106,7 +106,7 @@ describe('components/AddGroupsToTeamModal', () => { test('should match state when handlePageChange is called', () => { const wrapper = shallow( - + , ); const user = {id: 'id_1', label: 'label_1', value: 'value_1'}; @@ -124,7 +124,7 @@ describe('components/AddGroupsToTeamModal', () => { test('should match state when search is called', () => { const wrapper = shallow( - + , ); wrapper.instance().search(''); @@ -140,7 +140,7 @@ describe('components/AddGroupsToTeamModal', () => { test('should match state when handleDelete is called', () => { const wrapper = shallow( - + , ); const value1 = {id: 'id_1', label: 'label_1', value: 'value_1'}; @@ -155,7 +155,7 @@ describe('components/AddGroupsToTeamModal', () => { test('should match when renderOption is called', () => { const wrapper = shallow( - + , ); const option = {id: 'id', last_picture_update: '12345', email: 'test@test.com'}; @@ -173,7 +173,7 @@ describe('components/AddGroupsToTeamModal', () => { test('should match when renderValue is called', () => { const wrapper = shallow( - + , ); expect(wrapper.instance().renderValue({data: {display_name: 'foo'}})).toEqual('foo'); diff --git a/components/add_user_to_channel_modal/add_user_to_channel_modal.test.jsx b/components/add_user_to_channel_modal/add_user_to_channel_modal.test.jsx index af78664e2d3f..0bca63b748aa 100644 --- a/components/add_user_to_channel_modal/add_user_to_channel_modal.test.jsx +++ b/components/add_user_to_channel_modal/add_user_to_channel_modal.test.jsx @@ -24,7 +24,7 @@ describe('components/AddUserToChannelModal', () => { it('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper.find('#add-user-to-channel-modal__add-button').props().disabled).toBe(true); @@ -35,7 +35,7 @@ describe('components/AddUserToChannelModal', () => { it('should enable the add button when a channel is selected', () => { const wrapper = shallow( - + , ); wrapper.setState({selectedChannelId: 'someChannelId'}); @@ -45,7 +45,7 @@ describe('components/AddUserToChannelModal', () => { it('should show invite error when an error message is captured', () => { const wrapper = shallow( - + , ); wrapper.setState({submitError: 'some error'}); @@ -55,7 +55,7 @@ describe('components/AddUserToChannelModal', () => { it('should disable add button when membership is being checked', () => { const wrapper = shallow( - + , ); wrapper.setState({ @@ -76,7 +76,7 @@ describe('components/AddUserToChannelModal', () => { }; const wrapper = shallow( - + , ); wrapper.setState({selectedChannelId: 'someChannelId'}); @@ -86,7 +86,7 @@ describe('components/AddUserToChannelModal', () => { it('should disable the add button when saving', () => { const wrapper = shallow( - + , ); wrapper.setState({ @@ -101,7 +101,7 @@ describe('components/AddUserToChannelModal', () => { const props = {...baseProps}; const wrapper = shallow( - + , ); const selection = {channel: {id: 'someChannelId', display_name: 'channelName'}}; @@ -122,7 +122,7 @@ describe('components/AddUserToChannelModal', () => { }; const wrapper = shallow( - + , ); expect(wrapper.state().text).toEqual(''); @@ -149,7 +149,7 @@ describe('components/AddUserToChannelModal', () => { const props = {...baseProps}; const wrapper = shallow( - + , ); wrapper.instance().handleSubmit(); @@ -167,7 +167,7 @@ describe('components/AddUserToChannelModal', () => { }; const wrapper = shallow( - + , ); wrapper.setState({selectedChannelId: 'someChannelId'}); @@ -184,7 +184,7 @@ describe('components/AddUserToChannelModal', () => { }; const wrapper = shallow( - + , ); wrapper.setState({selectedChannelId: 'someChannelId'}); @@ -206,7 +206,7 @@ describe('components/AddUserToChannelModal', () => { }; const wrapper = shallow( - + , ); expect(wrapper.state().show).toBe(true); @@ -236,7 +236,7 @@ describe('components/AddUserToChannelModal', () => { }; const wrapper = shallow( - + , ); expect(wrapper.state().show).toBe(true); diff --git a/components/add_users_to_team_modal/add_users_to_team_modal.test.tsx b/components/add_users_to_team_modal/add_users_to_team_modal.test.tsx index 516803722a7c..66a476f20b82 100644 --- a/components/add_users_to_team_modal/add_users_to_team_modal.test.tsx +++ b/components/add_users_to_team_modal/add_users_to_team_modal.test.tsx @@ -87,7 +87,7 @@ describe('components/admin_console/add_users_to_team_modal/AddUsersToTeamModal', const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -98,14 +98,14 @@ describe('components/admin_console/add_users_to_team_modal/AddUsersToTeamModal', {...baseProps} includeUsers={{[removedUser.id]: removedUser}} excludeUsers={{[user1.id]: user1}} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); test('should match state when onHide is called', () => { const wrapper = shallow( - + , ); wrapper.setState({show: true}); @@ -123,7 +123,7 @@ describe('components/admin_console/add_users_to_team_modal/AddUsersToTeamModal', searchProfiles, getProfilesNotInTeam, }} - /> + />, ); const addUsers = wrapper.instance() as AddUsersToTeamModal; diff --git a/components/admin_console/admin_console.test.tsx b/components/admin_console/admin_console.test.tsx index b8e1f40cca57..e98b511baf1a 100644 --- a/components/admin_console/admin_console.test.tsx +++ b/components/admin_console/admin_console.test.tsx @@ -52,7 +52,7 @@ describe('components/AdminConsole', () => { isCurrentUserSystemAdmin: false, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -64,7 +64,7 @@ describe('components/AdminConsole', () => { isCurrentUserSystemAdmin: true, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/admin_definition.jsx b/components/admin_console/admin_definition.jsx index a17f162f5444..f6398174eaa9 100644 --- a/components/admin_console/admin_definition.jsx +++ b/components/admin_console/admin_definition.jsx @@ -12,7 +12,7 @@ import { removeIdpSamlCertificate, uploadIdpSamlCertificate, removePrivateSamlCertificate, uploadPrivateSamlCertificate, removePublicSamlCertificate, uploadPublicSamlCertificate, - invalidateAllEmailInvites, testSmtp, testSiteURL, getSamlMetadataFromIdp, setSamlIdpCertificateFromMetadata + invalidateAllEmailInvites, testSmtp, testSiteURL, getSamlMetadataFromIdp, setSamlIdpCertificateFromMetadata, } from 'actions/admin_actions'; import SystemAnalytics from 'components/analytics/system_analytics'; import TeamAnalytics from 'components/analytics/team_analytics'; @@ -363,7 +363,7 @@ const AdminDefinition = { url: 'user_management/permissions/team_override_scheme/:scheme_id', isHidden: it.either( it.isnt(it.licensed), - it.isnt(it.licensedForFeature('CustomPermissionsSchemes')) + it.isnt(it.licensedForFeature('CustomPermissionsSchemes')), ), schema: { id: 'PermissionSystemScheme', @@ -374,7 +374,7 @@ const AdminDefinition = { url: 'user_management/permissions/team_override_scheme', isHidden: it.either( it.isnt(it.licensed), - it.isnt(it.licensedForFeature('CustomPermissionsSchemes')) + it.isnt(it.licensedForFeature('CustomPermissionsSchemes')), ), schema: { id: 'PermissionSystemScheme', @@ -661,7 +661,7 @@ const AdminDefinition = { title_default: 'Elasticsearch', isHidden: it.either( it.isnt(it.licensedForFeature('Elasticsearch')), - it.configIsTrue('ExperimentalSettings', 'RestrictSystemAdmin') + it.configIsTrue('ExperimentalSettings', 'RestrictSystemAdmin'), ), searchableStrings: [ 'admin.elasticsearch.title', @@ -1055,7 +1055,7 @@ const AdminDefinition = { title_default: 'High Availability', isHidden: it.either( it.isnt(it.licensedForFeature('Cluster')), - it.configIsTrue('ExperimentalSettings', 'RestrictSystemAdmin') + it.configIsTrue('ExperimentalSettings', 'RestrictSystemAdmin'), ), searchableStrings: [ 'admin.advance.cluster', @@ -1318,7 +1318,7 @@ const AdminDefinition = { title_default: 'Performance Monitoring', isHidden: it.either( it.isnt(it.licensedForFeature('Metrics')), - it.configIsTrue('ExperimentalSettings', 'RestrictSystemAdmin') + it.configIsTrue('ExperimentalSettings', 'RestrictSystemAdmin'), ), schema: { id: 'MetricsSettings', @@ -1654,7 +1654,7 @@ const AdminDefinition = { label_default: 'Lock Teammate Name Display for all users: ', help_text: t('admin.lockTeammateNameDisplayHelpText'), help_text_default: 'When true, disables users\' ability to change settings under Main Menu > Account Settings > Display > Teammate Name Display.', - isHidden: it.isnt(it.licensedForFeature('LockTeammateNameDisplay')) + isHidden: it.isnt(it.licensedForFeature('LockTeammateNameDisplay')), }, { type: Constants.SettingsTypes.TYPE_PERMISSION, @@ -1833,7 +1833,7 @@ const AdminDefinition = { value: 'full', display_name: t('admin.environment.notifications.pushContents.full'), display_name_default: 'Full message content sent in the notification payload', - } + }, ], }, { @@ -2411,7 +2411,7 @@ const AdminDefinition = { it.both( it.stateIsFalse('LdapSettings.Enable'), it.stateIsFalse('LdapSettings.EnableSync'), - ) + ), ), }, { @@ -2439,7 +2439,7 @@ const AdminDefinition = { it.both( it.stateIsFalse('LdapSettings.Enable'), it.stateIsFalse('LdapSettings.EnableSync'), - ) + ), ), }, { @@ -2454,7 +2454,7 @@ const AdminDefinition = { placeholder: t('admin.ldap.groupFilterEx'), placeholder_default: 'E.g.: "(objectClass=group)"', isDisabled: it.stateIsFalse('LdapSettings.EnableSync'), - isHidden: it.isnt(it.licensedForFeature('LDAPGroups')) + isHidden: it.isnt(it.licensedForFeature('LDAPGroups')), }, { type: Constants.SettingsTypes.TYPE_TEXT, @@ -2466,7 +2466,7 @@ const AdminDefinition = { placeholder: t('admin.ldap.groupDisplayNameAttributeEx'), placeholder_default: 'E.g.: "cn"', isDisabled: it.stateIsFalse('LdapSettings.EnableSync'), - isHidden: it.isnt(it.licensedForFeature('LDAPGroups')) + isHidden: it.isnt(it.licensedForFeature('LDAPGroups')), }, { type: Constants.SettingsTypes.TYPE_TEXT, @@ -2479,7 +2479,7 @@ const AdminDefinition = { placeholder: t('admin.ldap.groupIdAttributeEx'), placeholder_default: 'E.g.: "objectGUID" or "entryUUID"', isDisabled: it.stateIsFalse('LdapSettings.EnableSync'), - isHidden: it.isnt(it.licensedForFeature('LDAPGroups')) + isHidden: it.isnt(it.licensedForFeature('LDAPGroups')), }, { type: Constants.SettingsTypes.TYPE_TEXT, @@ -2828,7 +2828,7 @@ const AdminDefinition = { type: Constants.SettingsTypes.TYPE_CUSTOM, component: LDAPFeatureDiscovery, key: 'LDAPFeatureDiscovery', - } + }, ], }, }, @@ -2899,7 +2899,7 @@ const AdminDefinition = { success_message_default: 'SAML Metadata retrieved successfully. Two fields below have been updated', isDisabled: it.either( it.stateIsFalse('SamlSettings.Enable'), - it.stateEquals('SamlSettings.IdpMetadataUrl', '') + it.stateEquals('SamlSettings.IdpMetadataUrl', ''), ), sourceUrlKey: 'SamlSettings.IdpMetadataUrl', }, @@ -3045,7 +3045,7 @@ const AdminDefinition = { isDisabled: it.either( it.stateIsFalse('SamlSettings.Encrypt'), it.stateIsFalse('SamlSettings.PrivateKeyFile'), - it.stateIsFalse('SamlSettings.PublicCertificateFile') + it.stateIsFalse('SamlSettings.PublicCertificateFile'), ), }, { @@ -3263,7 +3263,7 @@ const AdminDefinition = { type: Constants.SettingsTypes.TYPE_CUSTOM, component: SAMLFeatureDiscovery, key: 'SAMLFeatureDiscovery', - } + }, ], }, }, @@ -4443,7 +4443,7 @@ const AdminDefinition = { help_text: t('admin.experimental.experimentalUseNewSAMLLibrary.desc'), help_text_default: 'Enable an updated SAML Library, which does not require the XML Security Library (xmlsec1) to be installed. Warning: Not all providers have been tested. If you experience issues, please contact support: [https://about.mattermost.com/support/](!https://about.mattermost.com/support/). Changing this setting requires a server restart before taking effect.', help_text_markdown: true, - isHidden: it.isnt(it.licensedForFeature('SAML')) + isHidden: it.isnt(it.licensedForFeature('SAML')), }, { type: Constants.SettingsTypes.TYPE_TEXT, diff --git a/components/admin_console/admin_definition.test.jsx b/components/admin_console/admin_definition.test.jsx index 956c2acfed08..0f581ed161c0 100644 --- a/components/admin_console/admin_definition.test.jsx +++ b/components/admin_console/admin_definition.test.jsx @@ -120,7 +120,7 @@ const settingFileUploadButton = yup.object().shape({ uploading_text_default: yup.string().required(), upload_action: yup.object().required(), remove_action: yup.object().required(), - fileType: yup.string().required() + fileType: yup.string().required(), }); // eslint-disable-next-line no-template-curly-in-string diff --git a/components/admin_console/admin_navbar_dropdown/admin_navbar_dropdown.tsx b/components/admin_console/admin_navbar_dropdown/admin_navbar_dropdown.tsx index 88cc1feea7f1..bdc84626f57b 100644 --- a/components/admin_console/admin_navbar_dropdown/admin_navbar_dropdown.tsx +++ b/components/admin_console/admin_navbar_dropdown/admin_navbar_dropdown.tsx @@ -54,7 +54,7 @@ class AdminNavbarDropdown extends React.Component { key={'team_' + team.name} to={'/' + team.name} text={formatMessage({id: 'navbar_dropdown.switchTo', defaultMessage: 'Switch to '}) + ' ' + team.display_name} - /> + />, ); } } else { diff --git a/components/admin_console/admin_navbar_dropdown/menu_item_blockable_link.test.tsx b/components/admin_console/admin_navbar_dropdown/menu_item_blockable_link.test.tsx index 98efa26d4212..3b8fdc3c2b8d 100644 --- a/components/admin_console/admin_navbar_dropdown/menu_item_blockable_link.test.tsx +++ b/components/admin_console/admin_navbar_dropdown/menu_item_blockable_link.test.tsx @@ -12,7 +12,7 @@ describe('components/MenuItemBlockableLink', () => { + />, ); expect(wrapper).toMatchInlineSnapshot(` diff --git a/components/admin_console/admin_sidebar/admin_sidebar.jsx b/components/admin_console/admin_sidebar/admin_sidebar.jsx index 63eac1ec2e86..838908013167 100644 --- a/components/admin_console/admin_sidebar/admin_sidebar.jsx +++ b/components/admin_console/admin_sidebar/admin_sidebar.jsx @@ -274,7 +274,7 @@ class AdminSidebar extends React.Component { key={'customplugin' + p.id} name={'plugins/plugin_' + p.id} title={p.name} - /> + />, ); }); } diff --git a/components/admin_console/audits/audits.tsx b/components/admin_console/audits/audits.tsx index 8ae5dc0b4b90..0dcfabc47948 100644 --- a/components/admin_console/audits/audits.tsx +++ b/components/admin_console/audits/audits.tsx @@ -37,30 +37,30 @@ export default class Audits extends React.PureComponent { super(props); this.state = { - loadingAudits: true + loadingAudits: true, }; } public componentDidMount() { this.props.actions.getAudits().then( - () => this.setState({loadingAudits: false}) + () => this.setState({loadingAudits: false}), ); } private reload = () => { this.setState({loadingAudits: true}); this.props.actions.getAudits().then( - () => this.setState({loadingAudits: false}) + () => this.setState({loadingAudits: false}), ); }; private activityLogHeader = () => { const h4Style = { display: 'inline-block', - marginBottom: '6px' + marginBottom: '6px', }; const divStyle: object = { - clear: 'both' + clear: 'both', }; return (
diff --git a/components/admin_console/audits/index.ts b/components/admin_console/audits/index.ts index bbe6b167940a..8b3ad5bd58ad 100644 --- a/components/admin_console/audits/index.ts +++ b/components/admin_console/audits/index.ts @@ -32,15 +32,15 @@ function mapStateToProps(state: GlobalState) { return { isLicensed, - audits: Object.values(Selectors.getAudits(state)) + audits: Object.values(Selectors.getAudits(state)), }; } function mapDispatchToProps(dispatch: Dispatch) { return { actions: bindActionCreators, Actions>({ - getAudits - }, dispatch) + getAudits, + }, dispatch), }; } diff --git a/components/admin_console/bleve_settings.test.jsx b/components/admin_console/bleve_settings.test.jsx index 3b789ab7701c..8a8e89350e8d 100644 --- a/components/admin_console/bleve_settings.test.jsx +++ b/components/admin_console/bleve_settings.test.jsx @@ -20,12 +20,12 @@ describe('components/BleveSettings', () => { EnableIndexing: false, EnableSearching: false, EnableAutocomplete: false, - } + }, }; const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -37,12 +37,12 @@ describe('components/BleveSettings', () => { EnableIndexing: true, EnableSearching: false, EnableAutocomplete: false, - } + }, }; const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/blockable_link/index.ts b/components/admin_console/blockable_link/index.ts index 19cdb9ca517a..3c89a1c75859 100644 --- a/components/admin_console/blockable_link/index.ts +++ b/components/admin_console/blockable_link/index.ts @@ -12,15 +12,15 @@ import BlockableLink from './blockable_link'; function mapStateToProps(state: object) { return { - blocked: getNavigationBlocked(state) + blocked: getNavigationBlocked(state), }; } function mapDispatchToProps(dispatch: Dispatch) { return { actions: bindActionCreators({ - deferNavigation - }, dispatch) + deferNavigation, + }, dispatch), }; } diff --git a/components/admin_console/brand_image_setting/brand_image_setting.jsx b/components/admin_console/brand_image_setting/brand_image_setting.jsx index 810022d921dd..f2b55900c5ff 100644 --- a/components/admin_console/brand_image_setting/brand_image_setting.jsx +++ b/components/admin_console/brand_image_setting/brand_image_setting.jsx @@ -64,7 +64,7 @@ export default class BrandImageSetting extends React.PureComponent { } else { this.setState({brandImageExists: false}); } - } + }, ); this.props.registerSaveAction(this.handleSave); @@ -123,7 +123,7 @@ export default class BrandImageSetting extends React.PureComponent { this.setState({ error: err.message, }); - } + }, ); } else if (this.state.brandImage) { await uploadBrandImage( @@ -140,7 +140,7 @@ export default class BrandImageSetting extends React.PureComponent { this.setState({ error: err.message, }); - } + }, ); } return {error}; diff --git a/components/admin_console/brand_image_setting/brand_image_setting.test.jsx b/components/admin_console/brand_image_setting/brand_image_setting.test.jsx index b0d22948ab45..2dd728a3506e 100644 --- a/components/admin_console/brand_image_setting/brand_image_setting.test.jsx +++ b/components/admin_console/brand_image_setting/brand_image_setting.test.jsx @@ -24,7 +24,7 @@ describe('components/admin_console/brand_image_setting', () => { test('should have called deleteBrandImage or uploadBrandImage on save depending on component state', () => { const wrapper = shallow( - + , ); const instance = wrapper.instance(); diff --git a/components/admin_console/brand_image_setting/upload_button.test.jsx b/components/admin_console/brand_image_setting/upload_button.test.jsx index 633e12cde468..d4b4e07c36fe 100644 --- a/components/admin_console/brand_image_setting/upload_button.test.jsx +++ b/components/admin_console/brand_image_setting/upload_button.test.jsx @@ -17,7 +17,7 @@ describe('components/admin_console/brand_image_setting/UploadButton', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -36,7 +36,7 @@ describe('components/admin_console/brand_image_setting/UploadButton', () => { const onClick = jest.fn(); const props = {...baseProps, onClick}; const wrapper = shallow( - + , ); wrapper.find('button').first().simulate('click'); diff --git a/components/admin_console/cluster_table_container.jsx b/components/admin_console/cluster_table_container.jsx index e3413b2796ad..8f6664604e98 100644 --- a/components/admin_console/cluster_table_container.jsx +++ b/components/admin_console/cluster_table_container.jsx @@ -26,7 +26,7 @@ export default class ClusterTableContainer extends React.Component { clusterInfos: data, }); }, - null + null, ); } diff --git a/components/admin_console/color_setting.test.tsx b/components/admin_console/color_setting.test.tsx index 9d8a925a864f..8072a3e7e01c 100644 --- a/components/admin_console/color_setting.test.tsx +++ b/components/admin_console/color_setting.test.tsx @@ -18,7 +18,7 @@ describe('components/ColorSetting', () => { value='#fff' onChange={emptyFunction} disabled={false} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -33,7 +33,7 @@ describe('components/ColorSetting', () => { value='#fff' onChange={emptyFunction} disabled={false} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -48,7 +48,7 @@ describe('components/ColorSetting', () => { value='#fff' onChange={emptyFunction} disabled={true} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -64,7 +64,7 @@ describe('components/ColorSetting', () => { value='#fff' onChange={emptyFunction} disabled={false} - /> + />, ); wrapper.find('.picker-id').first().simulate('click'); expect(wrapper).toMatchSnapshot(); diff --git a/components/admin_console/compliance_reports/compliance_reports.jsx b/components/admin_console/compliance_reports/compliance_reports.jsx index 0fd987d1085a..dc46a932c36a 100644 --- a/components/admin_console/compliance_reports/compliance_reports.jsx +++ b/components/admin_console/compliance_reports/compliance_reports.jsx @@ -69,7 +69,7 @@ export default class ComplianceReports extends React.PureComponent { } this.props.actions.getComplianceReports().then( - () => this.setState({loadingReports: false}) + () => this.setState({loadingReports: false}), ); } @@ -77,7 +77,7 @@ export default class ComplianceReports extends React.PureComponent { this.setState({loadingReports: true}); this.props.actions.getComplianceReports().then( - () => this.setState({loadingReports: false}) + () => this.setState({loadingReports: false}), ); } @@ -104,7 +104,7 @@ export default class ComplianceReports extends React.PureComponent { } this.setState({runningReport: false}); this.props.actions.getComplianceReports(); - } + }, ); } diff --git a/components/admin_console/compliance_reports/index.js b/components/admin_console/compliance_reports/index.js index 4f0c3087b621..ccc0a3733ec4 100644 --- a/components/admin_console/compliance_reports/index.js +++ b/components/admin_console/compliance_reports/index.js @@ -23,7 +23,7 @@ const getUsersForReports = createSelector( } }); return usersMap; - } + }, ); function mapStateToProps(state) { diff --git a/components/admin_console/custom_enable_disable_guest_accounts_setting.test.tsx b/components/admin_console/custom_enable_disable_guest_accounts_setting.test.tsx index f00863b86ff8..d90984ba93bc 100644 --- a/components/admin_console/custom_enable_disable_guest_accounts_setting.test.tsx +++ b/components/admin_console/custom_enable_disable_guest_accounts_setting.test.tsx @@ -35,7 +35,7 @@ describe('components/AdminConsole/CustomEnableDisableGuestAccountsSetting', () = }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -47,7 +47,7 @@ describe('components/AdminConsole/CustomEnableDisableGuestAccountsSetting', () = }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -62,7 +62,7 @@ describe('components/AdminConsole/CustomEnableDisableGuestAccountsSetting', () = }; const wrapper = shallow( - + , ); wrapper.instance().handleChange('MySetting', true); @@ -77,7 +77,7 @@ describe('components/AdminConsole/CustomEnableDisableGuestAccountsSetting', () = }; const wrapper = shallow( - + , ); wrapper.instance().handleChange('MySetting', false); @@ -92,7 +92,7 @@ describe('components/AdminConsole/CustomEnableDisableGuestAccountsSetting', () = }; const wrapper = shallow( - + , ); wrapper.instance().handleChange('MySetting', false, true); diff --git a/components/admin_console/custom_plugin_settings/custom_plugin_settings.test.jsx b/components/admin_console/custom_plugin_settings/custom_plugin_settings.test.jsx index f657908db914..e5c140f15fa1 100644 --- a/components/admin_console/custom_plugin_settings/custom_plugin_settings.test.jsx +++ b/components/admin_console/custom_plugin_settings/custom_plugin_settings.test.jsx @@ -116,7 +116,7 @@ describe('components/admin_console/CustomPluginSettings', () => { config={config} schema={{...plugin.settings_schema, id: plugin.id, name: plugin.name, translate: false, settings}} updateConfig={jest.fn()} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -131,7 +131,7 @@ describe('components/admin_console/CustomPluginSettings', () => { translate: false, }} updateConfig={jest.fn()} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -149,7 +149,7 @@ describe('components/admin_console/CustomPluginSettings', () => { }} schema={{...plugin.settings_schema, id: plugin.id, name: plugin.name, translate: false, settings}} updateConfig={jest.fn()} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/custom_plugin_settings/index.js b/components/admin_console/custom_plugin_settings/index.js index aab3a6d1a34a..366c31b404af 100644 --- a/components/admin_console/custom_plugin_settings/index.js +++ b/components/admin_console/custom_plugin_settings/index.js @@ -73,7 +73,7 @@ function makeGetPluginSchema() { settings, translate: Boolean(plugin.translate), }; - } + }, ); } diff --git a/components/admin_console/custom_terms_of_service_settings/custom_terms_of_service_settings.test.jsx b/components/admin_console/custom_terms_of_service_settings/custom_terms_of_service_settings.test.jsx index d5e43bb81e64..53ce82768d44 100644 --- a/components/admin_console/custom_terms_of_service_settings/custom_terms_of_service_settings.test.jsx +++ b/components/admin_console/custom_terms_of_service_settings/custom_terms_of_service_settings.test.jsx @@ -29,7 +29,7 @@ describe('components/admin_console/CustomTermsOfServiceSettings', () => { const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); diff --git a/components/admin_console/custom_url_schemes_setting.jsx b/components/admin_console/custom_url_schemes_setting.jsx index 337a0f1a494f..ea4ef6a63dde 100644 --- a/components/admin_console/custom_url_schemes_setting.jsx +++ b/components/admin_console/custom_url_schemes_setting.jsx @@ -52,7 +52,7 @@ export default class CustomUrlSchemesSetting extends React.Component { const label = Utils.localizeMessage('admin.customization.customUrlSchemes', 'Custom URL Schemes:'); const helpText = Utils.localizeMessage( 'admin.customization.customUrlSchemesDesc', - 'Allows message text to link if it begins with any of the comma-separated URL schemes listed. By default, the following schemes will create links: "http", "https", "ftp", "tel", and "mailto".' + 'Allows message text to link if it begins with any of the comma-separated URL schemes listed. By default, the following schemes will create links: "http", "https", "ftp", "tel", and "mailto".', ); return ( diff --git a/components/admin_console/custom_url_schemes_setting.test.jsx b/components/admin_console/custom_url_schemes_setting.test.jsx index 2a493b532031..8bc282953751 100644 --- a/components/admin_console/custom_url_schemes_setting.test.jsx +++ b/components/admin_console/custom_url_schemes_setting.test.jsx @@ -24,7 +24,7 @@ describe('components/AdminConsole/CustomUrlSchemeSetting', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -38,7 +38,7 @@ describe('components/AdminConsole/CustomUrlSchemeSetting', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -52,7 +52,7 @@ describe('components/AdminConsole/CustomUrlSchemeSetting', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -68,7 +68,7 @@ describe('components/AdminConsole/CustomUrlSchemeSetting', () => { }; const wrapper = shallow( - + , ); wrapper.find(LocalizedInput).simulate('change', {target: {value: ''}}); @@ -83,7 +83,7 @@ describe('components/AdminConsole/CustomUrlSchemeSetting', () => { }; const wrapper = shallow( - + , ); wrapper.find(LocalizedInput).simulate('change', {target: {value: ' steam '}}); @@ -98,7 +98,7 @@ describe('components/AdminConsole/CustomUrlSchemeSetting', () => { }; const wrapper = shallow( - + , ); wrapper.find(LocalizedInput).simulate('change', {target: {value: 'steam, git'}}); @@ -113,7 +113,7 @@ describe('components/AdminConsole/CustomUrlSchemeSetting', () => { }; const wrapper = shallow( - + , ); wrapper.find(LocalizedInput).simulate('change', {target: {value: 'ts3server, smtp, ms-excel'}}); @@ -128,7 +128,7 @@ describe('components/AdminConsole/CustomUrlSchemeSetting', () => { }; const wrapper = shallow( - + , ); wrapper.find(LocalizedInput).simulate('change', {target: {value: ',,,,,chrome,,,,ms-excel,,'}}); @@ -144,7 +144,7 @@ describe('components/AdminConsole/CustomUrlSchemeSetting', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -156,7 +156,7 @@ describe('components/AdminConsole/CustomUrlSchemeSetting', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/data_grid/data_grid.test.tsx b/components/admin_console/data_grid/data_grid.test.tsx index 91be69ff8eec..df53caf70406 100644 --- a/components/admin_console/data_grid/data_grid.test.tsx +++ b/components/admin_console/data_grid/data_grid.test.tsx @@ -27,7 +27,7 @@ describe('components/admin_console/data_grid/DataGrid', () => { const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -37,7 +37,7 @@ describe('components/admin_console/data_grid/DataGrid', () => { + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -55,7 +55,7 @@ describe('components/admin_console/data_grid/DataGrid', () => { {name: 'Name', field: 'name', width: 3, overflow: 'hidden'}, {name: 'Team', field: 'team', textAlign: 'center'}, ]} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/data_retention_settings.jsx b/components/admin_console/data_retention_settings.jsx index abc5c8de6a50..06811f196cbd 100644 --- a/components/admin_console/data_retention_settings.jsx +++ b/components/admin_console/data_retention_settings.jsx @@ -74,14 +74,14 @@ export default class DataRetentionSettings extends AdminSettings { ), }} - /> + />, ); } else { messageList.push( + />, ); } @@ -97,14 +97,14 @@ export default class DataRetentionSettings extends AdminSettings { ), }} - /> + />, ); } else { messageList.push( + />, ); } diff --git a/components/admin_console/dropdown_setting.jsx b/components/admin_console/dropdown_setting.jsx index ad7b4d61c6ba..2cc9218154ed 100644 --- a/components/admin_console/dropdown_setting.jsx +++ b/components/admin_console/dropdown_setting.jsx @@ -35,7 +35,7 @@ export default class DropdownSetting extends React.Component { key={value} > {text} - + , ); } diff --git a/components/admin_console/elasticsearch_settings.jsx b/components/admin_console/elasticsearch_settings.jsx index 669d1ee45c05..bddb3781f7fa 100644 --- a/components/admin_console/elasticsearch_settings.jsx +++ b/components/admin_console/elasticsearch_settings.jsx @@ -107,7 +107,7 @@ export default class ElasticsearchSettings extends AdminSettings { canSave: false, }); error(err); - } + }, ); } diff --git a/components/admin_console/elasticsearch_settings.test.jsx b/components/admin_console/elasticsearch_settings.test.jsx index 85976f1f0bec..2cb6d9218a4b 100644 --- a/components/admin_console/elasticsearch_settings.test.jsx +++ b/components/admin_console/elasticsearch_settings.test.jsx @@ -26,12 +26,12 @@ describe('components/ElasticSearchSettings', () => { EnableIndexing: false, EnableSearching: false, EnableAutocomplete: false, - } + }, }; const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -47,12 +47,12 @@ describe('components/ElasticSearchSettings', () => { EnableIndexing: true, EnableSearching: false, EnableAutocomplete: false, - } + }, }; const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -68,12 +68,12 @@ describe('components/ElasticSearchSettings', () => { EnableIndexing: false, EnableSearching: false, EnableAutocomplete: false, - } + }, }; const wrapper = shallow( + />, ); expect(wrapper.find(SaveButton).prop('disabled')).toBe(true); wrapper.instance().handleSettingChanged('enableIndexing', true); diff --git a/components/admin_console/feature_discovery/feature_discovery.test.tsx b/components/admin_console/feature_discovery/feature_discovery.test.tsx index 0421b021ba6b..c4f52549c01c 100644 --- a/components/admin_console/feature_discovery/feature_discovery.test.tsx +++ b/components/admin_console/feature_discovery/feature_discovery.test.tsx @@ -18,7 +18,7 @@ describe('components/feature_discovery', () => { primaryURL='https://test.mattermost.com/primary/' secondaryURL='https://test.mattermost.com/secondary/' imgPath='foo/bar.png' - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/group_settings/group_details/group_details.jsx b/components/admin_console/group_settings/group_details/group_details.jsx index 084e1a2db86d..fd7c701af2fb 100644 --- a/components/admin_console/group_settings/group_details/group_details.jsx +++ b/components/admin_console/group_settings/group_details/group_details.jsx @@ -141,7 +141,7 @@ export default class GroupDetails extends React.PureComponent { this.setState({ saveNeeded, allowReference, - hasAllowReferenceChanged: allowReference !== originalAllowReference} + hasAllowReferenceChanged: allowReference !== originalAllowReference}, ); this.props.actions.setNavigationBlocked(saveNeeded); } @@ -155,7 +155,7 @@ export default class GroupDetails extends React.PureComponent { this.setState({ saveNeeded, groupMentionName, - hasGroupMentionNameChanged: groupMentionName !== originalGroupMentionName + hasGroupMentionNameChanged: groupMentionName !== originalGroupMentionName, }); this.props.actions.setNavigationBlocked(saveNeeded); } diff --git a/components/admin_console/group_settings/group_details/group_details.test.jsx b/components/admin_console/group_settings/group_details/group_details.test.jsx index cb93d704feb8..d9c4c794160b 100644 --- a/components/admin_console/group_settings/group_details/group_details.test.jsx +++ b/components/admin_console/group_settings/group_details/group_details.test.jsx @@ -83,7 +83,7 @@ describe('components/admin_console/group_settings/group_details/GroupDetails', ( + />, ); expect(actions.getGroupSyncables).toBeCalledWith('xxxxxxxxxxxxxxxxxxxxxxxxxx', 'team'); expect(actions.getGroupSyncables).toBeCalledWith('xxxxxxxxxxxxxxxxxxxxxxxxxx', 'channel'); @@ -106,7 +106,7 @@ describe('components/admin_console/group_settings/group_details/GroupDetails', ( + />, ); const instance = wrapper.instance(); await instance.addChannels([{id: '11111111111111111111111111'}, {id: '22222222222222222222222222'}]); @@ -132,7 +132,7 @@ describe('components/admin_console/group_settings/group_details/GroupDetails', ( + />, ); const instance = wrapper.instance(); await instance.addTeams([{id: '11111111111111111111111111'}, {id: '22222222222222222222222222'}]); diff --git a/components/admin_console/group_settings/group_details/group_teams_and_channels.test.jsx b/components/admin_console/group_settings/group_details/group_teams_and_channels.test.jsx index ef8be7e05176..c168f463d4c4 100644 --- a/components/admin_console/group_settings/group_details/group_teams_and_channels.test.jsx +++ b/components/admin_console/group_settings/group_details/group_teams_and_channels.test.jsx @@ -63,7 +63,7 @@ describe('components/admin_console/group_settings/group_details/GroupTeamsAndCha + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -73,7 +73,7 @@ describe('components/admin_console/group_settings/group_details/GroupTeamsAndCha + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -85,7 +85,7 @@ describe('components/admin_console/group_settings/group_details/GroupTeamsAndCha teams={[]} channels={[]} loading={true} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -97,7 +97,7 @@ describe('components/admin_console/group_settings/group_details/GroupTeamsAndCha teams={[]} channels={[]} loading={false} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -123,7 +123,7 @@ describe('components/admin_console/group_settings/group_details/GroupTeamsAndCha {...defaultProps} unlink={unlink} getGroupSyncables={getGroupSyncables} - /> + />, ); const instance = wrapper.instance(); await instance.onRemoveItem('11111111111111111111111111', 'public-team'); diff --git a/components/admin_console/group_settings/group_details/group_teams_and_channels_row.test.jsx b/components/admin_console/group_settings/group_details/group_teams_and_channels_row.test.jsx index e7d13b3fdd13..b088df0bc620 100644 --- a/components/admin_console/group_settings/group_details/group_teams_and_channels_row.test.jsx +++ b/components/admin_console/group_settings/group_details/group_teams_and_channels_row.test.jsx @@ -19,7 +19,7 @@ describe('components/admin_console/group_settings/group_details/GroupTeamsAndCha onRemoveItem={jest.fn()} onToggleCollapse={jest.fn()} onChangeRoles={jest.fn()} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -35,7 +35,7 @@ describe('components/admin_console/group_settings/group_details/GroupTeamsAndCha onRemoveItem={jest.fn()} onToggleCollapse={jest.fn()} onChangeRoles={jest.fn()} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -51,7 +51,7 @@ describe('components/admin_console/group_settings/group_details/GroupTeamsAndCha onRemoveItem={jest.fn()} onToggleCollapse={jest.fn()} onChangeRoles={jest.fn()} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -68,7 +68,7 @@ describe('components/admin_console/group_settings/group_details/GroupTeamsAndCha onRemoveItem={jest.fn()} onToggleCollapse={onToggleCollapse} onChangeRoles={jest.fn()} - /> + />, ); wrapper.find('.fa-caret-right').simulate('click'); expect(onToggleCollapse).toBeCalledWith('xxxxxxxxxxxxxxxxxxxxxxxxxx'); @@ -86,7 +86,7 @@ describe('components/admin_console/group_settings/group_details/GroupTeamsAndCha onRemoveItem={onRemoveItem} onToggleCollapse={jest.fn()} onChangeRoles={jest.fn()} - /> + />, ); wrapper.find('.btn-link').simulate('click'); expect(wrapper.instance().state.showConfirmationModal).toEqual(true); diff --git a/components/admin_console/group_settings/group_details/group_users.test.jsx b/components/admin_console/group_settings/group_details/group_users.test.jsx index 6012fc90d549..9f34ddbb7107 100644 --- a/components/admin_console/group_settings/group_details/group_users.test.jsx +++ b/components/admin_console/group_settings/group_details/group_users.test.jsx @@ -27,7 +27,7 @@ describe('components/admin_console/group_settings/group_details/GroupUsers', () + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -42,7 +42,7 @@ describe('components/admin_console/group_settings/group_details/GroupUsers', () + />, ); wrapper.setState({loading: false}); expect(wrapper).toMatchSnapshot(); @@ -65,7 +65,7 @@ describe('components/admin_console/group_settings/group_details/GroupUsers', () + />, ); // First page @@ -87,7 +87,7 @@ describe('components/admin_console/group_settings/group_details/GroupUsers', () + />, ); wrapper.instance().componentDidMount(); expect(getMembers).toBeCalledWith('xxxxxxxxxxxxxxxxxxxxxxxxxx', 0, 20); @@ -100,7 +100,7 @@ describe('components/admin_console/group_settings/group_details/GroupUsers', () {...defaultProps} getMembers={getMembers} total={55} - /> + />, ); const instance = wrapper.instance(); getMembers.mockClear(); @@ -125,7 +125,7 @@ describe('components/admin_console/group_settings/group_details/GroupUsers', () {...defaultProps} getMembers={getMembers} total={55} - /> + />, ); const instance = wrapper.instance(); getMembers.mockClear(); diff --git a/components/admin_console/group_settings/group_details/group_users_row.test.jsx b/components/admin_console/group_settings/group_details/group_users_row.test.jsx index cde141652b89..709901dc1af9 100644 --- a/components/admin_console/group_settings/group_details/group_users_row.test.jsx +++ b/components/admin_console/group_settings/group_details/group_users_row.test.jsx @@ -15,7 +15,7 @@ describe('components/admin_console/group_settings/group_details/GroupUsersRow', email='test@test.com' userId='xxxxxxxxxxxxxxxxxxxxxxxxxx' lastPictureUpdate={0} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/group_settings/group_details/index.jsx b/components/admin_console/group_settings/group_details/index.jsx index ceff8e3b47ce..e7687f811831 100644 --- a/components/admin_console/group_settings/group_details/index.jsx +++ b/components/admin_console/group_settings/group_details/index.jsx @@ -11,7 +11,7 @@ import { getGroupMembers as fetchMembers, getGroupSyncables as fetchGroupSyncables, patchGroupSyncable, - patchGroup + patchGroup, } from 'mattermost-redux/actions/groups'; import {getGroup, getGroupTeams, getGroupChannels, getGroupMembers, getGroupMemberCount} from 'mattermost-redux/selectors/entities/groups'; diff --git a/components/admin_console/group_settings/group_row.test.jsx b/components/admin_console/group_settings/group_row.test.jsx index 6942a6cfd7c7..408d3326da96 100644 --- a/components/admin_console/group_settings/group_row.test.jsx +++ b/components/admin_console/group_settings/group_row.test.jsx @@ -21,7 +21,7 @@ describe('components/admin_console/group_settings/GroupRow', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -40,7 +40,7 @@ describe('components/admin_console/group_settings/GroupRow', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -59,7 +59,7 @@ describe('components/admin_console/group_settings/GroupRow', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -78,7 +78,7 @@ describe('components/admin_console/group_settings/GroupRow', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -97,7 +97,7 @@ describe('components/admin_console/group_settings/GroupRow', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -116,7 +116,7 @@ describe('components/admin_console/group_settings/GroupRow', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -136,7 +136,7 @@ describe('components/admin_console/group_settings/GroupRow', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); wrapper.instance().onRowClick(); @@ -158,7 +158,7 @@ describe('components/admin_console/group_settings/GroupRow', () => { link, unlink: jest.fn(), }} - /> + />, ); await wrapper.instance().linkHandler({stopPropagation: jest.fn(), preventDefault: jest.fn()}); @@ -181,7 +181,7 @@ describe('components/admin_console/group_settings/GroupRow', () => { link: jest.fn(), unlink, }} - /> + />, ); await wrapper.instance().unlinkHandler({stopPropagation: jest.fn(), preventDefault: jest.fn()}); diff --git a/components/admin_console/group_settings/group_settings.test.jsx b/components/admin_console/group_settings/group_settings.test.jsx index d66598cd92a7..7e07e9056d7c 100644 --- a/components/admin_console/group_settings/group_settings.test.jsx +++ b/components/admin_console/group_settings/group_settings.test.jsx @@ -9,7 +9,7 @@ import GroupSettings from 'components/admin_console/group_settings/group_setting describe('components/admin_console/group_settings/GroupSettings', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/group_settings/groups_list/groups_list.test.tsx b/components/admin_console/group_settings/groups_list/groups_list.test.tsx index 66e0a72fdf02..0a316aaa61db 100644 --- a/components/admin_console/group_settings/groups_list/groups_list.test.tsx +++ b/components/admin_console/group_settings/groups_list/groups_list.test.tsx @@ -17,7 +17,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); wrapper.setState({loading: true}); expect(wrapper).toMatchSnapshot(); @@ -36,7 +36,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); wrapper.setState({checked: {test2: true}}); expect(wrapper).toMatchSnapshot(); @@ -55,7 +55,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); wrapper.setState({checked: {test1: true}}); expect(wrapper).toMatchSnapshot(); @@ -74,7 +74,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); wrapper.setState({checked: {test1: true, test2: true}}); expect(wrapper).toMatchSnapshot(); @@ -93,7 +93,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); wrapper.setState({checked: {}}); expect(wrapper).toMatchSnapshot(); @@ -112,7 +112,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); const instance = wrapper.instance(); expect(wrapper.state().checked).toEqual({}); @@ -140,7 +140,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link, unlink: jest.fn(), }} - /> + />, ); const instance = wrapper.instance(); expect(wrapper.state().checked).toEqual({}); @@ -167,7 +167,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link: jest.fn(), unlink, }} - /> + />, ); const instance = wrapper.instance(); expect(wrapper.state().checked).toEqual({}); @@ -188,7 +188,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); wrapper.setState({loading: false}); expect(wrapper).toMatchSnapshot(); @@ -208,7 +208,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); wrapper.setState({loading: false}); expect(wrapper).toMatchSnapshot(); @@ -235,7 +235,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); wrapper.setState({page: 1, loading: false}); expect(wrapper).toMatchSnapshot(); @@ -262,7 +262,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); wrapper.setState({loading: false}); expect(wrapper).toMatchSnapshot(); @@ -282,7 +282,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); wrapper.setState({page: 1, loading: false}); expect(wrapper).toMatchSnapshot(); @@ -303,7 +303,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); wrapper.setState({page: 1, checked: {test1: true, test2: true}}); @@ -330,7 +330,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); wrapper.setState({page: 0, checked: {test1: true, test2: true}}); @@ -364,7 +364,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); wrapper.setState({page: 0, checked: {test1: true, test2: true}}); @@ -385,7 +385,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); wrapper.setState({showFilters: true, filterIsLinked: true, filterIsUnlinked: true}); expect(wrapper).toMatchSnapshot(); @@ -401,7 +401,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); wrapper.setState({searchString: 'foo'}); wrapper.find('i.fa-times-circle').first().simulate('click'); @@ -418,7 +418,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); expect(wrapper.state().showFilters).toEqual(false); wrapper.find('i.fa-caret-down').first().simulate('click'); @@ -436,7 +436,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); wrapper.setState({showFilters: true, searchString: 'foo iS:ConfiGuReD is:notlinked'}); expect(wrapper.state().filterIsConfigured).toEqual(false); @@ -460,7 +460,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); wrapper.setState({showFilters: true, searchString: 'foo'}); wrapper.find('span.filter-check').first().simulate('click'); @@ -478,7 +478,7 @@ describe('components/admin_console/group_settings/GroupsList.tsx', () => { link: jest.fn(), unlink: jest.fn(), }} - /> + />, ); wrapper.setState({showFilters: true, searchString: 'foo is:linked', filterIsLinked: true}); wrapper.find('span.filter-check').first().simulate('click'); diff --git a/components/admin_console/group_settings/groups_list/index.ts b/components/admin_console/group_settings/groups_list/index.ts index c2a1ccd6a11d..cfffaab8833d 100644 --- a/components/admin_console/group_settings/groups_list/index.ts +++ b/components/admin_console/group_settings/groups_list/index.ts @@ -19,7 +19,7 @@ const getSortedListOfLdapGroups = createSelector( const groups = Object.values(ldapGroups); groups.sort((a, b) => a.name.localeCompare(b.name)); return groups; - } + }, ); function mapStateToProps(state: GlobalState) { diff --git a/components/admin_console/jobs/table.jsx b/components/admin_console/jobs/table.jsx index 3c9e0cd950ab..dda37067e90c 100644 --- a/components/admin_console/jobs/table.jsx +++ b/components/admin_console/jobs/table.jsx @@ -65,7 +65,7 @@ class JobTable extends React.PureComponent { componentDidMount() { this.props.actions.getJobsByType(this.props.jobType).then( - () => this.setState({loading: false}) + () => this.setState({loading: false}), ); this.interval = setInterval(this.reload, 15000); @@ -272,7 +272,7 @@ class JobTable extends React.PureComponent { this.setState({ loading: false, }); - } + }, ); }; diff --git a/components/admin_console/jobs/table.test.jsx b/components/admin_console/jobs/table.test.jsx index 7df34af30dad..c08549222e30 100644 --- a/components/admin_console/jobs/table.test.jsx +++ b/components/admin_console/jobs/table.test.jsx @@ -84,7 +84,7 @@ describe('components/admin_console/jobs/table', () => { test('should call create job func', () => { const wrapper = shallowWithIntl( - + , ); wrapper.find('.job-table__create-button > div > .btn-default').simulate('click', {preventDefault: jest.fn()}); @@ -93,7 +93,7 @@ describe('components/admin_console/jobs/table', () => { test('should call cancel job func', () => { const wrapper = shallowWithIntl( - + , ); wrapper.find('.job-table__cancel-button').first().simulate('click', {preventDefault: jest.fn(), currentTarget: {getAttribute: () => '1234'}}); diff --git a/components/admin_console/manage_roles_modal/manage_roles_modal.tsx b/components/admin_console/manage_roles_modal/manage_roles_modal.tsx index eef551ddbeef..fa4d86676f87 100644 --- a/components/admin_console/manage_roles_modal/manage_roles_modal.tsx +++ b/components/admin_console/manage_roles_modal/manage_roles_modal.tsx @@ -141,7 +141,7 @@ export default class ManageRolesModal extends React.PureComponent + />, ); } } diff --git a/components/admin_console/manage_teams_modal/manage_teams_dropdown.test.jsx b/components/admin_console/manage_teams_modal/manage_teams_dropdown.test.jsx index ba258a65e31f..4c608a08cb65 100644 --- a/components/admin_console/manage_teams_modal/manage_teams_dropdown.test.jsx +++ b/components/admin_console/manage_teams_modal/manage_teams_dropdown.test.jsx @@ -32,7 +32,7 @@ describe('ManageTeamsDropdown', () => { test('should match snapshot for team member', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -50,7 +50,7 @@ describe('ManageTeamsDropdown', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -74,7 +74,7 @@ describe('ManageTeamsDropdown', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -97,7 +97,7 @@ describe('ManageTeamsDropdown', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/admin_console/manage_teams_modal/manage_teams_modal.test.jsx b/components/admin_console/manage_teams_modal/manage_teams_modal.test.jsx index 78625f20fa36..bf068dec5ff0 100644 --- a/components/admin_console/manage_teams_modal/manage_teams_modal.test.jsx +++ b/components/admin_console/manage_teams_modal/manage_teams_modal.test.jsx @@ -29,7 +29,7 @@ describe('ManageTeamsModal', () => { test('should match snapshot init', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -37,7 +37,7 @@ describe('ManageTeamsModal', () => { test('should call api calls on mount', () => { shallow( - + , ); expect(baseProps.actions.getTeamMembersForUser).toHaveBeenCalledTimes(1); @@ -67,7 +67,7 @@ describe('ManageTeamsModal', () => { }; const wrapper = shallow( - + , ); process.nextTick(() => { diff --git a/components/admin_console/manage_teams_modal/remove_from_team_button.test.jsx b/components/admin_console/manage_teams_modal/remove_from_team_button.test.jsx index e2114d28275e..4b194247041d 100644 --- a/components/admin_console/manage_teams_modal/remove_from_team_button.test.jsx +++ b/components/admin_console/manage_teams_modal/remove_from_team_button.test.jsx @@ -14,7 +14,7 @@ describe('RemoveFromTeamButton', () => { test('should match snapshot init', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -22,7 +22,7 @@ describe('RemoveFromTeamButton', () => { test('should call handleRemoveUserFromTeam on button click', () => { const wrapper = shallow( - + , ); wrapper.find('button').prop('onClick')({preventDefault: jest.fn()}); expect(baseProps.handleRemoveUserFromTeam).toHaveBeenCalledTimes(1); diff --git a/components/admin_console/message_export_settings.jsx b/components/admin_console/message_export_settings.jsx index bb38b6a2f6f4..482d880ffe03 100644 --- a/components/admin_console/message_export_settings.jsx +++ b/components/admin_console/message_export_settings.jsx @@ -67,7 +67,7 @@ export default class MessageExportSettings extends AdminSettings { values={{ count: job.data.messages_exported, }} - /> + />, ); } if (job.data.warning_count > 0) { @@ -80,7 +80,7 @@ export default class MessageExportSettings extends AdminSettings { count: job.data.warning_count, }} /> -
+ , ); } return message; diff --git a/components/admin_console/message_export_settings.test.jsx b/components/admin_console/message_export_settings.test.jsx index 37776860f701..9c3f10a7953c 100644 --- a/components/admin_console/message_export_settings.test.jsx +++ b/components/admin_console/message_export_settings.test.jsx @@ -21,7 +21,7 @@ describe('components/MessageExportSettings', () => { const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); @@ -52,7 +52,7 @@ describe('components/MessageExportSettings', () => { const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); @@ -89,7 +89,7 @@ describe('components/MessageExportSettings', () => { const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); @@ -133,7 +133,7 @@ describe('components/MessageExportSettings', () => { const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); diff --git a/components/admin_console/permission_schemes_settings/guest_permissions_tree/guest_permissions_tree.test.jsx b/components/admin_console/permission_schemes_settings/guest_permissions_tree/guest_permissions_tree.test.jsx index d26e3e9a9c88..aeeb251d6aa7 100644 --- a/components/admin_console/permission_schemes_settings/guest_permissions_tree/guest_permissions_tree.test.jsx +++ b/components/admin_console/permission_schemes_settings/guest_permissions_tree/guest_permissions_tree.test.jsx @@ -34,7 +34,7 @@ describe('components/admin_console/permission_schemes_settings/permission_tree', test('should match snapshot on default data', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -44,7 +44,7 @@ describe('components/admin_console/permission_schemes_settings/permission_tree', + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -54,7 +54,7 @@ describe('components/admin_console/permission_schemes_settings/permission_tree', + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -64,7 +64,7 @@ describe('components/admin_console/permission_schemes_settings/permission_tree', + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -75,7 +75,7 @@ describe('components/admin_console/permission_schemes_settings/permission_tree', {...defaultProps} parentRole={{permissions: 'invite_user'}} scope={'system_scope'} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -86,7 +86,7 @@ describe('components/admin_console/permission_schemes_settings/permission_tree', + />, ); wrapper.find(PermissionGroup).first().prop('onChange')(['test_permission', 'test_permission2']); expect(onToggle).toBeCalledWith('test', ['test_permission', 'test_permission2']); @@ -103,7 +103,7 @@ describe('components/admin_console/permission_schemes_settings/permission_tree', EnableCommands: 'false', EnableCustomEmoji: 'false', }} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -113,7 +113,7 @@ describe('components/admin_console/permission_schemes_settings/permission_tree', + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/permission_schemes_settings/permission_checkbox.test.jsx b/components/admin_console/permission_schemes_settings/permission_checkbox.test.jsx index 3c271faded80..97b5b8582796 100644 --- a/components/admin_console/permission_schemes_settings/permission_checkbox.test.jsx +++ b/components/admin_console/permission_schemes_settings/permission_checkbox.test.jsx @@ -9,14 +9,14 @@ import PermissionCheckbox from 'components/admin_console/permission_schemes_sett describe('components/admin_console/permission_schemes_settings/permission_checkbox', () => { test('should match snapshot on no value', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); test('should match snapshot on value "checked" and no id', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -26,7 +26,7 @@ describe('components/admin_console/permission_schemes_settings/permission_checkb + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -36,7 +36,7 @@ describe('components/admin_console/permission_schemes_settings/permission_checkb + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -46,7 +46,7 @@ describe('components/admin_console/permission_schemes_settings/permission_checkb + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/permission_schemes_settings/permission_group.test.jsx b/components/admin_console/permission_schemes_settings/permission_group.test.jsx index ef7a2f1fa212..29417cc8ea91 100644 --- a/components/admin_console/permission_schemes_settings/permission_group.test.jsx +++ b/components/admin_console/permission_schemes_settings/permission_group.test.jsx @@ -24,7 +24,7 @@ describe('components/admin_console/permission_schemes_settings/permission_group' test('should match snapshot on editable without permissions', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -34,7 +34,7 @@ describe('components/admin_console/permission_schemes_settings/permission_group' + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -44,7 +44,7 @@ describe('components/admin_console/permission_schemes_settings/permission_group' + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -54,7 +54,7 @@ describe('components/admin_console/permission_schemes_settings/permission_group' + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -64,7 +64,7 @@ describe('components/admin_console/permission_schemes_settings/permission_group' + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -75,7 +75,7 @@ describe('components/admin_console/permission_schemes_settings/permission_group' {...defaultProps} role={{permissions: ['invite_user']}} readOnly={true} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -86,7 +86,7 @@ describe('components/admin_console/permission_schemes_settings/permission_group' {...defaultProps} role={{permissions: ['invite_user', 'add_user_to_team']}} readOnly={true} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -96,7 +96,7 @@ describe('components/admin_console/permission_schemes_settings/permission_group' + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -106,14 +106,14 @@ describe('components/admin_console/permission_schemes_settings/permission_group' + />, ); expect(wrapper).toMatchSnapshot(); }); test('should expand and collapse correctly, expanded by default, collapsed and then expanded again', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); wrapper.find('.permission-arrow').first().simulate('click', {stopPropagation: jest.fn()}); @@ -128,7 +128,7 @@ describe('components/admin_console/permission_schemes_settings/permission_group' + />, ); wrapper.find('.permission-group-row').first().simulate('click'); expect(onChange).toBeCalledWith(['invite_user', 'add_user_to_team']); @@ -141,7 +141,7 @@ describe('components/admin_console/permission_schemes_settings/permission_group' {...defaultProps} role={{permissions: ['invite_user']}} onChange={onChange} - /> + />, ); wrapper.find('.permission-group-row').first().simulate('click'); expect(onChange).toBeCalledWith(['add_user_to_team']); @@ -154,7 +154,7 @@ describe('components/admin_console/permission_schemes_settings/permission_group' {...defaultProps} role={{permissions: ['invite_user', 'add_user_to_team']}} onChange={onChange} - /> + />, ); wrapper.find('.permission-group-row').first().simulate('click'); expect(onChange).toBeCalledWith(['invite_user', 'add_user_to_team']); @@ -167,7 +167,7 @@ describe('components/admin_console/permission_schemes_settings/permission_group' {...defaultProps} readOnly={true} onChange={onChange} - /> + />, ); wrapper.find('.permission-group-row').first().simulate('click'); expect(onChange).not.toBeCalled(); @@ -180,7 +180,7 @@ describe('components/admin_console/permission_schemes_settings/permission_group' {...defaultProps} readOnly={true} onChange={onChange} - /> + />, ); wrapper.find('.permission-group-row').first().simulate('click'); expect(onChange).not.toBeCalled(); @@ -191,7 +191,7 @@ describe('components/admin_console/permission_schemes_settings/permission_group' + />, ); expect(wrapper.state().expanded).toBe(true); wrapper.instance().toggleSelectGroup(); @@ -201,7 +201,7 @@ describe('components/admin_console/permission_schemes_settings/permission_group' + />, ); wrapper.setState({expanded: false}); wrapper.instance().toggleSelectGroup(); @@ -211,7 +211,7 @@ describe('components/admin_console/permission_schemes_settings/permission_group' + />, ); wrapper.setState({expanded: false, prevPermissions: ['invite_user']}); wrapper.instance().toggleSelectGroup(); @@ -225,7 +225,7 @@ describe('components/admin_console/permission_schemes_settings/permission_group' {...defaultProps} role={{permissions: ['invite_user']}} onChange={onChange} - /> + />, ); wrapper.setState({prevPermissions: ['invite_user']}); wrapper.instance().toggleSelectGroup(); @@ -237,7 +237,7 @@ describe('components/admin_console/permission_schemes_settings/permission_group' {...defaultProps} role={{permissions: ['invite_user', 'add_user_to_team']}} onChange={onChange} - /> + />, ); wrapper.setState({prevPermissions: ['invite_user']}); wrapper.instance().toggleSelectGroup(); @@ -249,7 +249,7 @@ describe('components/admin_console/permission_schemes_settings/permission_group' {...defaultProps} role={{permissions: []}} onChange={onChange} - /> + />, ); wrapper.setState({prevPermissions: ['invite_user']}); wrapper.instance().toggleSelectGroup(); diff --git a/components/admin_console/permission_schemes_settings/permission_row.test.jsx b/components/admin_console/permission_schemes_settings/permission_row.test.jsx index c6e3d05c9954..7dd962440be5 100644 --- a/components/admin_console/permission_schemes_settings/permission_row.test.jsx +++ b/components/admin_console/permission_schemes_settings/permission_row.test.jsx @@ -19,7 +19,7 @@ describe('components/admin_console/permission_schemes_settings/permission_row', test('should match snapshot on editable and not inherited', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -29,7 +29,7 @@ describe('components/admin_console/permission_schemes_settings/permission_row', + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -39,7 +39,7 @@ describe('components/admin_console/permission_schemes_settings/permission_row', + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -49,7 +49,7 @@ describe('components/admin_console/permission_schemes_settings/permission_row', + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -60,7 +60,7 @@ describe('components/admin_console/permission_schemes_settings/permission_row', + />, ); wrapper.find('div').first().simulate('click'); expect(onChange).toBeCalledWith('id'); @@ -73,7 +73,7 @@ describe('components/admin_console/permission_schemes_settings/permission_row', {...defaultProps} readOnly={true} onChange={onChange} - /> + />, ); wrapper.find('div').first().simulate('click'); expect(onChange).not.toBeCalled(); diff --git a/components/admin_console/permission_schemes_settings/permission_schemes_settings.jsx b/components/admin_console/permission_schemes_settings/permission_schemes_settings.jsx index a8d749be49d7..daf2d0c4c6d0 100644 --- a/components/admin_console/permission_schemes_settings/permission_schemes_settings.jsx +++ b/components/admin_console/permission_schemes_settings/permission_schemes_settings.jsx @@ -104,7 +104,7 @@ export default class PermissionSchemesSettings extends React.PureComponent { return this.teamOverrideUnavalableView( t('admin.permissions.teamOverrideSchemesInProgress'), 'Migration job in progress: Team Override Schemes are not available until the job server completes the permissions migration. Learn more in the {documentationLink}.', - docLink + docLink, ); } diff --git a/components/admin_console/permission_schemes_settings/permission_schemes_settings.test.jsx b/components/admin_console/permission_schemes_settings/permission_schemes_settings.test.jsx index cda90b6bec71..c258aef68b21 100644 --- a/components/admin_console/permission_schemes_settings/permission_schemes_settings.test.jsx +++ b/components/admin_console/permission_schemes_settings/permission_schemes_settings.test.jsx @@ -25,7 +25,7 @@ describe('components/admin_console/permission_schemes_settings/permission_scheme }; test('should match snapshot loading', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -35,7 +35,7 @@ describe('components/admin_console/permission_schemes_settings/permission_scheme + />, ); wrapper.setState({loading: false, phase2MigrationIsComplete: true}); expect(wrapper).toMatchSnapshot(); @@ -43,7 +43,7 @@ describe('components/admin_console/permission_schemes_settings/permission_scheme test('should match snapshot with schemes', () => { const wrapper = shallow( - + , ); wrapper.setState({loading: false, phase2MigrationIsComplete: true}); expect(wrapper).toMatchSnapshot(); @@ -51,7 +51,7 @@ describe('components/admin_console/permission_schemes_settings/permission_scheme test('should show migration in-progress view', () => { const wrapper = shallow( - + , ); wrapper.setState({loading: false, phase2MigrationIsComplete: false}); expect(wrapper).toMatchSnapshot(); @@ -61,7 +61,7 @@ describe('components/admin_console/permission_schemes_settings/permission_scheme const testProps = {...defaultProps}; testProps.jobsAreEnabled = false; const wrapper = shallow( - + , ); wrapper.setState({loading: false, phase2MigrationIsComplete: false}); expect(wrapper).toMatchSnapshot(); @@ -71,7 +71,7 @@ describe('components/admin_console/permission_schemes_settings/permission_scheme const testProps = {...defaultProps}; testProps.jobsAreEnabled = false; const wrapper = shallow( - + , ); wrapper.setState({loading: false, phase2MigrationIsComplete: true}); expect(wrapper).toMatchSnapshot(); diff --git a/components/admin_console/permission_schemes_settings/permission_system_scheme_settings/permission_system_scheme_settings.test.jsx b/components/admin_console/permission_schemes_settings/permission_system_scheme_settings/permission_system_scheme_settings.test.jsx index d36745e72548..b17fcbc68f10 100644 --- a/components/admin_console/permission_schemes_settings/permission_system_scheme_settings/permission_system_scheme_settings.test.jsx +++ b/components/admin_console/permission_schemes_settings/permission_system_scheme_settings/permission_system_scheme_settings.test.jsx @@ -56,7 +56,7 @@ describe('components/admin_console/permission_schemes_settings/permission_system test('should match snapshot on roles without permissions', (done) => { const wrapper = shallow( - + , ); defaultProps.actions.loadRolesIfNeeded().then(() => { expect(wrapper.state()).toMatchSnapshot(); @@ -73,7 +73,7 @@ describe('components/admin_console/permission_schemes_settings/permission_system + />, ); defaultProps.actions.loadRolesIfNeeded().then(() => { expect(wrapper).toMatchSnapshot(); @@ -115,7 +115,7 @@ describe('components/admin_console/permission_schemes_settings/permission_system + />, ); expect(wrapper).toMatchSnapshot(); @@ -131,7 +131,7 @@ describe('components/admin_console/permission_schemes_settings/permission_system + />, ); expect(wrapper).toMatchSnapshot(); @@ -152,7 +152,7 @@ describe('components/admin_console/permission_schemes_settings/permission_system {...defaultProps} license={license} actions={{...defaultProps.actions, editRole}} - /> + />, ); expect(wrapper).toMatchSnapshot(); @@ -166,7 +166,7 @@ describe('components/admin_console/permission_schemes_settings/permission_system {...defaultProps} license={license} actions={{...defaultProps.actions, editRole}} - /> + />, ); expect(wrapper2).toMatchSnapshot(); @@ -181,7 +181,7 @@ describe('components/admin_console/permission_schemes_settings/permission_system + />, ); await wrapper.instance().handleSubmit(); @@ -190,7 +190,7 @@ describe('components/admin_console/permission_schemes_settings/permission_system test('should open and close correctly roles blocks', () => { const wrapper = shallow( - + , ); const instance = wrapper.instance(); expect(wrapper.state().openRoles.all_users).toBe(true); @@ -220,7 +220,7 @@ describe('components/admin_console/permission_schemes_settings/permission_system test('should open modal on click reset defaults', () => { const wrapper = shallow( - + , ); expect(wrapper.state().showResetDefaultModal).toBe(false); wrapper.find('.reset-defaults-btn').first().simulate('click'); @@ -229,7 +229,7 @@ describe('components/admin_console/permission_schemes_settings/permission_system test('should have default permissions that match the defaults constant', () => { const wrapper = shallow( - + , ); expect(wrapper.state().roles.all_users.permissions.length).toBe(0); expect(wrapper.state().roles.channel_admin.permissions.length).toBe(0); diff --git a/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/permission_team_scheme_settings.jsx b/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/permission_team_scheme_settings.jsx index ad5cfe6e53d1..b271bd3edbcd 100644 --- a/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/permission_team_scheme_settings.jsx +++ b/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/permission_team_scheme_settings.jsx @@ -276,12 +276,12 @@ export default class PermissionTeamSchemeSettings extends React.Component { let derived = this.deriveRolesFromAllUsers( roles.team_user, roles.channel_user, - allUsers + allUsers, ); derived = this.restoreExcludedPermissions( roles.team_user, roles.channel_user, - derived + derived, ); teamUser = derived.team_user; channelUser = derived.channel_user; @@ -289,12 +289,12 @@ export default class PermissionTeamSchemeSettings extends React.Component { let derivedGuests = this.deriveRolesFromGuests( roles.team_guest, roles.channel_guest, - guests + guests, ); derivedGuests = this.restoreGuestPermissions( roles.team_guest, roles.channel_guest, - derivedGuests + derivedGuests, ); teamGuest = derivedGuests.team_guest; channelGuest = derivedGuests.channel_guest; diff --git a/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/permission_team_scheme_settings.test.jsx b/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/permission_team_scheme_settings.test.jsx index 39a7f8ac8643..d4f322a249cf 100644 --- a/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/permission_team_scheme_settings.test.jsx +++ b/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/permission_team_scheme_settings.test.jsx @@ -83,7 +83,7 @@ describe('components/admin_console/permission_schemes_settings/permission_team_s test('should match snapshot on new with default roles without permissions', (done) => { const wrapper = shallow( - + , ); defaultProps.actions.loadRolesIfNeeded().then(() => { expect(wrapper.instance().getStateRoles()).toMatchSnapshot(); @@ -125,7 +125,7 @@ describe('components/admin_console/permission_schemes_settings/permission_team_s + />, ); expect(wrapper).toMatchSnapshot(); @@ -153,7 +153,7 @@ describe('components/admin_console/permission_schemes_settings/permission_team_s + />, ); expect(wrapper).toMatchSnapshot(); @@ -169,7 +169,7 @@ describe('components/admin_console/permission_schemes_settings/permission_team_s + />, ); await wrapper.instance().handleSubmit(); @@ -194,7 +194,7 @@ describe('components/admin_console/permission_schemes_settings/permission_team_s + />, ); await wrapper.instance().handleSubmit(); @@ -203,7 +203,7 @@ describe('components/admin_console/permission_schemes_settings/permission_team_s test('should open and close correctly roles blocks', () => { const wrapper = shallow( - + , ); const instance = wrapper.instance(); expect(wrapper.state().openRoles.guests).toBe(true); @@ -250,7 +250,7 @@ describe('components/admin_console/permission_schemes_settings/permission_team_s }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); defaultProps.actions.loadRolesIfNeeded().then(() => { @@ -301,7 +301,7 @@ describe('components/admin_console/permission_schemes_settings/permission_team_s }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); defaultProps.actions.loadRolesIfNeeded().then(() => { @@ -332,7 +332,7 @@ describe('components/admin_console/permission_schemes_settings/permission_team_s }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); defaultProps.actions.loadRolesIfNeeded().then(() => { @@ -363,7 +363,7 @@ describe('components/admin_console/permission_schemes_settings/permission_team_s }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); defaultProps.actions.loadRolesIfNeeded().then(() => { diff --git a/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/team_in_list/team_in_list.test.jsx b/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/team_in_list/team_in_list.test.jsx index c918598042c8..730d2d267760 100644 --- a/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/team_in_list/team_in_list.test.jsx +++ b/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/team_in_list/team_in_list.test.jsx @@ -11,12 +11,12 @@ describe('components/admin_console/permission_schemes_settings/permission_team_s const props = { team: { id: 12345, - display_name: 'testTeam' - } + display_name: 'testTeam', + }, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/permission_schemes_settings/permissions_scheme_summary/permissions_scheme_summary.test.jsx b/components/admin_console/permission_schemes_settings/permissions_scheme_summary/permissions_scheme_summary.test.jsx index ec833a5af04c..61e6d38e9a5b 100644 --- a/components/admin_console/permission_schemes_settings/permissions_scheme_summary/permissions_scheme_summary.test.jsx +++ b/components/admin_console/permission_schemes_settings/permissions_scheme_summary/permissions_scheme_summary.test.jsx @@ -27,7 +27,7 @@ describe('components/admin_console/permission_schemes_settings/permissions_schem test('should match snapshot on default data', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -48,7 +48,7 @@ describe('components/admin_console/permission_schemes_settings/permissions_schem {id: 'iii', name: 'team-9', display_name: 'Team 9'}, {id: 'jjj', name: 'team-9', display_name: 'Team 10'}, ]} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -58,7 +58,7 @@ describe('components/admin_console/permission_schemes_settings/permissions_schem + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -71,7 +71,7 @@ describe('components/admin_console/permission_schemes_settings/permissions_schem actions={{ deleteScheme, }} - /> + />, ); expect(deleteScheme).not.toBeCalled(); wrapper.find('.delete-button').first().simulate('click', {stopPropagation: jest.fn()}); diff --git a/components/admin_console/permission_schemes_settings/permissions_tree/permissions_tree.test.jsx b/components/admin_console/permission_schemes_settings/permissions_tree/permissions_tree.test.jsx index 4f4ff39450bb..cf47d7c1cd8e 100644 --- a/components/admin_console/permission_schemes_settings/permissions_tree/permissions_tree.test.jsx +++ b/components/admin_console/permission_schemes_settings/permissions_tree/permissions_tree.test.jsx @@ -34,7 +34,7 @@ describe('components/admin_console/permission_schemes_settings/permission_tree', test('should match snapshot on default data', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -44,7 +44,7 @@ describe('components/admin_console/permission_schemes_settings/permission_tree', + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -54,7 +54,7 @@ describe('components/admin_console/permission_schemes_settings/permission_tree', + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -64,7 +64,7 @@ describe('components/admin_console/permission_schemes_settings/permission_tree', + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -74,7 +74,7 @@ describe('components/admin_console/permission_schemes_settings/permission_tree', + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -85,7 +85,7 @@ describe('components/admin_console/permission_schemes_settings/permission_tree', {...defaultProps} parentRole={{permissions: 'invite_user'}} scope={'system_scope'} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -96,7 +96,7 @@ describe('components/admin_console/permission_schemes_settings/permission_tree', + />, ); wrapper.find(PermissionGroup).first().prop('onChange')(['test_permission', 'test_permission2']); expect(onToggle).toBeCalledWith('test', ['test_permission', 'test_permission2']); @@ -113,7 +113,7 @@ describe('components/admin_console/permission_schemes_settings/permission_tree', EnableCommands: 'false', EnableCustomEmoji: 'false', }} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/plugin_management/plugin_management.jsx b/components/admin_console/plugin_management/plugin_management.jsx index 374450ef8702..b5ef6345ef90 100644 --- a/components/admin_console/plugin_management/plugin_management.jsx +++ b/components/admin_console/plugin_management/plugin_management.jsx @@ -268,7 +268,7 @@ const PluginItem = ({ id='admin.plugin.multiple_versions_warning' defaultMessage='There are multiple versions of this plugin installed across your cluster. Re-install this plugin to ensure it works consistently.' /> - + , ); } @@ -276,7 +276,7 @@ const PluginItem = ({ + />, ); const instances = pluginStatus.instances.slice(); @@ -445,7 +445,7 @@ export default class PluginManagement extends AdminSettings { componentDidMount() { if (this.state.enable) { this.props.actions.getPluginStatuses().then( - () => this.setState({loading: false}) + () => this.setState({loading: false}), ); } } diff --git a/components/admin_console/radio_setting.test.tsx b/components/admin_console/radio_setting.test.tsx index 45496159e6b9..259d967ad0d9 100644 --- a/components/admin_console/radio_setting.test.tsx +++ b/components/admin_console/radio_setting.test.tsx @@ -21,7 +21,7 @@ describe('components/admin_console/RadioSetting', () => { value={'Sales'} onChange={onChange} setByEnv={false} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -40,7 +40,7 @@ describe('components/admin_console/RadioSetting', () => { value={'Sales'} onChange={onChange} setByEnv={false} - /> + />, ); wrapper.find('input').at(0).simulate('change', {target: {value: 'Administration'}}); diff --git a/components/admin_console/radio_setting.tsx b/components/admin_console/radio_setting.tsx index 86fde1beae0d..52ee3d56ca9a 100644 --- a/components/admin_console/radio_setting.tsx +++ b/components/admin_console/radio_setting.tsx @@ -43,7 +43,7 @@ export default class RadioSetting extends React.Component { /> {text} - + , ); } diff --git a/components/admin_console/request_button/request_button.jsx b/components/admin_console/request_button/request_button.jsx index 16e0ce803176..c46b4e2a7b76 100644 --- a/components/admin_console/request_button/request_button.jsx +++ b/components/admin_console/request_button/request_button.jsx @@ -183,7 +183,7 @@ export default class RequestButton extends React.Component { busy: false, fail: errMsg, }); - } + }, ); }; diff --git a/components/admin_console/request_button/request_button.test.jsx b/components/admin_console/request_button/request_button.test.jsx index 0d6cbad216db..264b01096a0b 100644 --- a/components/admin_console/request_button/request_button.test.jsx +++ b/components/admin_console/request_button/request_button.test.jsx @@ -27,7 +27,7 @@ describe('components/admin_console/request_button/request_button.jsx', () => { defaultMessage='Button Text' /> } - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -53,7 +53,7 @@ describe('components/admin_console/request_button/request_button.jsx', () => { } saveNeeded={false} saveConfigAction={saveConfigActionSuccess} - /> + />, ); wrapper.find('button').first().simulate('click'); @@ -83,7 +83,7 @@ describe('components/admin_console/request_button/request_button.jsx', () => { } saveNeeded={true} saveConfigAction={saveConfigActionSuccess} - /> + />, ); wrapper.find('button').first().simulate('click'); @@ -116,7 +116,7 @@ describe('components/admin_console/request_button/request_button.jsx', () => { id: 'success.message', defaultMessage: 'Success Message', }} - /> + />, ); wrapper1.find('button').first().simulate('click'); @@ -143,7 +143,7 @@ describe('components/admin_console/request_button/request_button.jsx', () => { id: 'success.message', defaultMessage: 'Success Message', }} - /> + />, ); wrapper2.find('button').first().simulate('click'); @@ -178,7 +178,7 @@ describe('components/admin_console/request_button/request_button.jsx', () => { id: 'error.message', defaultMessage: 'Error Message: {error}', }} - /> + />, ); wrapper1.find('button').first().simulate('click'); @@ -204,7 +204,7 @@ describe('components/admin_console/request_button/request_button.jsx', () => { id: 'error.message', defaultMessage: 'Error Message: {error}', }} - /> + />, ); wrapper2.find('button').first().simulate('click'); diff --git a/components/admin_console/reset_email_modal/reset_email_modal.jsx b/components/admin_console/reset_email_modal/reset_email_modal.jsx index 5d99829a7b08..dd644dedeedb 100644 --- a/components/admin_console/reset_email_modal/reset_email_modal.jsx +++ b/components/admin_console/reset_email_modal/reset_email_modal.jsx @@ -62,7 +62,7 @@ export default class ResetEmailModal extends React.Component { (err) => { const serverError = err.message ? err.message : err; this.setState({error: serverError}); - } + }, ); } diff --git a/components/admin_console/reset_password_modal/reset_password_modal.test.tsx b/components/admin_console/reset_password_modal/reset_password_modal.test.tsx index 8ec802d4aeaa..9f45c6048441 100644 --- a/components/admin_console/reset_password_modal/reset_password_modal.test.tsx +++ b/components/admin_console/reset_password_modal/reset_password_modal.test.tsx @@ -23,7 +23,7 @@ describe('components/admin_console/reset_password_modal/reset_password_modal.tsx mark_unread: 'all', mention_keys: '', push: 'default', - push_status: 'ooo' + push_status: 'ooo', }; const user: UserProfile = { auth_data: '', @@ -65,7 +65,7 @@ describe('components/admin_console/reset_password_modal/reset_password_modal.tsx test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -73,7 +73,7 @@ describe('components/admin_console/reset_password_modal/reset_password_modal.tsx test('should match snapshot when there is no user', () => { const props = {...baseProps, user: undefined}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/schema_admin_settings.test.jsx b/components/admin_console/schema_admin_settings.test.jsx index 582f30fddc23..83bde73acf37 100644 --- a/components/admin_console/schema_admin_settings.test.jsx +++ b/components/admin_console/schema_admin_settings.test.jsx @@ -248,7 +248,7 @@ describe('components/admin_console/SchemaAdminSettings', () => { environmentConfig={environmentConfig} schema={{...schema}} updateConfig={jest.fn()} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -260,7 +260,7 @@ describe('components/admin_console/SchemaAdminSettings', () => { environmentConfig={environmentConfig} schema={{component: () =>

{'Test'}

}} updateConfig={jest.fn()} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -323,7 +323,7 @@ describe('components/admin_console/SchemaAdminSettings', () => { + />, )).toEqual(true); }); }); diff --git a/components/admin_console/server_logs/log_list.jsx b/components/admin_console/server_logs/log_list.jsx index e1ce858b25cf..10a39ca7ba1f 100644 --- a/components/admin_console/server_logs/log_list.jsx +++ b/components/admin_console/server_logs/log_list.jsx @@ -125,7 +125,7 @@ export default class Logs extends React.PureComponent { style={style} > {this.props.logs[i]} - + , ); } diff --git a/components/admin_console/server_logs/logs.jsx b/components/admin_console/server_logs/logs.jsx index 67bb0c838077..dca4b4368164 100644 --- a/components/admin_console/server_logs/logs.jsx +++ b/components/admin_console/server_logs/logs.jsx @@ -40,14 +40,14 @@ export default class Logs extends React.Component { componentDidMount() { this.props.actions.getLogs(this.state.page, this.state.perPage).then( - () => this.setState({loadingLogs: false}) + () => this.setState({loadingLogs: false}), ); } componentDidUpdate(prevProps, prevState) { if (this.state.page !== prevState.page) { this.props.actions.getLogs(this.state.page, this.state.perPage).then( - () => this.setState({loadingLogs: false}) + () => this.setState({loadingLogs: false}), ); } } @@ -63,7 +63,7 @@ export default class Logs extends React.Component { reload = () => { this.setState({loadingLogs: true}); this.props.actions.getLogs(this.state.page, this.state.perPage).then( - () => this.setState({loadingLogs: false}) + () => this.setState({loadingLogs: false}), ); } diff --git a/components/admin_console/system_user_detail/system_user_detail.jsx b/components/admin_console/system_user_detail/system_user_detail.jsx index 40ed5a21393d..d45935686c3e 100644 --- a/components/admin_console/system_user_detail/system_user_detail.jsx +++ b/components/admin_console/system_user_detail/system_user_detail.jsx @@ -179,7 +179,7 @@ export default class SystemUserDetail extends React.PureComponent { (err) => { const serverError = err.message ? err.message : err; this.setState({serverError}); - } + }, ); this.setState({ diff --git a/components/admin_console/system_user_detail/team_list/abstract_list.test.tsx b/components/admin_console/system_user_detail/team_list/abstract_list.test.tsx index 5b88dcfff940..4f23c95301ce 100644 --- a/components/admin_console/system_user_detail/team_list/abstract_list.test.tsx +++ b/components/admin_console/system_user_detail/team_list/abstract_list.test.tsx @@ -99,7 +99,7 @@ describe('admin_console/system_user_detail/team_list/AbstractList', () => { {...props} data={teamsWithMemberships} total={2} - /> + />, ); wrapper.setState({loading: false}); expect(wrapper).toMatchSnapshot(); @@ -120,7 +120,7 @@ describe('admin_console/system_user_detail/team_list/AbstractList', () => { {...props} data={moreTeams} total={30} - /> + />, ); wrapper.setState({loading: false}); expect(wrapper).toMatchSnapshot(); @@ -141,7 +141,7 @@ describe('admin_console/system_user_detail/team_list/AbstractList', () => { {...props} data={moreTeams} total={30} - /> + />, ); wrapper.setState({ loading: false, diff --git a/components/admin_console/system_user_detail/team_list/team_list.test.tsx b/components/admin_console/system_user_detail/team_list/team_list.test.tsx index 74eb68b9f87d..c5eba4690654 100644 --- a/components/admin_console/system_user_detail/team_list/team_list.test.tsx +++ b/components/admin_console/system_user_detail/team_list/team_list.test.tsx @@ -46,7 +46,7 @@ describe('admin_console/system_user_detail/team_list/TeamList', () => { const wrapper = shallow( + />, ); wrapper.setState({teamsWithMemberships}); expect(wrapper).toMatchSnapshot(); diff --git a/components/admin_console/system_users/list/system_users_list.jsx b/components/admin_console/system_users/list/system_users_list.jsx index d90236e545cf..a76834e747eb 100644 --- a/components/admin_console/system_users/list/system_users_list.jsx +++ b/components/admin_console/system_users/list/system_users_list.jsx @@ -206,7 +206,7 @@ export default class SystemUsersList extends React.Component { values={{ service, }} - /> + />, ); } else { info.push( @@ -214,7 +214,7 @@ export default class SystemUsersList extends React.Component { key='admin.user_item.authServiceEmail' id='admin.user_item.authServiceEmail' defaultMessage='**Sign-in Method:** Email' - /> + />, ); } @@ -228,7 +228,7 @@ export default class SystemUsersList extends React.Component { values={{ userID, }} - /> + />, ); if (this.props.mfaEnabled) { @@ -240,7 +240,7 @@ export default class SystemUsersList extends React.Component { key='admin.user_item.mfaYes' id='admin.user_item.mfaYes' defaultMessage='**MFA**: Yes' - /> + />, ); } else { info.push( @@ -248,7 +248,7 @@ export default class SystemUsersList extends React.Component { key='admin.user_item.mfaNo' id='admin.user_item.mfaNo' defaultMessage='**MFA**: No' - /> + />, ); } } diff --git a/components/admin_console/system_users/list/system_users_list.test.jsx b/components/admin_console/system_users/list/system_users_list.test.jsx index 4df7f348222f..28ebe8570a1d 100644 --- a/components/admin_console/system_users/list/system_users_list.test.jsx +++ b/components/admin_console/system_users/list/system_users_list.test.jsx @@ -56,7 +56,7 @@ describe('components/admin_console/system_users/list', () => { + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -66,7 +66,7 @@ describe('components/admin_console/system_users/list', () => { + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -75,7 +75,7 @@ describe('components/admin_console/system_users/list', () => { describe('should reset page', () => { it('when team changes', () => { const wrapper = shallow( - + , ); expect(wrapper.state('page')).toBe(0); @@ -87,7 +87,7 @@ describe('components/admin_console/system_users/list', () => { it('when filter changes', () => { const wrapper = shallow( - + , ); expect(wrapper.state('page')).toBe(0); @@ -101,7 +101,7 @@ describe('components/admin_console/system_users/list', () => { describe('should not reset page', () => { it('when term changes', () => { const wrapper = shallow( - + , ); expect(wrapper.state('page')).toBe(0); diff --git a/components/admin_console/team_channel_settings/abstract_list.jsx b/components/admin_console/team_channel_settings/abstract_list.jsx index 1dda1a6ae962..bcb28504dc18 100644 --- a/components/admin_console/team_channel_settings/abstract_list.jsx +++ b/components/admin_console/team_channel_settings/abstract_list.jsx @@ -124,7 +124,7 @@ export default class AbstractList extends React.PureComponent { 'groups-list-no-padding', { 'groups-list-less-padding': noPadding, - } + }, )} > {this.renderHeader()} diff --git a/components/admin_console/team_channel_settings/channel/channel_settings.test.jsx b/components/admin_console/team_channel_settings/channel/channel_settings.test.jsx index 233f29990716..179228e00a04 100644 --- a/components/admin_console/team_channel_settings/channel/channel_settings.test.jsx +++ b/components/admin_console/team_channel_settings/channel/channel_settings.test.jsx @@ -11,7 +11,7 @@ describe('admin_console/team_channel_settings/channel/ChannelSettings', () => { const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/team_channel_settings/channel/details/channel_details.test.tsx b/components/admin_console/team_channel_settings/channel/details/channel_details.test.tsx index 36540648f1e4..928a28881361 100644 --- a/components/admin_console/team_channel_settings/channel/details/channel_details.test.tsx +++ b/components/admin_console/team_channel_settings/channel/details/channel_details.test.tsx @@ -107,7 +107,7 @@ describe('admin_console/team_channel_settings/channel/ChannelDetails', () => { channelID={testChannel.id} allGroups={allGroups} {...additionalProps} - /> + />, ); expect(wrapper).toMatchSnapshot(); @@ -122,7 +122,7 @@ describe('admin_console/team_channel_settings/channel/ChannelDetails', () => { channelID={testChannel.id} allGroups={allGroups} {...additionalProps} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/team_channel_settings/channel/details/channel_details.tsx b/components/admin_console/team_channel_settings/channel/details/channel_details.tsx index a6cac821f319..dc0399c951ff 100644 --- a/components/admin_console/team_channel_settings/channel/details/channel_details.tsx +++ b/components/admin_console/team_channel_settings/channel/details/channel_details.tsx @@ -120,7 +120,7 @@ export default class ChannelDetails extends React.Component actions.getChannel(channelID)). - then(() => this.setState({groups: this.props.groups})) + then(() => this.setState({groups: this.props.groups})), ); actionsToAwait.push(actions.getChannelModerations(channelID).then(() => this.restrictChannelMentions())); } @@ -154,7 +154,7 @@ export default class ChannelDetails extends React.Component this.setState({teamScheme: this.props.teamScheme})) + then(() => this.setState({teamScheme: this.props.teamScheme})), ); } @@ -175,8 +175,8 @@ export default class ChannelDetails extends React.Component this.processGroupsChange(this.state.groups) + () => this.processGroupsChange(this.state.groups), ); this.props.actions.setNavigationBlocked(true); }; @@ -271,8 +271,8 @@ export default class ChannelDetails extends React.Component 0) { @@ -368,16 +368,16 @@ export default class ChannelDetails extends React.Component { channel={testChannel} totalGroups={1} setNewGroupRole={jest.fn()} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/team_channel_settings/channel/details/channel_members/channel_members.test.tsx b/components/admin_console/team_channel_settings/channel/details/channel_members/channel_members.test.tsx index 9a7a6ff19395..a6b065088fb6 100644 --- a/components/admin_console/team_channel_settings/channel/details/channel_members/channel_members.test.tsx +++ b/components/admin_console/team_channel_settings/channel/details/channel_members/channel_members.test.tsx @@ -42,12 +42,12 @@ describe('admin_console/team_channel_settings/channel/ChannelMembers', () => { loadProfilesAndReloadChannelMembers: jest.fn(), searchProfilesAndChannelMembers: jest.fn(), setModalSearchTerm: jest.fn(), - } + }, }; test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -60,7 +60,7 @@ describe('admin_console/team_channel_settings/channel/ChannelMembers', () => { channelMembers={{}} totalCount={0} loading={true} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/team_channel_settings/channel/details/channel_members/channel_members.tsx b/components/admin_console/team_channel_settings/channel/details/channel_members/channel_members.tsx index 0176f96aa7f4..edcd80089e68 100644 --- a/components/admin_console/team_channel_settings/channel/details/channel_members/channel_members.tsx +++ b/components/admin_console/team_channel_settings/channel/details/channel_members/channel_members.tsx @@ -102,7 +102,7 @@ export default class ChannelMembers extends React.PureComponent { } this.setStateLoading(false); }, - Constants.SEARCH_TIMEOUT_MILLISECONDS + Constants.SEARCH_TIMEOUT_MILLISECONDS, ); this.searchTimeoutId = searchTimeoutId; diff --git a/components/admin_console/team_channel_settings/channel/details/channel_moderation.test.tsx b/components/admin_console/team_channel_settings/channel/details/channel_moderation.test.tsx index 27a01e7d7ab5..374c6d3afe76 100644 --- a/components/admin_console/team_channel_settings/channel/details/channel_moderation.test.tsx +++ b/components/admin_console/team_channel_settings/channel/details/channel_moderation.test.tsx @@ -35,7 +35,7 @@ describe('admin_console/team_channel_settings/channel/ChannelModeration', () => teamSchemeID={teamSchemeID} teamSchemeDisplayName={teamSchemeDisplayName} guestAccountsEnabled={true} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -52,7 +52,7 @@ describe('admin_console/team_channel_settings/channel/ChannelModeration', () => onClick={onChannelPermissionsChanged} errorMessages={jest.fn().mockResolvedValue([])} guestAccountsEnabled={true} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -84,7 +84,7 @@ describe('admin_console/team_channel_settings/channel/ChannelModeration', () => enabled: false, }, }, - } + }, ]; const wrapper = shallow( teamSchemeID={teamSchemeID} teamSchemeDisplayName={teamSchemeDisplayName} guestAccountsEnabled={true} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -125,7 +125,7 @@ describe('admin_console/team_channel_settings/channel/ChannelModeration', () => enabled: false, }, }, - } + }, ]; const wrapper = shallow( teamSchemeID={teamSchemeID} teamSchemeDisplayName={teamSchemeDisplayName} guestAccountsEnabled={true} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -166,7 +166,7 @@ describe('admin_console/team_channel_settings/channel/ChannelModeration', () => enabled: false, }, }, - } + }, ]; const wrapper = shallow( teamSchemeID={teamSchemeID} teamSchemeDisplayName={teamSchemeDisplayName} guestAccountsEnabled={true} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -207,7 +207,7 @@ describe('admin_console/team_channel_settings/channel/ChannelModeration', () => enabled: false, }, }, - } + }, ]; const wrapper = shallow( teamSchemeID={teamSchemeID} teamSchemeDisplayName={teamSchemeDisplayName} guestAccountsEnabled={true} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -229,7 +229,7 @@ describe('admin_console/team_channel_settings/channel/ChannelModeration', () => teamSchemeID={undefined} teamSchemeDisplayName={undefined} guestAccountsEnabled={false} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -246,7 +246,7 @@ describe('admin_console/team_channel_settings/channel/ChannelModeration', () => onClick={onChannelPermissionsChanged} errorMessages={jest.fn().mockResolvedValue([])} guestAccountsEnabled={false} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -260,7 +260,7 @@ describe('admin_console/team_channel_settings/channel/ChannelModeration', () => teamSchemeID={teamSchemeID} teamSchemeDisplayName={teamSchemeDisplayName} guestAccountsEnabled={true} - /> + />, ); const instance: any = wrapper.instance(); const input: ChannelPermissions = channelPermissions[0]; @@ -278,7 +278,7 @@ describe('admin_console/team_channel_settings/channel/ChannelModeration', () => teamSchemeID={teamSchemeID} teamSchemeDisplayName={teamSchemeDisplayName} guestAccountsEnabled={true} - /> + />, ); const instance: any = wrapper.instance(); const input: ChannelPermissions = { @@ -306,7 +306,7 @@ describe('admin_console/team_channel_settings/channel/ChannelModeration', () => teamSchemeID={teamSchemeID} teamSchemeDisplayName={teamSchemeDisplayName} guestAccountsEnabled={true} - /> + />, ); const instance: any = wrapper.instance(); const input: ChannelPermissions = { @@ -334,7 +334,7 @@ describe('admin_console/team_channel_settings/channel/ChannelModeration', () => teamSchemeID={teamSchemeID} teamSchemeDisplayName={teamSchemeDisplayName} guestAccountsEnabled={true} - /> + />, ); const instance: any = wrapper.instance(); const input: ChannelPermissions = { @@ -381,7 +381,7 @@ describe('admin_console/team_channel_settings/channel/ChannelModeration', () => enabled: true, }, }, - } + }, ]; const wrapper = shallow( teamSchemeID={teamSchemeID} teamSchemeDisplayName={teamSchemeDisplayName} guestAccountsEnabled={true} - /> + />, ); const instance: any = wrapper.instance(); const input: ChannelPermissions = channelPermissionsCustom[1]; @@ -425,7 +425,7 @@ describe('admin_console/team_channel_settings/channel/ChannelModeration', () => enabled: false, }, }, - } + }, ]; const wrapper = shallow( teamSchemeID={teamSchemeID} teamSchemeDisplayName={teamSchemeDisplayName} guestAccountsEnabled={true} - /> + />, ); const instance: any = wrapper.instance(); const input: ChannelPermissions = channelPermissionsCustom[1]; @@ -469,7 +469,7 @@ describe('admin_console/team_channel_settings/channel/ChannelModeration', () => enabled: false, }, }, - } + }, ]; const wrapper = shallow( teamSchemeID={teamSchemeID} teamSchemeDisplayName={teamSchemeDisplayName} guestAccountsEnabled={true} - /> + />, ); const instance: any = wrapper.instance(); const input: ChannelPermissions = channelPermissionsCustom[1]; @@ -513,7 +513,7 @@ describe('admin_console/team_channel_settings/channel/ChannelModeration', () => enabled: false, }, }, - } + }, ]; const wrapper = shallow( teamSchemeID={teamSchemeID} teamSchemeDisplayName={teamSchemeDisplayName} guestAccountsEnabled={true} - /> + />, ); const instance: any = wrapper.instance(); const input: ChannelPermissions = channelPermissionsCustom[1]; @@ -557,7 +557,7 @@ describe('admin_console/team_channel_settings/channel/ChannelModeration', () => enabled: false, }, }, - } + }, ]; const wrapper = shallow( teamSchemeID={teamSchemeID} teamSchemeDisplayName={teamSchemeDisplayName} guestAccountsEnabled={true} - /> + />, ); const instance: any = wrapper.instance(); const input: ChannelPermissions = channelPermissionsCustom[1]; diff --git a/components/admin_console/team_channel_settings/channel/details/channel_moderation.tsx b/components/admin_console/team_channel_settings/channel/details/channel_moderation.tsx index 0d1990b8a448..dc78d5354a8b 100644 --- a/components/admin_console/team_channel_settings/channel/details/channel_moderation.tsx +++ b/components/admin_console/team_channel_settings/channel/details/channel_moderation.tsx @@ -23,117 +23,117 @@ const formattedMessages: any = defineMessages({ [Permissions.CHANNEL_MODERATED_PERMISSIONS.CREATE_POST]: { title: { id: t('admin.channel_settings.channel_moderation.createPosts'), - defaultMessage: 'Create Posts' + defaultMessage: 'Create Posts', }, description: { id: t('admin.channel_settings.channel_moderation.createPostsDesc'), - defaultMessage: 'The ability for members and guests to create posts in the channel.' + defaultMessage: 'The ability for members and guests to create posts in the channel.', }, descriptionMembers: { id: t('admin.channel_settings.channel_moderation.createPostsDescMembers'), - defaultMessage: 'The ability for members to create posts in the channel.' + defaultMessage: 'The ability for members to create posts in the channel.', }, disabledGuests: { id: t('admin.channel_settings.channel_moderation.createPosts.disabledGuest'), - defaultMessage: 'Create posts for guests are disabled in [{scheme_name}](../permissions/{scheme_link}).' + defaultMessage: 'Create posts for guests are disabled in [{scheme_name}](../permissions/{scheme_link}).', }, disabledMembers: { id: t('admin.channel_settings.channel_moderation.createPosts.disabledMember'), - defaultMessage: 'Create posts for members are disabled in [{scheme_name}](../permissions/{scheme_link}).' + defaultMessage: 'Create posts for members are disabled in [{scheme_name}](../permissions/{scheme_link}).', }, disabledBoth: { id: t('admin.channel_settings.channel_moderation.createPosts.disabledBoth'), - defaultMessage: 'Create posts for members and guests are disabled in [{scheme_name}](../permissions/{scheme_link}).' - } + defaultMessage: 'Create posts for members and guests are disabled in [{scheme_name}](../permissions/{scheme_link}).', + }, }, [Permissions.CHANNEL_MODERATED_PERMISSIONS.CREATE_REACTIONS]: { title: { id: t('admin.channel_settings.channel_moderation.postReactions'), - defaultMessage: 'Post Reactions' + defaultMessage: 'Post Reactions', }, description: { id: t('admin.channel_settings.channel_moderation.postReactionsDesc'), - defaultMessage: 'The ability for members and guests to post reactions.' + defaultMessage: 'The ability for members and guests to post reactions.', }, descriptionMembers: { id: t('admin.channel_settings.channel_moderation.postReactionsDescMembers'), - defaultMessage: 'The ability for members to post reactions.' + defaultMessage: 'The ability for members to post reactions.', }, disabledGuests: { id: t('admin.channel_settings.channel_moderation.postReactions.disabledGuest'), - defaultMessage: 'Post reactions for guests are disabled in [{scheme_name}](../permissions/{scheme_link}).' + defaultMessage: 'Post reactions for guests are disabled in [{scheme_name}](../permissions/{scheme_link}).', }, disabledMembers: { id: t('admin.channel_settings.channel_moderation.postReactions.disabledMember'), - defaultMessage: 'Post reactions for members are disabled in [{scheme_name}](../permissions/{scheme_link}).' + defaultMessage: 'Post reactions for members are disabled in [{scheme_name}](../permissions/{scheme_link}).', }, disabledBoth: { id: t('admin.channel_settings.channel_moderation.postReactions.disabledBoth'), - defaultMessage: 'Post reactions for members and guests are disabled in [{scheme_name}](../permissions/{scheme_link}).' - } + defaultMessage: 'Post reactions for members and guests are disabled in [{scheme_name}](../permissions/{scheme_link}).', + }, }, [Permissions.CHANNEL_MODERATED_PERMISSIONS.MANAGE_MEMBERS]: { title: { id: t('admin.channel_settings.channel_moderation.manageMembers'), - defaultMessage: 'Manage Members' + defaultMessage: 'Manage Members', }, description: { id: t('admin.channel_settings.channel_moderation.manageMembersDesc'), - defaultMessage: 'The ability for members to add and remove people.' + defaultMessage: 'The ability for members to add and remove people.', }, disabledGuests: { id: t('admin.channel_settings.channel_moderation.manageMembers.disabledGuest'), - defaultMessage: 'Manage members for guests are disabled in [{scheme_name}](../permissions/{scheme_link}).' + defaultMessage: 'Manage members for guests are disabled in [{scheme_name}](../permissions/{scheme_link}).', }, disabledMembers: { id: t('admin.channel_settings.channel_moderation.manageMembers.disabledMember'), - defaultMessage: 'Manage members for members are disabled in [{scheme_name}](../permissions/{scheme_link}).' + defaultMessage: 'Manage members for members are disabled in [{scheme_name}](../permissions/{scheme_link}).', }, disabledBoth: { id: t('admin.channel_settings.channel_moderation.manageMembers.disabledBoth'), - defaultMessage: 'Manage members for members and guests are disabled in [{scheme_name}](../permissions/{scheme_link}).' - } + defaultMessage: 'Manage members for members and guests are disabled in [{scheme_name}](../permissions/{scheme_link}).', + }, }, [Permissions.CHANNEL_MODERATED_PERMISSIONS.USE_CHANNEL_MENTIONS]: { title: { id: t('admin.channel_settings.channel_moderation.channelMentions'), - defaultMessage: 'Channel Mentions' + defaultMessage: 'Channel Mentions', }, description: { id: t('admin.channel_settings.channel_moderation.channelMentionsDesc'), - defaultMessage: 'The ability for members and guests to use @all, @here and @channel.' + defaultMessage: 'The ability for members and guests to use @all, @here and @channel.', }, descriptionMembers: { id: t('admin.channel_settings.channel_moderation.channelMentionsDescMembers'), - defaultMessage: 'The ability for members to use @all, @here and @channel.' + defaultMessage: 'The ability for members to use @all, @here and @channel.', }, disabledGuests: { id: t('admin.channel_settings.channel_moderation.channelMentions.disabledGuest'), - defaultMessage: 'Channel mentions for guests are disabled in [{scheme_name}](../permissions/{scheme_link}).' + defaultMessage: 'Channel mentions for guests are disabled in [{scheme_name}](../permissions/{scheme_link}).', }, disabledMembers: { id: t('admin.channel_settings.channel_moderation.channelMentions.disabledMember'), - defaultMessage: 'Channel mentions for members are disabled in [{scheme_name}](../permissions/{scheme_link}).' + defaultMessage: 'Channel mentions for members are disabled in [{scheme_name}](../permissions/{scheme_link}).', }, disabledBoth: { id: t('admin.channel_settings.channel_moderation.channelMentions.disabledBoth'), - defaultMessage: 'Channel mentions for members and guests are disabled in [{scheme_name}](../permissions/{scheme_link}).' + defaultMessage: 'Channel mentions for members and guests are disabled in [{scheme_name}](../permissions/{scheme_link}).', }, disabledGuestsDueToCreatePosts: { id: t('admin.channel_settings.channel_moderation.channelMentions.disabledGuestsDueToCreatePosts'), - defaultMessage: 'Guests can not use channel mentions without the ability to create posts.' + defaultMessage: 'Guests can not use channel mentions without the ability to create posts.', }, disabledMembersDueToCreatePosts: { id: t('admin.channel_settings.channel_moderation.channelMentions.disabledMemberDueToCreatePosts'), - defaultMessage: 'Members can not use channel mentions without the ability to create posts.' + defaultMessage: 'Members can not use channel mentions without the ability to create posts.', }, disabledBothDueToCreatePosts: { id: t('admin.channel_settings.channel_moderation.channelMentions.disabledBothDueToCreatePosts'), - defaultMessage: 'Guests and members can not use channel mentions without the ability to create posts.' - } + defaultMessage: 'Guests and members can not use channel mentions without the ability to create posts.', + }, }, title: { @@ -142,15 +142,15 @@ const formattedMessages: any = defineMessages({ }, subtitle: { id: t('admin.channel_settings.channel_moderation.subtitle'), - defaultMessage: 'Manage the actions available to channel members and guests.' + defaultMessage: 'Manage the actions available to channel members and guests.', }, subtitleMembers: { id: t('admin.channel_settings.channel_moderation.subtitleMembers'), - defaultMessage: 'Manage the actions available to channel members.' + defaultMessage: 'Manage the actions available to channel members.', }, permissions: { id: t('admin.channel_settings.channel_moderation.permissions'), - defaultMessage: 'Permissions' + defaultMessage: 'Permissions', }, guests: { id: t('admin.channel_settings.channel_moderation.guests'), @@ -159,7 +159,7 @@ const formattedMessages: any = defineMessages({ members: { id: t('admin.channel_settings.channel_moderation.members'), defaultMessage: 'Members', - } + }, }); interface Props { @@ -219,7 +219,7 @@ export const ChannelModerationTableRow: React.FunctionComponent = (pro { checked: props.guests && !props.guestsDisabled, disabled: props.guestsDisabled, - } + }, )} onClick={() => props.onClick(props.name, Roles.GUESTS as ChannelModerationRoles)} disabled={props.guestsDisabled} @@ -238,7 +238,7 @@ export const ChannelModerationTableRow: React.FunctionComponent = (pro { checked: props.members && !props.membersDisabled, disabled: props.membersDisabled, - } + }, )} onClick={() => props.onClick(props.name, Roles.MEMBERS as ChannelModerationRoles)} disabled={props.membersDisabled} @@ -269,7 +269,7 @@ export default class ChannelModeration extends React.Component { id={formattedMessages[entry.name].disabledBothDueToCreatePosts.id} defaultMessage={formattedMessages[entry.name].disabledBothDueToCreatePosts.defaultMessage} /> - + , ); return errorMessages; } else if (!createPostsObject!.roles.guests!.value && this.props.guestAccountsEnabled) { @@ -288,7 +288,7 @@ export default class ChannelModeration extends React.Component { id={formattedMessages[entry.name][createPostsKey].id} defaultMessage={formattedMessages[entry.name][createPostsKey].defaultMessage} /> - + , ); } } @@ -318,10 +318,10 @@ export default class ChannelModeration extends React.Component { defaultMessage={formattedMessages[entry.name][disabledKey].defaultMessage} values={{ scheme_name: schemeName, - scheme_link: schemeLink + scheme_link: schemeLink, }} /> - + , ); } return errorMessages; diff --git a/components/admin_console/team_channel_settings/channel/details/channel_modes.test.tsx b/components/admin_console/team_channel_settings/channel/details/channel_modes.test.tsx index adf40ca70cb0..22d7d35e4802 100644 --- a/components/admin_console/team_channel_settings/channel/details/channel_modes.test.tsx +++ b/components/admin_console/team_channel_settings/channel/details/channel_modes.test.tsx @@ -14,7 +14,7 @@ describe('admin_console/team_channel_settings/channel/ChannelModes', () => { isPublic={true} isSynced={false} isDefault={false} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/team_channel_settings/channel/details/channel_profile.test.tsx b/components/admin_console/team_channel_settings/channel/details/channel_profile.test.tsx index ae79e357213a..25eb8fe1ccc2 100644 --- a/components/admin_console/team_channel_settings/channel/details/channel_profile.test.tsx +++ b/components/admin_console/team_channel_settings/channel/details/channel_profile.test.tsx @@ -17,7 +17,7 @@ describe('admin_console/team_channel_settings/channel/ChannelProfile', () => { + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/team_channel_settings/channel/details/index.js b/components/admin_console/team_channel_settings/channel/details/index.js index 5af19ef2b2cb..d228c88b0bf0 100644 --- a/components/admin_console/team_channel_settings/channel/details/index.js +++ b/components/admin_console/team_channel_settings/channel/details/index.js @@ -55,7 +55,7 @@ function mapStateToProps(state, props) { channelID, channelPermissions, teamScheme, - guestAccountsEnabled + guestAccountsEnabled, }; } diff --git a/components/admin_console/team_channel_settings/channel/list/channel_row.test.tsx b/components/admin_console/team_channel_settings/channel/list/channel_row.test.tsx index de221914988a..5118f50d7956 100644 --- a/components/admin_console/team_channel_settings/channel/list/channel_row.test.tsx +++ b/components/admin_console/team_channel_settings/channel/list/channel_row.test.tsx @@ -34,7 +34,7 @@ describe('admin_console/team_channel_settings/channel/ChannelRow', () => { + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/team_channel_settings/channel/list/index.ts b/components/admin_console/team_channel_settings/channel/list/index.ts index 67a5e923ad01..3f849e368c58 100644 --- a/components/admin_console/team_channel_settings/channel/list/index.ts +++ b/components/admin_console/team_channel_settings/channel/list/index.ts @@ -26,7 +26,7 @@ const getSortedListOfChannels = createSelector( getAllChannels, (teams) => Object.values(teams). filter((c) => (c.type === Constants.OPEN_CHANNEL || c.type === Constants.PRIVATE_CHANNEL) && c.delete_at === 0). - sort(compareByDisplayName) + sort(compareByDisplayName), ); function mapStateToProps(state: GlobalState) { diff --git a/components/admin_console/team_channel_settings/group/group_row.test.tsx b/components/admin_console/team_channel_settings/group/group_row.test.tsx index cab806b5d580..901bd71ac705 100644 --- a/components/admin_console/team_channel_settings/group/group_row.test.tsx +++ b/components/admin_console/team_channel_settings/group/group_row.test.tsx @@ -19,7 +19,7 @@ describe('admin_console/team_channel_settings/group/GroupRow', () => { removeGroup={() => {}} setNewGroupRole={() => {}} type='channel' - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/team_channel_settings/group/group_users.test.tsx b/components/admin_console/team_channel_settings/group/group_users.test.tsx index 3f0d84153dff..0de3d60b4f5c 100644 --- a/components/admin_console/team_channel_settings/group/group_users.test.tsx +++ b/components/admin_console/team_channel_settings/group/group_users.test.tsx @@ -25,7 +25,7 @@ describe('admin_console/team_channel_settings/group/GroupUsers', () => { + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -40,7 +40,7 @@ describe('admin_console/team_channel_settings/group/GroupUsers', () => { + />, ); // First page diff --git a/components/admin_console/team_channel_settings/group/group_users.tsx b/components/admin_console/team_channel_settings/group/group_users.tsx index 80cd37f10e55..83029a97841a 100644 --- a/components/admin_console/team_channel_settings/group/group_users.tsx +++ b/components/admin_console/team_channel_settings/group/group_users.tsx @@ -23,7 +23,7 @@ interface AdminGroupUsersState { export default class AdminGroupUsers extends React.PureComponent { state: AdminGroupUsersState = { - page: 0 + page: 0, } previousPage = async () => { @@ -67,7 +67,7 @@ export default class AdminGroupUsers extends React.PureComponent diff --git a/components/admin_console/team_channel_settings/group/group_users_row.test.tsx b/components/admin_console/team_channel_settings/group/group_users_row.test.tsx index 712c6f46192f..2c29006dadff 100644 --- a/components/admin_console/team_channel_settings/group/group_users_row.test.tsx +++ b/components/admin_console/team_channel_settings/group/group_users_row.test.tsx @@ -28,7 +28,7 @@ describe('admin_console/team_channel_settings/group/GroupUsersRow', () => { displayName='Test display name' user={testUser} lastPictureUpdate={0} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -48,7 +48,7 @@ describe('admin_console/team_channel_settings/group/GroupUsersRow', () => { displayName='Test display name' user={testUser2} lastPictureUpdate={0} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/team_channel_settings/group/group_users_row.tsx b/components/admin_console/team_channel_settings/group/group_users_row.tsx index 354fd04de2d6..08c265f47677 100644 --- a/components/admin_console/team_channel_settings/group/group_users_row.tsx +++ b/components/admin_console/team_channel_settings/group/group_users_row.tsx @@ -28,7 +28,7 @@ interface AdminGroupUsersRowProps { export default class AdminGroupUsersRow extends React.PureComponent { renderRolesColumn = (member: ProfileWithGroups) => { return member.roles!.split(' ').map((role) => - Utils.localizeMessage('admin.permissions.roles.' + role + '.name', role) + Utils.localizeMessage('admin.permissions.roles.' + role + '.name', role), ).join(', '); }; diff --git a/components/admin_console/team_channel_settings/team/details/team_details.test.jsx b/components/admin_console/team_channel_settings/team/details/team_details.test.jsx index a70f332979e8..7914d668a772 100644 --- a/components/admin_console/team_channel_settings/team/details/team_details.test.jsx +++ b/components/admin_console/team_channel_settings/team/details/team_details.test.jsx @@ -43,7 +43,7 @@ describe('admin_console/team_channel_settings/team/TeamDetails', () => { team={testTeam} teamID={testTeam.id} allGroups={allGroups} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/team_channel_settings/team/details/team_groups.test.jsx b/components/admin_console/team_channel_settings/team/details/team_groups.test.jsx index 403e14d8be83..2462f0e93fa8 100644 --- a/components/admin_console/team_channel_settings/team/details/team_groups.test.jsx +++ b/components/admin_console/team_channel_settings/team/details/team_groups.test.jsx @@ -31,7 +31,7 @@ describe('admin_console/team_channel_settings/team/TeamGroups', () => { groups={groups} team={testTeam} totalGroups={1} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/team_channel_settings/team/details/team_members/team_members.test.tsx b/components/admin_console/team_channel_settings/team/details/team_members/team_members.test.tsx index 527a3d3d13b8..a22882fd9c94 100644 --- a/components/admin_console/team_channel_settings/team/details/team_members/team_members.test.tsx +++ b/components/admin_console/team_channel_settings/team/details/team_members/team_members.test.tsx @@ -43,12 +43,12 @@ describe('admin_console/team_channel_settings/team/TeamMembers', () => { loadProfilesAndReloadTeamMembers: jest.fn(), searchProfilesAndTeamMembers: jest.fn(), setModalSearchTerm: jest.fn(), - } + }, }; test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -61,7 +61,7 @@ describe('admin_console/team_channel_settings/team/TeamMembers', () => { teamMembers={{}} totalCount={0} loading={true} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/team_channel_settings/team/details/team_members/team_members.tsx b/components/admin_console/team_channel_settings/team/details/team_members/team_members.tsx index 097730bc06b7..7a18310c070c 100644 --- a/components/admin_console/team_channel_settings/team/details/team_members/team_members.tsx +++ b/components/admin_console/team_channel_settings/team/details/team_members/team_members.tsx @@ -99,7 +99,7 @@ export default class TeamMembers extends React.PureComponent { } this.setStateLoading(false); }, - Constants.SEARCH_TIMEOUT_MILLISECONDS + Constants.SEARCH_TIMEOUT_MILLISECONDS, ); this.searchTimeoutId = searchTimeoutId; diff --git a/components/admin_console/team_channel_settings/team/details/team_modes.test.jsx b/components/admin_console/team_channel_settings/team/details/team_modes.test.jsx index 5d606747e028..22992a42a076 100644 --- a/components/admin_console/team_channel_settings/team/details/team_modes.test.jsx +++ b/components/admin_console/team_channel_settings/team/details/team_modes.test.jsx @@ -15,7 +15,7 @@ describe('admin_console/team_channel_settings/team/TeamModes', () => { allAllowedChecked={false} allowedDomains={''} allowedDomainsChecked={true} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/team_channel_settings/team/details/team_profile.test.jsx b/components/admin_console/team_channel_settings/team/details/team_profile.test.jsx index 28b46b8194c9..4683345f8620 100644 --- a/components/admin_console/team_channel_settings/team/details/team_profile.test.jsx +++ b/components/admin_console/team_channel_settings/team/details/team_profile.test.jsx @@ -11,7 +11,7 @@ describe('admin_console/team_channel_settings/team/TeamProfile', () => { const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/team_channel_settings/team/list/index.js b/components/admin_console/team_channel_settings/team/list/index.js index 75104c30667b..f08019df534d 100644 --- a/components/admin_console/team_channel_settings/team/list/index.js +++ b/components/admin_console/team_channel_settings/team/list/index.js @@ -14,7 +14,7 @@ import TeamList from './team_list.jsx'; const getSortedListOfTeams = createSelector( getTeams, - (teams) => Object.values(teams).sort((a, b) => a.display_name.localeCompare(b.display_name)) + (teams) => Object.values(teams).sort((a, b) => a.display_name.localeCompare(b.display_name)), ); function mapStateToProps(state) { diff --git a/components/admin_console/team_channel_settings/team/list/team_row.test.jsx b/components/admin_console/team_channel_settings/team/list/team_row.test.jsx index fafd7813b21d..7267fa3c1166 100644 --- a/components/admin_console/team_channel_settings/team/list/team_row.test.jsx +++ b/components/admin_console/team_channel_settings/team/list/team_row.test.jsx @@ -20,7 +20,7 @@ describe('admin_console/team_channel_settings/team/TeamRow', () => { onRowClick={jest.fn()} team={testTeam} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/team_channel_settings/team/team_settings.test.jsx b/components/admin_console/team_channel_settings/team/team_settings.test.jsx index cc7f83cbe9f5..6a190bd9c2ba 100644 --- a/components/admin_console/team_channel_settings/team/team_settings.test.jsx +++ b/components/admin_console/team_channel_settings/team/team_settings.test.jsx @@ -11,7 +11,7 @@ describe('admin_console/team_channel_settings/team/TeamSettings', () => { const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/admin_console/text_setting.test.tsx b/components/admin_console/text_setting.test.tsx index d0cfdb8afb95..a5563b14782d 100644 --- a/components/admin_console/text_setting.test.tsx +++ b/components/admin_console/text_setting.test.tsx @@ -20,7 +20,7 @@ describe('components/admin_console/TextSetting', () => { maxLength={-1} resizable={true} type='input' - /> + />, ); expect(wrapper).toMatchInlineSnapshot(` { const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -97,7 +97,7 @@ describe('components/admin_console/user_grid/UserGrid', () => { + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -107,14 +107,14 @@ describe('components/admin_console/user_grid/UserGrid', () => { + />, ); expect(wrapper).toMatchSnapshot(); }); test('should return pagination props while taking into account added or removed users when getPaginationProps is called', () => { const wrapper = shallow( - + , ); const userGrid = wrapper.instance() as UserGrid; diff --git a/components/admin_console/user_grid/user_grid_role_dropdown.tsx b/components/admin_console/user_grid/user_grid_role_dropdown.tsx index 2be68021fa7b..2f8a30413acc 100644 --- a/components/admin_console/user_grid/user_grid_role_dropdown.tsx +++ b/components/admin_console/user_grid/user_grid_role_dropdown.tsx @@ -91,7 +91,7 @@ export default class UserGridRoleDropdown extends React.Component { this.props.handleUpdateMembership({ user_id: this.props.user.id, scheme_admin: true, - scheme_user: true + scheme_user: true, }); } @@ -99,7 +99,7 @@ export default class UserGridRoleDropdown extends React.Component { this.props.handleUpdateMembership({ user_id: this.props.user.id, scheme_admin: false, - scheme_user: true + scheme_user: true, }); } diff --git a/components/analytics/doughnut_chart.test.tsx b/components/analytics/doughnut_chart.test.tsx index 3c0efa835978..f2938eff458f 100644 --- a/components/analytics/doughnut_chart.test.tsx +++ b/components/analytics/doughnut_chart.test.tsx @@ -15,7 +15,7 @@ describe('components/analytics/doughnut_chart.tsx', () => { title='Test' height={400} width={600} - /> + />, ); expect(wrapper).toMatchSnapshot(); @@ -31,7 +31,7 @@ describe('components/analytics/doughnut_chart.tsx', () => { height={400} width={600} data={data} - /> + />, ); expect(Chart).toBeCalledWith(expect.anything(), {data, options: {}, type: 'doughnut'}); @@ -52,7 +52,7 @@ describe('components/analytics/doughnut_chart.tsx', () => { height={400} width={600} data={data} - /> + />, ); expect(Chart).toBeCalledWith(expect.anything(), {data, options: {}, type: 'doughnut'}); expect(wrapper).toMatchSnapshot(); @@ -74,7 +74,7 @@ describe('components/analytics/doughnut_chart.tsx', () => { height={400} width={600} data={data} - /> + />, ) as ReactWrapper<{}, {}, DoughnutChart>; expect(Chart).toBeCalled(); @@ -106,7 +106,7 @@ describe('components/analytics/doughnut_chart.tsx', () => { height={400} width={600} data={oldData} - /> + />, ) as ReactWrapper<{}, {}, DoughnutChart>; expect(Chart).toBeCalled(); diff --git a/components/analytics/format.test.tsx b/components/analytics/format.test.tsx index b5237b2b5575..218cebc56418 100644 --- a/components/analytics/format.test.tsx +++ b/components/analytics/format.test.tsx @@ -7,7 +7,7 @@ describe('components/analytics/format.tsx', () => { test('should syncronize chart date ranges', () => { const data1 = { datasets: [ - {data: [1, 2]} + {data: [1, 2]}, ], labels: ['date1', 'date2'], }; diff --git a/components/analytics/line_chart.test.tsx b/components/analytics/line_chart.test.tsx index dc4967e546fa..319bdf7f8ced 100644 --- a/components/analytics/line_chart.test.tsx +++ b/components/analytics/line_chart.test.tsx @@ -12,7 +12,7 @@ describe('components/analytics/line_chart.tsx', () => { title='Test' height={400} width={600} - /> + />, ); expect(wrapper).toMatchSnapshot(); @@ -30,7 +30,7 @@ describe('components/analytics/line_chart.tsx', () => { height={400} width={600} data={data} - /> + />, ); expect(wrapper).toMatchSnapshot(); @@ -50,7 +50,7 @@ describe('components/analytics/line_chart.tsx', () => { height={400} width={600} data={data} - /> + />, ); expect(wrapper).toMatchSnapshot(); diff --git a/components/analytics/statistic_count.test.tsx b/components/analytics/statistic_count.test.tsx index 2051a6aca29a..f6211149357f 100644 --- a/components/analytics/statistic_count.test.tsx +++ b/components/analytics/statistic_count.test.tsx @@ -11,7 +11,7 @@ describe('components/analytics/statistic_count.tsx', () => { + />, ); expect(wrapper).toMatchSnapshot(); @@ -23,7 +23,7 @@ describe('components/analytics/statistic_count.tsx', () => { title='Test' icon='test-icon' count={4} - /> + />, ); expect(wrapper).toMatchSnapshot(); @@ -35,7 +35,7 @@ describe('components/analytics/statistic_count.tsx', () => { title='Test Zero' icon='test-icon' count={0} - /> + />, ); expect(wrapper).toMatchSnapshot(); diff --git a/components/analytics/table_chart.test.jsx b/components/analytics/table_chart.test.jsx index 806809639f78..ffa689183d8d 100644 --- a/components/analytics/table_chart.test.jsx +++ b/components/analytics/table_chart.test.jsx @@ -13,7 +13,7 @@ describe('components/analytics/table_chart.tsx', () => { + />, ); expect(wrapper).toMatchSnapshot(); @@ -29,7 +29,7 @@ describe('components/analytics/table_chart.tsx', () => { + />, ); expect(wrapper).toMatchSnapshot(); diff --git a/components/announcement_bar/announcement_bar.test.jsx b/components/announcement_bar/announcement_bar.test.jsx index e5f47db04165..3fcc8866b645 100644 --- a/components/announcement_bar/announcement_bar.test.jsx +++ b/components/announcement_bar/announcement_bar.test.jsx @@ -29,14 +29,14 @@ describe('components/AnnouncementBar', () => { actions: { sendVerificationEmail: jest.fn(), incrementAnnouncementBarCount: jest.fn(), - decrementAnnouncementBarCount: jest.fn() + decrementAnnouncementBarCount: jest.fn(), }, }; test('should match snapshot, bar showing', () => { const props = baseProps; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -45,7 +45,7 @@ describe('components/AnnouncementBar', () => { test('should match snapshot, bar not showing', () => { const props = {...baseProps, enableBanner: false}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -54,7 +54,7 @@ describe('components/AnnouncementBar', () => { test('should match snapshot, bar showing, no dismissal', () => { const props = {...baseProps, allowBannerDismissal: false}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -63,7 +63,7 @@ describe('components/AnnouncementBar', () => { test('should match snapshot, props change', () => { const props = baseProps; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -84,7 +84,7 @@ describe('components/AnnouncementBar', () => { test('should match snapshot, dismissal', () => { const props = baseProps; const wrapper = shallow( - + , ); // Banner should show diff --git a/components/announcement_bar/default_announcement_bar/index.js b/components/announcement_bar/default_announcement_bar/index.js index b5e34650ce3a..a170d6ba7d58 100644 --- a/components/announcement_bar/default_announcement_bar/index.js +++ b/components/announcement_bar/default_announcement_bar/index.js @@ -11,7 +11,7 @@ import AnnouncementBar from './announcement_bar.jsx'; function mapStateToProps(state) { return { - announcementBarCount: getAnnouncementBarCount(state) + announcementBarCount: getAnnouncementBarCount(state), }; } diff --git a/components/announcement_bar/text_dismissable_bar.jsx b/components/announcement_bar/text_dismissable_bar.jsx index 215c9c4f4933..66a970d72de3 100644 --- a/components/announcement_bar/text_dismissable_bar.jsx +++ b/components/announcement_bar/text_dismissable_bar.jsx @@ -65,7 +65,7 @@ export default class TextDismissableBar extends React.PureComponent { message={text} options={{ singleline: true, - mentionHighlight: false + mentionHighlight: false, }} /> } diff --git a/components/announcement_bar/text_dismissable_bar.test.jsx b/components/announcement_bar/text_dismissable_bar.test.jsx index e07bc44dd519..d546a4d84763 100644 --- a/components/announcement_bar/text_dismissable_bar.test.jsx +++ b/components/announcement_bar/text_dismissable_bar.test.jsx @@ -17,7 +17,7 @@ describe('components/TextDismissableBar', () => { test('should match snapshot', () => { const props = baseProps; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -26,7 +26,7 @@ describe('components/TextDismissableBar', () => { test('should match snapshot, with link but without siteURL', () => { const props = {...baseProps, text: 'A [link](http://testurl.com/admin_console/)'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -35,7 +35,7 @@ describe('components/TextDismissableBar', () => { test('should match snapshot, with an internal url', () => { const props = {...baseProps, text: 'A [link](http://testurl.com/admin_console/) with an internal url', siteURL: 'http://testurl.com'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -44,7 +44,7 @@ describe('components/TextDismissableBar', () => { test('should match snapshot, with ean external url', () => { const props = {...baseProps, text: 'A [link](http://otherurl.com/admin_console/) with an external url', siteURL: 'http://testurl.com'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -53,7 +53,7 @@ describe('components/TextDismissableBar', () => { test('should match snapshot, with an internal and an external link', () => { const props = {...baseProps, text: 'A [link](http://testurl.com/admin_console/) with an internal url and a [link](http://other-url.com/admin_console/) with an external url', siteURL: 'http://testurl.com'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/announcement_bar/version_bar/version_bar.test.jsx b/components/announcement_bar/version_bar/version_bar.test.jsx index f8d456920345..62fb7215d781 100644 --- a/components/announcement_bar/version_bar/version_bar.test.jsx +++ b/components/announcement_bar/version_bar/version_bar.test.jsx @@ -10,7 +10,7 @@ import AnnouncementBar from 'components/announcement_bar/default_announcement_ba describe('components/VersionBar', () => { test('should match snapshot - bar rendered after server version change', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); expect(wrapper.find(AnnouncementBar).exists()).toBe(false); diff --git a/components/at_mention/at_mention.test.jsx b/components/at_mention/at_mention.test.jsx index def6fc43f8a8..4321bf4d2fc4 100644 --- a/components/at_mention/at_mention.test.jsx +++ b/components/at_mention/at_mention.test.jsx @@ -23,7 +23,7 @@ describe('components/AtMention', () => { developers: {id: 'qwerty1', name: 'developers', allow_reference: true}, marketing: {id: 'qwerty2', name: 'marketing', allow_reference: false}, accounting: {id: 'qwerty3', name: 'accounting', allow_reference: true}, - } + }, }; test('should match snapshot when mentioning user', () => { @@ -33,7 +33,7 @@ describe('components/AtMention', () => { mentionName='user1' > {'(at)-user1'} - + , ); expect(wrapper).toMatchSnapshot(); @@ -47,7 +47,7 @@ describe('components/AtMention', () => { teammateNameDisplay={General.TEAMMATE_NAME_DISPLAY.SHOW_USERNAME} > {'(at)-user1'} - + , ); expect(wrapper).toMatchSnapshot(); @@ -60,7 +60,7 @@ describe('components/AtMention', () => { mentionName='user1...' > {'(at)-user1'} - + , ); expect(wrapper).toMatchSnapshot(); @@ -73,7 +73,7 @@ describe('components/AtMention', () => { mentionName='userdot.' > {'(at)-userdot.'} - + , ); expect(wrapper).toMatchSnapshot(); @@ -86,7 +86,7 @@ describe('components/AtMention', () => { mentionName='userdot..' > {'(at)-userdot..'} - + , ); expect(wrapper).toMatchSnapshot(); @@ -99,7 +99,7 @@ describe('components/AtMention', () => { mentionName='USeR1' > {'(at)-USeR1'} - + , ); expect(wrapper).toMatchSnapshot(); @@ -112,7 +112,7 @@ describe('components/AtMention', () => { mentionName='currentUser' > {'(at)-currentUser'} - + , ); expect(wrapper).toMatchSnapshot(); @@ -125,7 +125,7 @@ describe('components/AtMention', () => { mentionName='all' > {'(at)-all'} - + , ); expect(wrapper).toMatchSnapshot(); @@ -138,7 +138,7 @@ describe('components/AtMention', () => { mentionName='aLL' > {'(at)-aLL'} - + , ); expect(wrapper).toMatchSnapshot(); @@ -151,7 +151,7 @@ describe('components/AtMention', () => { mentionName='notauser' > {'(at)-notauser'} - + , ); expect(wrapper).toMatchSnapshot(); @@ -164,7 +164,7 @@ describe('components/AtMention', () => { mentionName='NOTAuser' > {'(at)-NOTAuser'} - + , ); expect(wrapper).toMatchSnapshot(); @@ -177,7 +177,7 @@ describe('components/AtMention', () => { mentionName='developers' > {'(at)-developers'} - + , ); expect(wrapper).toMatchSnapshot(); @@ -191,7 +191,7 @@ describe('components/AtMention', () => { disableGroupHighlight={true} > {'(at)-developers'} - + , ); expect(wrapper).toMatchSnapshot(); @@ -204,7 +204,7 @@ describe('components/AtMention', () => { mentionName='marketing' > {'(at)-marketing'} - + , ); expect(wrapper).toMatchSnapshot(); @@ -217,7 +217,7 @@ describe('components/AtMention', () => { mentionName={'user1'} > {'(at)-user1'} - + , ); const instance = wrapper.instance(); diff --git a/components/audio_video_preview.test.jsx b/components/audio_video_preview.test.jsx index ef39cbd4f16f..639356f90f2c 100644 --- a/components/audio_video_preview.test.jsx +++ b/components/audio_video_preview.test.jsx @@ -17,14 +17,14 @@ describe('component/AudioVideoPreview', () => { test('should match snapshot without children', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); test('should match snapshot, cannot play', () => { const wrapper = shallow( - + , ); wrapper.setState({canPlay: false}); expect(wrapper).toMatchSnapshot(); diff --git a/components/audit_table/audit_table.test.jsx b/components/audit_table/audit_table.test.jsx index 0c2cff5ce48e..0a771609dae2 100644 --- a/components/audit_table/audit_table.test.jsx +++ b/components/audit_table/audit_table.test.jsx @@ -25,7 +25,7 @@ describe('components/audit_table/AuditTable', () => { test('should match snapshot with no audits', () => { const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -55,7 +55,7 @@ describe('components/audit_table/AuditTable', () => { const props = {...baseProps, audits}; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/authorize/authorize.jsx b/components/authorize/authorize.jsx index cc8b6c46b8cd..94985f21a65d 100644 --- a/components/authorize/authorize.jsx +++ b/components/authorize/authorize.jsx @@ -64,7 +64,7 @@ export default class Authorize extends React.Component { } else if (error) { this.setState({error: error.message}); } - } + }, ); } diff --git a/components/autocomplete_selector.test.jsx b/components/autocomplete_selector.test.jsx index b4cc08727b81..e69cb354803b 100644 --- a/components/autocomplete_selector.test.jsx +++ b/components/autocomplete_selector.test.jsx @@ -13,7 +13,7 @@ describe('components/widgets/settings/AutocompleteSelector', () => { label='some label' value='some value' providers={[]} - /> + />, ); expect(wrapper).toMatchInlineSnapshot(`
{ providers={[]} label='some label' value='value from prop' - /> + />, ); wrapper.instance().onBlur(); @@ -153,7 +153,7 @@ describe('components/widgets/settings/AutocompleteSelector', () => { value='some value' providers={[]} onSelected={onSelected} - /> + />, ); const selected = {text: 'sometext', value: 'somevalue'}; diff --git a/components/autosize_textarea.test.jsx b/components/autosize_textarea.test.jsx index 3f7be6712c58..cc4016ff9ad3 100644 --- a/components/autosize_textarea.test.jsx +++ b/components/autosize_textarea.test.jsx @@ -9,7 +9,7 @@ import AutosizeTextarea from 'components/autosize_textarea'; describe('components/AutosizeTextarea', () => { test('should match snapshot, init', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/autosize_textarea.tsx b/components/autosize_textarea.tsx index daf5123de778..f176cd34d1d1 100644 --- a/components/autosize_textarea.tsx +++ b/components/autosize_textarea.tsx @@ -119,7 +119,7 @@ export default class AutosizeTextarea extends React.Component { const heightProps = { rows: 0, - height: 0 + height: 0, }; if (this.height <= 0) { diff --git a/components/backstage/components/backstage_header.jsx b/components/backstage/components/backstage_header.jsx index 1e54b8974a99..a83c648a4917 100644 --- a/components/backstage/components/backstage_header.jsx +++ b/components/backstage/components/backstage_header.jsx @@ -27,7 +27,7 @@ export default class BackstageHeader extends React.Component { className='fa fa-angle-right' title={{id: t('generic_icons.breadcrumb'), defaultMessage: 'Breadcrumb Icon'}} /> - + , ); } diff --git a/components/backstage/components/backstage_header.test.jsx b/components/backstage/components/backstage_header.test.jsx index 03cf6338fe44..6f681c59bd6b 100644 --- a/components/backstage/components/backstage_header.test.jsx +++ b/components/backstage/components/backstage_header.test.jsx @@ -9,7 +9,7 @@ import BackstageHeader from 'components/backstage/components/backstage_header.js describe('components/backstage/components/BackstageHeader', () => { test('should match snapshot without children', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -19,7 +19,7 @@ describe('components/backstage/components/BackstageHeader', () => {
{'Child 1'}
{'Child 2'}
-
+
, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/backstage/components/backstage_sidebar.test.jsx b/components/backstage/components/backstage_sidebar.test.jsx index 5ae3a839203d..a72a5c7996f1 100644 --- a/components/backstage/components/backstage_sidebar.test.jsx +++ b/components/backstage/components/backstage_sidebar.test.jsx @@ -38,7 +38,7 @@ describe('components/backstage/components/BackstageSidebar', () => { ...testCaseProps, }; const wrapper = shallow( - + , ); expect(wrapper.find(BackstageCategory).find({name: 'emoji'}).exists()).toBe(expected); @@ -61,7 +61,7 @@ describe('components/backstage/components/BackstageSidebar', () => { ...testCaseProps, }; const wrapper = shallow( - + , ); expect(wrapper.find(BackstageCategory).find({name: 'incoming_webhooks'}).exists()).toBe(expected); @@ -84,7 +84,7 @@ describe('components/backstage/components/BackstageSidebar', () => { ...testCaseProps, }; const wrapper = shallow( - + , ); expect(wrapper.find(BackstageCategory).find({name: 'outgoing_webhooks'}).exists()).toBe(expected); @@ -107,7 +107,7 @@ describe('components/backstage/components/BackstageSidebar', () => { ...testCaseProps, }; const wrapper = shallow( - + , ); expect(wrapper.find(BackstageCategory).find({name: 'commands'}).exists()).toBe(expected); @@ -130,7 +130,7 @@ describe('components/backstage/components/BackstageSidebar', () => { ...testCaseProps, }; const wrapper = shallow( - + , ); expect(wrapper.find(BackstageCategory).find({name: 'oauth2-apps'}).exists()).toBe(expected); @@ -151,7 +151,7 @@ describe('components/backstage/components/BackstageSidebar', () => { ...testCaseProps, }; const wrapper = shallow( - + , ); expect(wrapper.find(BackstageCategory).find({name: 'bots'}).exists()).toBe(expected); @@ -170,7 +170,7 @@ describe('components/backstage/components/BackstageSidebar', () => { canManageIntegrations: true, }; const wrapper = shallow( - + , ); expect(wrapper.find(BackstageCategory).find({name: 'incoming_webhooks'}).exists()).toBe(true); @@ -190,7 +190,7 @@ describe('components/backstage/components/BackstageSidebar', () => { canManageIntegrations: false, }; const wrapper = shallow( - + , ); expect(wrapper.find(BackstageCategory).find({name: 'incoming_webhooks'}).exists()).toBe(false); diff --git a/components/change_url_modal/change_url_modal.test.tsx b/components/change_url_modal/change_url_modal.test.tsx index 3e3c1c805164..2c69257579ab 100644 --- a/components/change_url_modal/change_url_modal.test.tsx +++ b/components/change_url_modal/change_url_modal.test.tsx @@ -20,7 +20,7 @@ describe('components/ChangeURLModal', () => { test('should match snapshot, modal not showing', () => { const props = {...baseProps, show: false}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); expect(wrapper.find(Modal).props().show).toEqual(false); @@ -28,7 +28,7 @@ describe('components/ChangeURLModal', () => { test('should match snapshot, modal showing', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); expect(wrapper.find(Modal).props().show).toEqual(true); @@ -37,7 +37,7 @@ describe('components/ChangeURLModal', () => { test('should match snapshot, with a input', () => { const props = {...baseProps}; const wrapper = shallow( - + , ); const input = wrapper.find('input'); expect(wrapper).toMatchSnapshot(); @@ -46,7 +46,7 @@ describe('components/ChangeURLModal', () => { test('should match snapshot, on urlErrors', () => { const wrapper = shallow( - + , ); wrapper.setState({urlErrors: true}); expect(wrapper.find('.has-error').length).toEqual(2); @@ -55,7 +55,7 @@ describe('components/ChangeURLModal', () => { test('should match snapshot, on currentURL', () => { const wrapper = shallow( - + , ); wrapper.setState({urlErrors: true}); expect(wrapper).toMatchSnapshot(); @@ -63,7 +63,7 @@ describe('components/ChangeURLModal', () => { test('should match state when onSubmit is called with a valid URL', () => { const wrapper = mountWithIntl( - + , ); const value = 'urlexample'; const refURLInput = wrapper.find('input[type="text"]').getDOMNode() as HTMLInputElement; @@ -77,7 +77,7 @@ describe('components/ChangeURLModal', () => { test('should match state when onSubmit is called with a invalid URL', () => { const wrapper = mountWithIntl( - + , ); const value = 'a'; const refURLInput = wrapper.find('input[type="text"]').getDOMNode() as HTMLInputElement; @@ -91,7 +91,7 @@ describe('components/ChangeURLModal', () => { test('should match state when onURLChanged is called', () => { const wrapper = mountWithIntl( - + , ); const value = 'URLEXAMPLE'; const target = {value}; @@ -106,7 +106,7 @@ describe('components/ChangeURLModal', () => { test('should match state when onCancel is called', () => { const wrapper = mountWithIntl( - + , ); const instance = wrapper.instance() as ChangeURLModal; @@ -118,7 +118,7 @@ describe('components/ChangeURLModal', () => { test('should update current url when not editing', () => { const wrapper = mountWithIntl( - + , ); const url = 'url_1'; @@ -129,7 +129,7 @@ describe('components/ChangeURLModal', () => { test('should not update current url when editing', () => { const wrapper = mountWithIntl( - + , ); const url = 'url_1'; diff --git a/components/channel_groups_manage_modal/index.ts b/components/channel_groups_manage_modal/index.ts index 9c3c437ac3b9..2d9b1bc9355d 100644 --- a/components/channel_groups_manage_modal/index.ts +++ b/components/channel_groups_manage_modal/index.ts @@ -49,10 +49,10 @@ const mapDispatchToProps = (dispatch: Dispatch) => ({ openModal, unlinkGroupSyncable, patchGroupSyncable, - getMyChannelMember + getMyChannelMember, }, - dispatch - ) + dispatch, + ), }); export default connect(mapStateToProps, mapDispatchToProps)(ChannelGroupsManageModal); diff --git a/components/channel_header/channel_header.js b/components/channel_header/channel_header.js index f74b1f2027e5..178b71881f90 100644 --- a/components/channel_header/channel_header.js +++ b/components/channel_header/channel_header.js @@ -566,10 +566,10 @@ class ChannelHeader extends React.PureComponent { if (!channelIsArchived) { const formattedMessage = isFavorite ? { id: 'channelHeader.removeFromFavorites', - defaultMessage: 'Remove from Favorites' + defaultMessage: 'Remove from Favorites', } : { id: 'channelHeader.addToFavorites', - defaultMessage: 'Add to Favorites' + defaultMessage: 'Add to Favorites', }; ariaLabel = formatMessage(formattedMessage).toLowerCase(); diff --git a/components/channel_header/channel_header.test.jsx b/components/channel_header/channel_header.test.jsx index 102482397685..809235ba89ce 100644 --- a/components/channel_header/channel_header.test.jsx +++ b/components/channel_header/channel_header.test.jsx @@ -56,14 +56,14 @@ describe('components/ChannelHeader', () => { test('should render properly when empty', () => { const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); }); test('should render properly when populated', () => { const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -94,7 +94,7 @@ describe('components/ChannelHeader', () => { }; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -106,7 +106,7 @@ describe('components/ChannelHeader', () => { }; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -118,7 +118,7 @@ describe('components/ChannelHeader', () => { }; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -130,7 +130,7 @@ describe('components/ChannelHeader', () => { }; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -142,7 +142,7 @@ describe('components/ChannelHeader', () => { }; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -154,7 +154,7 @@ describe('components/ChannelHeader', () => { }; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -174,22 +174,22 @@ describe('components/ChannelHeader', () => { }; const wrapper = shallowWithIntl( - + , ); expect(wrapper.containsMatchingElement( + />, )).toEqual(true); }); test('should render the pinned icon with the pinned posts count', () => { const props = { ...populatedProps, - pinnedPostsCount: 2 + pinnedPostsCount: 2, }; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -217,10 +217,10 @@ describe('components/ChannelHeader', () => { }; const wrapper = shallowWithIntl( - + , ); expect(wrapper.containsMatchingElement( - + , )).toEqual(true); }); }); diff --git a/components/channel_header/components/header_icon_wrapper.test.js b/components/channel_header/components/header_icon_wrapper.test.js index 97a8618638b4..358cd74bbdf9 100644 --- a/components/channel_header/components/header_icon_wrapper.test.js +++ b/components/channel_header/components/header_icon_wrapper.test.js @@ -30,7 +30,7 @@ describe('components/channel_header/components/HeaderIconWrapper', () => { test('should match snapshot, on MentionsIcon', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -46,7 +46,7 @@ describe('components/channel_header/components/HeaderIconWrapper', () => { const props = {...baseProps, iconComponent: flagIcon, tooltipKey: 'flaggedPosts'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -62,7 +62,7 @@ describe('components/channel_header/components/HeaderIconWrapper', () => { const props = {...baseProps, iconComponent: pinIcon, tooltipKey: 'pinnedPosts', buttonClass: 'pinned_posts_class'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -78,7 +78,7 @@ describe('components/channel_header/components/HeaderIconWrapper', () => { const props = {...baseProps, iconComponent: searchIcon, tooltipKey: 'search', buttonClass: 'search_class'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -91,7 +91,7 @@ describe('components/channel_header/components/HeaderIconWrapper', () => { const props = {...baseProps, iconComponent: pluginIcon, tooltipKey: 'plugin', tooltipText: 'plugin_tooltip_text'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -104,7 +104,7 @@ describe('components/channel_header/components/HeaderIconWrapper', () => { const props = {...baseProps, iconComponent: pluginIcon, tooltipKey: 'plugin'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/channel_header/index.js b/components/channel_header/index.js index b30e206de34d..305998c5c980 100644 --- a/components/channel_header/index.js +++ b/components/channel_header/index.js @@ -82,7 +82,7 @@ function makeMapStateToProps() { teammateNameDisplaySetting: getTeammateNameDisplaySetting(state), currentRelativeTeamUrl: getCurrentRelativeTeamUrl(state), newSideBarPreference: getNewSidebarPreference(state), - announcementBarCount: getAnnouncementBarCount(state) + announcementBarCount: getAnnouncementBarCount(state), }; }; } diff --git a/components/channel_header_dropdown/index.js b/components/channel_header_dropdown/index.js index 050ae69b4515..46151f7e9a5f 100644 --- a/components/channel_header_dropdown/index.js +++ b/components/channel_header_dropdown/index.js @@ -50,7 +50,7 @@ const getTeammateStatus = createSelector( } return userStatuses[teammateId]; - } + }, ); const mapStateToProps = (state) => ({ diff --git a/components/channel_header_dropdown/menu_items/toggle_mute_channel/toggle_mute_channel.test.js b/components/channel_header_dropdown/menu_items/toggle_mute_channel/toggle_mute_channel.test.js index 0232a28df7b9..827105b30faa 100644 --- a/components/channel_header_dropdown/menu_items/toggle_mute_channel/toggle_mute_channel.test.js +++ b/components/channel_header_dropdown/menu_items/toggle_mute_channel/toggle_mute_channel.test.js @@ -46,7 +46,7 @@ describe('components/ChannelHeaderDropdown/MenuItemToggleMuteChannel', () => { expect(props.actions.updateChannelNotifyProps).toBeCalledWith( props.user.id, props.channel.id, - {mark_unread: NotificationLevels.ALL} + {mark_unread: NotificationLevels.ALL}, ); }); @@ -65,7 +65,7 @@ describe('components/ChannelHeaderDropdown/MenuItemToggleMuteChannel', () => { expect(props.actions.updateChannelNotifyProps).toBeCalledWith( props.user.id, props.channel.id, - {mark_unread: NotificationLevels.MENTION} + {mark_unread: NotificationLevels.MENTION}, ); }); @@ -86,7 +86,7 @@ describe('components/ChannelHeaderDropdown/MenuItemToggleMuteChannel', () => { + />, ); expect(wrapper.find(MenuItemAction).props().show).toEqual(true); expect(wrapper.find(MenuItemAction).props().text).toEqual('Mute Channel'); diff --git a/components/channel_header_mobile/channel_header_mobile.test.js b/components/channel_header_mobile/channel_header_mobile.test.js index 7c233928b3d4..b50c4081c9a9 100644 --- a/components/channel_header_mobile/channel_header_mobile.test.js +++ b/components/channel_header_mobile/channel_header_mobile.test.js @@ -39,7 +39,7 @@ describe('components/ChannelHeaderMobile/ChannelHeaderMobile', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -51,7 +51,7 @@ describe('components/ChannelHeaderMobile/ChannelHeaderMobile', () => { channel: {type: 'O', id: '123', name: 'town-square', display_name: 'Town Square', team_id: 'team_id'}, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -62,7 +62,7 @@ describe('components/ChannelHeaderMobile/ChannelHeaderMobile', () => { + />, ); expect(wrapper).toMatchSnapshot(); diff --git a/components/channel_header_mobile/channel_info_button/channel_info_button.test.js b/components/channel_header_mobile/channel_info_button/channel_info_button.test.js index 3501b4a11339..1d5b9fc85fd9 100644 --- a/components/channel_header_mobile/channel_info_button/channel_info_button.test.js +++ b/components/channel_header_mobile/channel_info_button/channel_info_button.test.js @@ -22,7 +22,7 @@ describe('components/ChannelHeaderMobile/ChannelInfoButton', () => { test('should match snapshot, with channel header', () => { const wrapper = mountWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -39,7 +39,7 @@ describe('components/ChannelHeaderMobile/ChannelInfoButton', () => { test('should match snapshot, without channel header', () => { const props = {...baseProps, channel: {id: 'channel_id'}}; const wrapper = mountWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/channel_info_modal/channel_info_modal.test.jsx b/components/channel_info_modal/channel_info_modal.test.jsx index c00c4986b887..22fbc2b28857 100644 --- a/components/channel_info_modal/channel_info_modal.test.jsx +++ b/components/channel_info_modal/channel_info_modal.test.jsx @@ -17,7 +17,7 @@ describe('components/ChannelInfoModal', () => { channel={{name: 'testchannel', displayName: 'testchannel', header: '', purpose: ''}} currentTeam={{id: 'testid', name: 'testteam'}} onHide={emptyFunction} - /> + />, ); expect(wrapper).toMatchSnapshot(); @@ -44,7 +44,7 @@ describe('components/ChannelInfoModal', () => { channel={channel} currentTeam={{id: 'testid', name: 'testteam'}} onHide={emptyFunction} - /> + />, ); expect(wrapper).toMatchSnapshot(); @@ -61,7 +61,7 @@ describe('components/ChannelInfoModal', () => { channel={{name: 'testchannel', displayName: 'testchannel', header: '', purpose: ''}} currentTeam={{id: 'testid', name: 'testteam'}} onHide={onHide} - /> + />, ); wrapper.find(Modal).first().props().onExited(); diff --git a/components/channel_invite_modal/channel_invite_modal.jsx b/components/channel_invite_modal/channel_invite_modal.jsx index e117d356f056..4a6e8c3d4a99 100644 --- a/components/channel_invite_modal/channel_invite_modal.jsx +++ b/components/channel_invite_modal/channel_invite_modal.jsx @@ -172,7 +172,7 @@ export default class ChannelInviteModal extends React.Component { await this.props.actions.searchProfiles(term, options); this.setUsersLoadingState(false); }, - Constants.SEARCH_TIMEOUT_MILLISECONDS + Constants.SEARCH_TIMEOUT_MILLISECONDS, ); }; diff --git a/components/channel_invite_modal/channel_invite_modal.test.jsx b/components/channel_invite_modal/channel_invite_modal.test.jsx index 2fec184c42a6..fbc150b4bb28 100644 --- a/components/channel_invite_modal/channel_invite_modal.test.jsx +++ b/components/channel_invite_modal/channel_invite_modal.test.jsx @@ -66,7 +66,7 @@ describe('components/channel_invite_modal', () => { {...baseProps} profilesNotInCurrentChannel={users} profilesNotInCurrentTeam={[]} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -84,7 +84,7 @@ describe('components/channel_invite_modal', () => { label: 'user-3', value: 'user-3', delete_at: 0, - } + }, } } excludeUsers={ @@ -94,17 +94,17 @@ describe('components/channel_invite_modal', () => { label: 'user-1', value: 'user-1', delete_at: 0, - } + }, } } - /> + />, ); expect(wrapper).toMatchSnapshot(); }); test('should match state when onHide is called', () => { const wrapper = shallow( - + , ); wrapper.setState({show: true}); @@ -114,7 +114,7 @@ describe('components/channel_invite_modal', () => { test('should have called props.onHide when Modal.onExited is called', () => { const wrapper = shallow( - + , ); wrapper.find(Modal).props().onExited(); @@ -125,7 +125,7 @@ describe('components/channel_invite_modal', () => { const wrapper = shallow( + />, ); wrapper.setState({values: users, show: true}); @@ -154,7 +154,7 @@ describe('components/channel_invite_modal', () => { const wrapper = shallow( + />, ); wrapper.setState({values: users, show: true}); @@ -180,7 +180,7 @@ describe('components/channel_invite_modal', () => { const wrapper = shallow( + />, ); wrapper.setState({values: users, show: true}); @@ -191,7 +191,7 @@ describe('components/channel_invite_modal', () => { test('should trim the search term', () => { const wrapper = shallow( - + , ); wrapper.instance().search(' something '); diff --git a/components/channel_layout/center_channel/center_channel.test.tsx b/components/channel_layout/center_channel/center_channel.test.tsx index e525c43939b1..5a2e81b116b6 100644 --- a/components/channel_layout/center_channel/center_channel.test.tsx +++ b/components/channel_layout/center_channel/center_channel.test.tsx @@ -9,15 +9,15 @@ import CenterChannel from './center_channel'; describe('components/channel_layout/CenterChannel', () => { const props = { location: { - pathname: '/some' + pathname: '/some', }, lastChannelPath: '', lhsOpen: true, rhsOpen: true, rhsMenuOpen: true, match: { - url: '/url' - } + url: '/url', + }, }; test('should call update returnTo on props change', () => { const wrapper = shallow(); @@ -26,14 +26,14 @@ describe('components/channel_layout/CenterChannel', () => { wrapper.setProps({ location: { - pathname: '/pl/path' - } + pathname: '/pl/path', + }, }); expect(wrapper.state('returnTo')).toBe('/some'); wrapper.setProps({ location: { - pathname: '/pl/path1' - } + pathname: '/pl/path1', + }, }); expect(wrapper.state('returnTo')).toBe('/pl/path'); }); diff --git a/components/channel_layout/center_channel/center_channel.tsx b/components/channel_layout/center_channel/center_channel.tsx index 8e614e81f020..aab336db3cf2 100644 --- a/components/channel_layout/center_channel/center_channel.tsx +++ b/components/channel_layout/center_channel/center_channel.tsx @@ -40,10 +40,10 @@ export default class CenterChannel extends React.PureComponent { if (prevState.lastReturnTo !== nextProps.location.pathname && nextProps.location.pathname.includes('/pl/')) { return { lastReturnTo: nextProps.location.pathname, - returnTo: prevState.lastReturnTo + returnTo: prevState.lastReturnTo, }; } - return {lastReturnTo: nextProps.location.pathname + return {lastReturnTo: nextProps.location.pathname, }; } diff --git a/components/channel_layout/channel_identifier_router/channel_identifier_router.test.jsx b/components/channel_layout/channel_identifier_router/channel_identifier_router.test.jsx index 4ab27cc24c89..14a42666a443 100644 --- a/components/channel_layout/channel_identifier_router/channel_identifier_router.test.jsx +++ b/components/channel_layout/channel_identifier_router/channel_identifier_router.test.jsx @@ -48,7 +48,7 @@ describe('components/channel_layout/CenterChannel', () => { expect(baseProps.actions.onChannelByIdentifierEnter).toHaveBeenCalledTimes(2); expect(baseProps.actions.onChannelByIdentifierEnter).toHaveBeenLastCalledWith({ match: props2.match, - actions: baseProps.actions + actions: baseProps.actions, }); }); diff --git a/components/channel_layout/channel_identifier_router/index.js b/components/channel_layout/channel_identifier_router/index.js index e2fc68863acd..5017841546e1 100644 --- a/components/channel_layout/channel_identifier_router/index.js +++ b/components/channel_layout/channel_identifier_router/index.js @@ -12,7 +12,7 @@ import ChannelIdentifierRouter from './channel_identifier_router.jsx'; function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ - onChannelByIdentifierEnter + onChannelByIdentifierEnter, }, dispatch), }; } diff --git a/components/channel_members_dropdown/channel_members_dropdown.test.jsx b/components/channel_members_dropdown/channel_members_dropdown.test.jsx index 25ee5877e935..e1193e52835c 100644 --- a/components/channel_members_dropdown/channel_members_dropdown.test.jsx +++ b/components/channel_members_dropdown/channel_members_dropdown.test.jsx @@ -68,7 +68,7 @@ describe('components/channel_members_dropdown', () => { canChangeMemberRoles: true, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -86,14 +86,14 @@ describe('components/channel_members_dropdown', () => { canChangeMemberRoles: false, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); test('should match snapshot for channel_members_dropdown', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -104,14 +104,14 @@ describe('components/channel_members_dropdown', () => { {...baseProps} index={4} totalUsers={5} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); test('If a removal is in progress do not execute another removal', () => { const wrapper = shallow( - + , ); wrapper.setState({removing: true}); @@ -121,7 +121,7 @@ describe('components/channel_members_dropdown', () => { test('should fail to remove channel member', (done) => { const wrapper = shallow( - + , ); wrapper.instance().handleRemoveFromChannel(); @@ -148,7 +148,7 @@ describe('components/channel_members_dropdown', () => { }; const wrapper = shallow( - + , ); wrapper.instance().handleRemoveFromChannel(); @@ -166,7 +166,7 @@ describe('components/channel_members_dropdown', () => { test('should match snapshot for group_constrained channel', () => { baseProps.channel.group_constrained = true; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/channel_members_dropdown/index.js b/components/channel_members_dropdown/index.js index 4a3cf3892f81..695c9d5e14b5 100644 --- a/components/channel_members_dropdown/index.js +++ b/components/channel_members_dropdown/index.js @@ -21,7 +21,7 @@ function mapStateToProps(state, ownProps) { channel: channel.id, team: channel.team_id, permission: Permissions.MANAGE_CHANNEL_ROLES, - } + }, ); const license = getLicense(state); const isLicensed = license.IsLicensed === 'true'; diff --git a/components/channel_members_modal/channel_members_modal.test.tsx b/components/channel_members_modal/channel_members_modal.test.tsx index 2b7c7311579b..63fa9701d048 100644 --- a/components/channel_members_modal/channel_members_modal.test.tsx +++ b/components/channel_members_modal/channel_members_modal.test.tsx @@ -40,7 +40,7 @@ describe('components/ChannelMembersModal', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -48,7 +48,7 @@ describe('components/ChannelMembersModal', () => { test('should match state when onHide is called', () => { const wrapper = shallow( - + , ); wrapper.setState({show: true}); @@ -67,7 +67,7 @@ describe('components/ChannelMembersModal', () => { }, }; const wrapper = shallow( - + , ); (wrapper.instance() as ChannelMembersModal).onAddNewMembersButton(); @@ -77,7 +77,7 @@ describe('components/ChannelMembersModal', () => { test('should have state when Modal.onHide', () => { const wrapper = shallow( - + , ); wrapper.setState({show: true}); @@ -89,7 +89,7 @@ describe('components/ChannelMembersModal', () => { const props = {...baseProps, channel: {...baseProps.channel, delete_at: 1234}}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -97,7 +97,7 @@ describe('components/ChannelMembersModal', () => { test('renders the channel display name', () => { const wrapper = shallow( - + , ); expect(wrapper.find('.name').text()).toBe(baseProps.channel.display_name); }); @@ -105,7 +105,7 @@ describe('components/ChannelMembersModal', () => { test('should show the invite modal link if the user can manage channel members', () => { const newProps = {...baseProps, canManageChannelMembers: true}; const wrapper = shallow( - + , ); expect(wrapper.find('#showInviteModal').length).toBe(1); }); @@ -113,7 +113,7 @@ describe('components/ChannelMembersModal', () => { test('should not show the invite modal link if the user can not manage channel members', () => { const newProps = {...baseProps, canManageChannelMembers: false}; const wrapper = shallow( - + , ); expect(wrapper.find('#showInviteModal').length).toBe(0); }); @@ -128,7 +128,7 @@ describe('components/ChannelMembersModal', () => { }, }; const wrapper = shallow( - + , ); expect(openModal).not.toHaveBeenCalled(); (wrapper.instance() as ChannelMembersModal).onAddNewMembersButton(); diff --git a/components/channel_notifications_modal/channel_notifications_modal.test.jsx b/components/channel_notifications_modal/channel_notifications_modal.test.jsx index fb8540e476df..e70b5435f24a 100644 --- a/components/channel_notifications_modal/channel_notifications_modal.test.jsx +++ b/components/channel_notifications_modal/channel_notifications_modal.test.jsx @@ -34,7 +34,7 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -45,7 +45,7 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () + />, ); expect(wrapper.state('desktopNotifyLevel')).toEqual(NotificationLevels.DEFAULT); @@ -64,7 +64,7 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () }; const props = {...baseProps, currentUser}; const wrapper = shallow( - + , ); expect(wrapper.state('ignoreChannelMentions')).toEqual(IgnoreChannelMentions.OFF); @@ -80,7 +80,7 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () }; const props = {...baseProps, currentUser}; const wrapper = shallow( - + , ); expect(wrapper.state('ignoreChannelMentions')).toEqual(IgnoreChannelMentions.ON); @@ -101,7 +101,7 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () }; const props = {...baseProps, channelMember, currentUser}; const wrapper = shallow( - + , ); expect(wrapper.state('ignoreChannelMentions')).toEqual(IgnoreChannelMentions.OFF); @@ -122,7 +122,7 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () }; const props = {...baseProps, channelMember, currentUser}; const wrapper = shallow( - + , ); expect(wrapper.state('ignoreChannelMentions')).toEqual(IgnoreChannelMentions.ON); @@ -132,7 +132,7 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () const onHide = jest.fn(); const props = {...baseProps, onHide}; const wrapper = shallow( - + , ); wrapper.setState({activeSection: NotificationSections.DESKTOP, desktopNotifyLevel: NotificationLevels.NONE}); @@ -156,7 +156,7 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () test('should match state on updateSection', () => { const wrapper = shallow( - + , ); wrapper.setState({activeSection: NotificationSections.NONE}); @@ -166,7 +166,7 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () test('should reset state when collapsing a section', () => { const wrapper = shallow( - + , ); wrapper.instance().updateSection(NotificationSections.DESKTOP); @@ -181,7 +181,7 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () test('should match state on handleSubmitDesktopNotifyLevel', () => { const wrapper = shallow( - + , ); const instance = wrapper.instance(); @@ -200,7 +200,7 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () test('should match state on handleUpdateDesktopNotifyLevel', () => { const wrapper = shallow( - + , ); wrapper.setState({desktopNotifyLevel: NotificationLevels.ALL}); @@ -217,7 +217,7 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () }; const props = {...baseProps, channelMember}; const wrapper = shallow( - + , ); const instance = wrapper.instance(); @@ -243,7 +243,7 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () }; const props = {...baseProps, channelMember}; const wrapper = shallow( - + , ); wrapper.setState({markUnreadNotifyLevel: NotificationLevels.ALL}); @@ -261,7 +261,7 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () }; const props = {...baseProps, channelMember}; const wrapper = shallow( - + , ); const instance = wrapper.instance(); @@ -288,7 +288,7 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () }; const props = {...baseProps, channelMember}; const wrapper = shallow( - + , ); wrapper.setState({pushNotifyLevel: NotificationLevels.ALL}); @@ -306,7 +306,7 @@ describe('components/channel_notifications_modal/ChannelNotificationsModal', () channel: 'false', }; const wrapper = shallow( - + , ); wrapper.instance().resetStateFromNotifyProps(channelMemberNotifyProps, currentUserNotifyProps); diff --git a/components/channel_notifications_modal/components/collapse_view.test.jsx b/components/channel_notifications_modal/components/collapse_view.test.jsx index 88e1e5a15f88..eb58b75c3237 100644 --- a/components/channel_notifications_modal/components/collapse_view.test.jsx +++ b/components/channel_notifications_modal/components/collapse_view.test.jsx @@ -18,7 +18,7 @@ describe('components/channel_notifications_modal/CollapseView', () => { test('should match snapshot, DESKTOP on collapsed view', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -27,7 +27,7 @@ describe('components/channel_notifications_modal/CollapseView', () => { test('should match snapshot, PUSH on collapsed view', () => { const props = {...baseProps, section: NotificationSections.PUSH}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -36,7 +36,7 @@ describe('components/channel_notifications_modal/CollapseView', () => { test('should match snapshot, MARK_UNREAD on collapsed view', () => { const props = {...baseProps, section: NotificationSections.MARK_UNREAD, globalNotifyLevel: null}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/channel_notifications_modal/components/describe.test.jsx b/components/channel_notifications_modal/components/describe.test.jsx index 5e11536889af..cb42922e97ec 100644 --- a/components/channel_notifications_modal/components/describe.test.jsx +++ b/components/channel_notifications_modal/components/describe.test.jsx @@ -17,7 +17,7 @@ describe('components/channel_notifications_modal/NotificationSection', () => { test('should match snapshot, on global DEFAULT', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -26,7 +26,7 @@ describe('components/channel_notifications_modal/NotificationSection', () => { test('should match snapshot, on MENTION', () => { const props = {...baseProps, memberNotifyLevel: NotificationLevels.MENTION}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -35,7 +35,7 @@ describe('components/channel_notifications_modal/NotificationSection', () => { test('should match snapshot, on DESKTOP/PUSH & ALL', () => { const props = {...baseProps, memberNotifyLevel: NotificationLevels.ALL}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -44,7 +44,7 @@ describe('components/channel_notifications_modal/NotificationSection', () => { test('should match snapshot, on MARK_UNREAD & ALL', () => { const props = {...baseProps, section: NotificationSections.MARK_UNREAD, memberNotifyLevel: NotificationLevels.ALL, globalNotifyLevel: null}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -53,7 +53,7 @@ describe('components/channel_notifications_modal/NotificationSection', () => { test('should match snapshot, on NONE', () => { const props = {...baseProps, memberNotifyLevel: NotificationLevels.NONE}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/channel_notifications_modal/components/expand_view.test.jsx b/components/channel_notifications_modal/components/expand_view.test.jsx index ebc37886b0a9..bd724088aef3 100644 --- a/components/channel_notifications_modal/components/expand_view.test.jsx +++ b/components/channel_notifications_modal/components/expand_view.test.jsx @@ -21,7 +21,7 @@ describe('components/channel_notifications_modal/ExpandView', () => { test('should match snapshot, DESKTOP on expanded view', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -30,7 +30,7 @@ describe('components/channel_notifications_modal/ExpandView', () => { test('should match snapshot, PUSH on expanded view', () => { const props = {...baseProps, section: NotificationSections.PUSH}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -39,7 +39,7 @@ describe('components/channel_notifications_modal/ExpandView', () => { test('should match snapshot, MARK_UNREAD on expanded view', () => { const props = {...baseProps, section: NotificationSections.MARK_UNREAD, globalNotifyLevel: null}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/channel_notifications_modal/components/extra_info.test.jsx b/components/channel_notifications_modal/components/extra_info.test.jsx index 5d4dea2b547e..16acf5d375af 100644 --- a/components/channel_notifications_modal/components/extra_info.test.jsx +++ b/components/channel_notifications_modal/components/extra_info.test.jsx @@ -15,7 +15,7 @@ describe('components/channel_notifications_modal/ExtraInfo', () => { test('should match snapshot, on DESKTOP', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -24,7 +24,7 @@ describe('components/channel_notifications_modal/ExtraInfo', () => { test('should match snapshot, on PUSH', () => { const props = {...baseProps, section: NotificationSections.PUSH}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -33,7 +33,7 @@ describe('components/channel_notifications_modal/ExtraInfo', () => { test('should match snapshot, on MARK_UNREAD', () => { const props = {...baseProps, section: NotificationSections.MARK_UNREAD}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/channel_notifications_modal/components/notification_section.test.jsx b/components/channel_notifications_modal/components/notification_section.test.jsx index c19169a2792a..d8887f919ed6 100644 --- a/components/channel_notifications_modal/components/notification_section.test.jsx +++ b/components/channel_notifications_modal/components/notification_section.test.jsx @@ -22,7 +22,7 @@ describe('components/channel_notifications_modal/NotificationSection', () => { test('should match snapshot, DESKTOP on collapsed view', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -31,7 +31,7 @@ describe('components/channel_notifications_modal/NotificationSection', () => { test('should match snapshot, DESKTOP on expanded view', () => { const props = {...baseProps, expand: true}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -40,7 +40,7 @@ describe('components/channel_notifications_modal/NotificationSection', () => { test('should match snapshot, PUSH on collapsed view', () => { const props = {...baseProps, section: NotificationSections.PUSH}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -49,7 +49,7 @@ describe('components/channel_notifications_modal/NotificationSection', () => { test('should match snapshot, PUSH on expanded view', () => { const props = {...baseProps, section: NotificationSections.PUSH, expand: true}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -58,7 +58,7 @@ describe('components/channel_notifications_modal/NotificationSection', () => { test('should match snapshot, MARK_UNREAD on collapsed view', () => { const props = {...baseProps, section: NotificationSections.MARK_UNREAD, globalNotificationLevel: null}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -67,7 +67,7 @@ describe('components/channel_notifications_modal/NotificationSection', () => { test('should match snapshot, MARK_UNREAD on expanded view', () => { const props = {...baseProps, section: NotificationSections.MARK_UNREAD, expand: true, globalNotificationLevel: null}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -77,7 +77,7 @@ describe('components/channel_notifications_modal/NotificationSection', () => { const onChange = jest.fn(); const props = {...baseProps, expand: true, onChange}; const wrapper = shallow( - + , ); wrapper.instance().handleOnChange({target: {value: NotificationLevels.ALL}}); expect(onChange).toHaveBeenCalledTimes(1); @@ -88,7 +88,7 @@ describe('components/channel_notifications_modal/NotificationSection', () => { const onUpdateSection = jest.fn(); const props = {...baseProps, expand: true, onUpdateSection}; const wrapper = shallow( - + , ); wrapper.instance().handleExpandSection({preventDefault: jest.fn()}); expect(onUpdateSection).toHaveBeenCalledTimes(1); @@ -99,7 +99,7 @@ describe('components/channel_notifications_modal/NotificationSection', () => { const onUpdateSection = jest.fn(); const props = {...baseProps, expand: true, onUpdateSection}; const wrapper = shallow( - + , ); wrapper.instance().handleCollapseSection({preventDefault: jest.fn()}); expect(onUpdateSection).toHaveBeenCalledTimes(1); @@ -109,7 +109,7 @@ describe('components/channel_notifications_modal/NotificationSection', () => { test('should match snapshot on server error', () => { const props = {...baseProps, serverError: 'server error occurred'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/channel_notifications_modal/components/section_title.test.jsx b/components/channel_notifications_modal/components/section_title.test.jsx index bc7bc11d7a64..99b8044fe6be 100644 --- a/components/channel_notifications_modal/components/section_title.test.jsx +++ b/components/channel_notifications_modal/components/section_title.test.jsx @@ -15,7 +15,7 @@ describe('components/channel_notifications_modal/ExtraInfo', () => { test('should match snapshot, on DESKTOP', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -24,7 +24,7 @@ describe('components/channel_notifications_modal/ExtraInfo', () => { test('should match snapshot, on PUSH', () => { const props = {...baseProps, section: NotificationSections.PUSH}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -33,7 +33,7 @@ describe('components/channel_notifications_modal/ExtraInfo', () => { test('should match snapshot, on MARK_UNREAD', () => { const props = {...baseProps, section: NotificationSections.MARK_UNREAD}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/channel_select/channel_select.jsx b/components/channel_select/channel_select.jsx index 9e1e3c82222c..ed90c4fdbc98 100644 --- a/components/channel_select/channel_select.jsx +++ b/components/channel_select/channel_select.jsx @@ -46,7 +46,7 @@ export default class ChannelSelect extends React.PureComponent { value={channel.id} > {channelName} - + , ); } else if (channel.type === Constants.PRIVATE_CHANNEL && this.props.selectPrivate) { options.push( @@ -55,7 +55,7 @@ export default class ChannelSelect extends React.PureComponent { value={channel.id} > {channelName} - + , ); } else if (channel.type === Constants.DM_CHANNEL && this.props.selectDm) { options.push( @@ -64,7 +64,7 @@ export default class ChannelSelect extends React.PureComponent { value={channel.id} > {channelName} - + , ); } }); diff --git a/components/channel_select/index.js b/components/channel_select/index.js index 06af07ed5e9e..73b4e0d856e2 100644 --- a/components/channel_select/index.js +++ b/components/channel_select/index.js @@ -15,7 +15,7 @@ const getMyChannelsSorted = createSelector( getCurrentUserLocale, (channels, locale) => { return [...channels].sort(sortChannelsByTypeAndDisplayName.bind(null, locale)); - } + }, ); function mapStateToProps(state) { diff --git a/components/channel_selector_modal/channel_selector_modal.jsx b/components/channel_selector_modal/channel_selector_modal.jsx index 0a3aa038a672..4fc4be6a256a 100644 --- a/components/channel_selector_modal/channel_selector_modal.jsx +++ b/components/channel_selector_modal/channel_selector_modal.jsx @@ -67,7 +67,7 @@ export default class ChannelSelectorModal extends React.Component { this.setState({channels: response.data}); this.setChannelsLoadingState(false); }, - Constants.SEARCH_TIMEOUT_MILLISECONDS + Constants.SEARCH_TIMEOUT_MILLISECONDS, ); } } diff --git a/components/channel_view/channel_view.jsx b/components/channel_view/channel_view.jsx index 8dc3156b4377..2a347ea21570 100644 --- a/components/channel_view/channel_view.jsx +++ b/components/channel_view/channel_view.jsx @@ -42,7 +42,7 @@ export default class ChannelView extends React.PureComponent { data-a11y-sort-order='1' data-a11y-focus-child={true} data-a11y-order-reversed={true} - /> + />, ); } diff --git a/components/channel_view/channel_view.test.jsx b/components/channel_view/channel_view.test.jsx index 56b34da8e35a..f9be5c2a5703 100644 --- a/components/channel_view/channel_view.test.jsx +++ b/components/channel_view/channel_view.test.jsx @@ -33,7 +33,7 @@ describe('components/channel_view', () => { + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -44,7 +44,7 @@ describe('components/channel_view', () => { {...baseProps} channelRolesLoading={true} channelIsArchived={true} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/channel_view/index.js b/components/channel_view/index.js index f303f4572156..8a3d6d153233 100644 --- a/components/channel_view/index.js +++ b/components/channel_view/index.js @@ -26,7 +26,7 @@ const getDeactivatedChannel = createSelector( }, (teammate) => { return Boolean(teammate && teammate.delete_at); - } + }, ); function mapStateToProps(state) { diff --git a/components/claim/components/email_to_ldap.jsx b/components/claim/components/email_to_ldap.jsx index 25e61dc20bd0..411dfe2dc1ed 100644 --- a/components/claim/components/email_to_ldap.jsx +++ b/components/claim/components/email_to_ldap.jsx @@ -105,7 +105,7 @@ export default class EmailToLDAP extends React.Component { this.setState({serverError: err.message, showMfa: false}); } } - } + }, ); } diff --git a/components/claim/components/email_to_oauth.jsx b/components/claim/components/email_to_oauth.jsx index 2f8b6e883728..5c6c6d232b9a 100644 --- a/components/claim/components/email_to_oauth.jsx +++ b/components/claim/components/email_to_oauth.jsx @@ -63,7 +63,7 @@ export default class EmailToOAuth extends React.PureComponent { } else { this.setState({error: err.message, showMfa: false}); } - } + }, ); } diff --git a/components/claim/components/oauth_to_email.jsx b/components/claim/components/oauth_to_email.jsx index 3cc569350805..ef3138b6b546 100644 --- a/components/claim/components/oauth_to_email.jsx +++ b/components/claim/components/oauth_to_email.jsx @@ -66,7 +66,7 @@ export default class OAuthToEmail extends React.PureComponent { }, (err) => { this.setState({error: err.message}); - } + }, ); } render() { diff --git a/components/color_input.test.tsx b/components/color_input.test.tsx index 65b1d5b75129..af075d27b6e3 100644 --- a/components/color_input.test.tsx +++ b/components/color_input.test.tsx @@ -12,7 +12,7 @@ describe('components/ColorInput', () => { + />, ); expect(wrapper).toMatchSnapshot(); @@ -23,7 +23,7 @@ describe('components/ColorInput', () => { + />, ); wrapper.find('.input-group-addon').simulate('click'); @@ -36,7 +36,7 @@ describe('components/ColorInput', () => { + />, ); wrapper.find('.input-group-addon').simulate('click'); wrapper.find('.input-group-addon').simulate('click'); @@ -49,7 +49,7 @@ describe('components/ColorInput', () => { + />, ); wrapper.find('.input-group-addon').simulate('click'); @@ -63,7 +63,7 @@ describe('components/ColorInput', () => { + />, ); wrapper.setState({isOpened: true}); @@ -82,7 +82,7 @@ describe('components/ColorInput', () => { color='#ffffff' id='sidebarBg' onChange={onChange} - /> + />, ); const newColorData: any = {hex: '#ccc'}; diff --git a/components/common/back_button.tsx b/components/common/back_button.tsx index af8bbc18a5c2..8de7d872ee8e 100644 --- a/components/common/back_button.tsx +++ b/components/common/back_button.tsx @@ -20,7 +20,7 @@ type Props = { export default class BackButton extends React.PureComponent { public static defaultProps: Partial = { - url: '/' + url: '/', } public render(): JSX.Element { diff --git a/components/common/site_name_and_description.tsx b/components/common/site_name_and_description.tsx index 3b7b18b27601..86606301af4c 100644 --- a/components/common/site_name_and_description.tsx +++ b/components/common/site_name_and_description.tsx @@ -11,7 +11,7 @@ type Props = { export default class SiteNameAndDescription extends React.PureComponent { public static defaultProps: Partial = { - siteName: 'Mattermost' + siteName: 'Mattermost', } public render(): JSX.Element { diff --git a/components/copy_url_context_menu/copy_url_context_menu.test.jsx b/components/copy_url_context_menu/copy_url_context_menu.test.jsx index 0a8df7e6fb32..f05521cec9c0 100644 --- a/components/copy_url_context_menu/copy_url_context_menu.test.jsx +++ b/components/copy_url_context_menu/copy_url_context_menu.test.jsx @@ -20,7 +20,7 @@ describe('components/CopyUrlContextMenu', () => { const wrapper = shallow( {'Click'} - + , ); expect(wrapper).toMatchSnapshot(); @@ -41,7 +41,7 @@ describe('components/CopyUrlContextMenu', () => { const wrapper = shallow( {'Click'} - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/create_comment/create_comment.jsx b/components/create_comment/create_comment.jsx index fba876ff9535..519835b0a225 100644 --- a/components/create_comment/create_comment.jsx +++ b/components/create_comment/create_comment.jsx @@ -493,7 +493,7 @@ class CreateComment extends React.PureComponent { isTimezoneEnabled, groupsWithAllowReference, channelMemberCountsByGroup, - useGroupMentions + useGroupMentions, } = this.props; const {draft} = this.state; const notificationsToChannel = enableConfirmNotificationsToChannel && useChannelMentions; diff --git a/components/create_comment/create_comment.test.jsx b/components/create_comment/create_comment.test.jsx index e631f97d91c6..e9a4453f68b3 100644 --- a/components/create_comment/create_comment.test.jsx +++ b/components/create_comment/create_comment.test.jsx @@ -69,7 +69,7 @@ describe('components/CreateComment', () => { const props = {...baseProps, draft, enableAddButton, ctrlSend}; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -88,7 +88,7 @@ describe('components/CreateComment', () => { const props = {...baseProps, ctrlSend, draft, clearCommentDraftUploads, onResetHistoryIndex, getChannelMemberCountsByGroup}; const wrapper = shallowWithIntl( - + , ); // should clear draft uploads on mount @@ -122,7 +122,7 @@ describe('components/CreateComment', () => { }; const wrapper = shallowWithIntl( - + , ); wrapper.setState({draft}); @@ -131,7 +131,7 @@ describe('components/CreateComment', () => { test('should correctly change state when toggleEmojiPicker is called', () => { const wrapper = shallowWithIntl( - + , ); wrapper.instance().toggleEmojiPicker(); @@ -143,7 +143,7 @@ describe('components/CreateComment', () => { test('should correctly change state when hideEmojiPicker is called', () => { const wrapper = shallowWithIntl( - + , ); wrapper.instance().hideEmojiPicker(); @@ -161,7 +161,7 @@ describe('components/CreateComment', () => { const props = {...baseProps, draft, onUpdateCommentDraft, enableAddButton}; const wrapper = shallowWithIntl( - + , ); const mockImpl = () => { @@ -183,7 +183,7 @@ describe('components/CreateComment', () => { // Empty message case expect(onUpdateCommentDraft.mock.calls[0][0]).toEqual( - expect.objectContaining({message: ':smile: '}) + expect.objectContaining({message: ':smile: '}), ); expect(wrapper.state().draft.message).toBe(':smile: '); @@ -194,7 +194,7 @@ describe('components/CreateComment', () => { // Message with no space at the end expect(onUpdateCommentDraft.mock.calls[1][0]).toEqual( - expect.objectContaining({message: 'test :smile: '}) + expect.objectContaining({message: 'test :smile: '}), ); expect(wrapper.state().draft.message).toBe('test :smile: '); @@ -205,7 +205,7 @@ describe('components/CreateComment', () => { // Message with space at the end expect(onUpdateCommentDraft.mock.calls[2][0]).toEqual( - expect.objectContaining({message: 'test :smile: '}) + expect.objectContaining({message: 'test :smile: '}), ); expect(wrapper.state().draft.message).toBe('test :smile: '); @@ -214,7 +214,7 @@ describe('components/CreateComment', () => { test('handlePostError should update state with the correct error', () => { const wrapper = shallowWithIntl( - + , ); wrapper.instance().handlePostError('test error 1'); @@ -234,7 +234,7 @@ describe('components/CreateComment', () => { const props = {...baseProps, draft, updateCommentDraftWithRootId}; const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); @@ -247,7 +247,7 @@ describe('components/CreateComment', () => { expect(updateCommentDraftWithRootId).toHaveBeenCalled(); expect(updateCommentDraftWithRootId.mock.calls[0][0]).toEqual(props.rootId); expect(updateCommentDraftWithRootId.mock.calls[0][1]).toEqual( - expect.objectContaining({uploadsInProgress: [2, 3]}) + expect.objectContaining({uploadsInProgress: [2, 3]}), ); expect(wrapper.state().serverError.message).toBe(testError1); expect(wrapper.state().draft.uploadsInProgress).toEqual([2, 3]); @@ -263,7 +263,7 @@ describe('components/CreateComment', () => { test('getFileCount should return the correct count', () => { const wrapper = shallowWithIntl( - + , ); expect(wrapper.instance().getFileCount()).toBe(3); @@ -277,7 +277,7 @@ describe('components/CreateComment', () => { test('should correctly change state when showPostDeletedModal is called', () => { const wrapper = shallowWithIntl( - + , ); wrapper.instance().showPostDeletedModal(); @@ -288,7 +288,7 @@ describe('components/CreateComment', () => { const resetCreatePostRequest = jest.fn(); const props = {...baseProps, resetCreatePostRequest}; const wrapper = shallowWithIntl( - + , ); wrapper.instance().hidePostDeletedModal(); @@ -306,7 +306,7 @@ describe('components/CreateComment', () => { const props = {...baseProps, onUpdateCommentDraft, draft}; const wrapper = shallowWithIntl( - + , ); const focusTextbox = jest.fn(); @@ -316,7 +316,7 @@ describe('components/CreateComment', () => { expect(onUpdateCommentDraft).toHaveBeenCalled(); expect(onUpdateCommentDraft.mock.calls[0][0]).toEqual( - expect.objectContaining({uploadsInProgress: [1, 2, 3, 4, 5]}) + expect.objectContaining({uploadsInProgress: [1, 2, 3, 4, 5]}), ); expect(wrapper.state().draft.uploadsInProgress === [1, 2, 3, 4, 5]); @@ -334,7 +334,7 @@ describe('components/CreateComment', () => { const props = {...baseProps, updateCommentDraftWithRootId, draft}; const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); @@ -347,7 +347,7 @@ describe('components/CreateComment', () => { expect(updateCommentDraftWithRootId).toHaveBeenCalled(); expect(updateCommentDraftWithRootId.mock.calls[0][0]).toEqual(props.rootId); expect(updateCommentDraftWithRootId.mock.calls[0][1]).toEqual( - expect.objectContaining({uploadsInProgress: [1, 2], fileInfos: expectedNewFileInfos}) + expect.objectContaining({uploadsInProgress: [1, 2], fileInfos: expectedNewFileInfos}), ); expect(wrapper.state().draft.uploadsInProgress).toEqual([1, 2]); @@ -356,7 +356,7 @@ describe('components/CreateComment', () => { it('check for uploadsProgressPercent state on handleUploadProgress callback', () => { const wrapper = shallowWithIntl( - + , ); wrapper.find(FileUpload).prop('onUploadProgress')({clientId: 'clientId', name: 'name', percent: 10, type: 'type'}); @@ -375,7 +375,7 @@ describe('components/CreateComment', () => { const props = {...baseProps, onUpdateCommentDraft, draft}; const wrapper = shallowWithIntl( - + , ); wrapper.setProps({createPostErrorId: 'api.post.create_post.root_id.app_error'}); @@ -392,7 +392,7 @@ describe('components/CreateComment', () => { it('is called when rootId changes', () => { const props = {...baseProps, draft}; const wrapper = shallowWithIntl( - + , ); const focusTextbox = jest.fn(); @@ -412,7 +412,7 @@ describe('components/CreateComment', () => { it('is called when selectPostFocussedAt changes', () => { const props = {...baseProps, draft, selectedPostFocussedAt: 1000}; const wrapper = shallowWithIntl( - + , ); const focusTextbox = jest.fn(); @@ -432,7 +432,7 @@ describe('components/CreateComment', () => { it('is not called when rootId and selectPostFocussedAt have not changed', () => { const props = {...baseProps, draft, selectedPostFocussedAt: 1000}; const wrapper = shallowWithIntl( - + , ); const focusTextbox = jest.fn(); @@ -456,7 +456,7 @@ describe('components/CreateComment', () => { const props = {...baseProps, onUpdateCommentDraft, draft}; const wrapper = shallowWithIntl( - + , ); const testMessage = 'new msg'; @@ -466,7 +466,7 @@ describe('components/CreateComment', () => { expect(onUpdateCommentDraft).toHaveBeenCalled(); expect(onUpdateCommentDraft.mock.calls[0][0]).toEqual( - expect.objectContaining({message: testMessage}) + expect.objectContaining({message: testMessage}), ); expect(wrapper.state().draft.message).toBe(testMessage); expect(scrollToBottom).toHaveBeenCalled(); @@ -487,7 +487,7 @@ describe('components/CreateComment', () => { const props = {...baseProps, onUpdateCommentDraft, draft, onSubmit}; const wrapper = shallowWithIntl( - + , ); expect(wrapper.find('[id="postServerError"]').exists()).toBe(false); @@ -517,7 +517,7 @@ describe('components/CreateComment', () => { const props = {...baseProps, draft}; const wrapper = shallowWithIntl( - + , ); const scrollToBottom = jest.fn(); @@ -536,7 +536,7 @@ describe('components/CreateComment', () => { const props = {...baseProps, draft, onSubmit}; const wrapper = shallowWithIntl( - + , ); const preventDefault = jest.fn(); @@ -570,7 +570,7 @@ describe('components/CreateComment', () => { }; const wrapper = shallowWithIntl( - + , ); wrapper.instance().handleSubmit({preventDefault}); @@ -593,7 +593,7 @@ describe('components/CreateComment', () => { }; const wrapper = shallowWithIntl( - + , ); wrapper.instance().handleSubmit({preventDefault}); @@ -616,7 +616,7 @@ describe('components/CreateComment', () => { }; const wrapper = shallowWithIntl( - + , ); wrapper.instance().handleSubmit({preventDefault}); @@ -640,7 +640,7 @@ describe('components/CreateComment', () => { }; const wrapper = shallowWithIntl( - + , ); wrapper.instance().handleSubmit({preventDefault}); @@ -664,7 +664,7 @@ describe('components/CreateComment', () => { }; const wrapper = shallowWithIntl( - + , ); wrapper.instance().handleSubmit({preventDefault}); @@ -688,7 +688,7 @@ describe('components/CreateComment', () => { }; const wrapper = shallowWithIntl( - + , ); await wrapper.instance().handleSubmit({preventDefault}); @@ -716,7 +716,7 @@ describe('components/CreateComment', () => { }; const wrapper = shallowWithIntl( - + , ); await wrapper.instance().handleSubmit({preventDefault}); @@ -741,14 +741,14 @@ describe('components/CreateComment', () => { groupsWithAllowReference: new Map([ ['@developers', { id: 'developers', - name: 'developers' - }] + name: 'developers', + }], ]), channelMemberCountsByGroup: { developers: { channel_member_count: 10, channel_member_timezones_count: 0, - } + }, }, isTimezoneEnabled: false, channelMembersCount: 8, @@ -757,7 +757,7 @@ describe('components/CreateComment', () => { }; const wrapper = shallowWithIntl( - + , ); await wrapper.instance().handleSubmit({preventDefault}); @@ -830,7 +830,7 @@ describe('components/CreateComment', () => { }; const wrapper = shallowWithIntl( - + , ); await wrapper.instance().handleSubmit({preventDefault}); @@ -855,14 +855,14 @@ describe('components/CreateComment', () => { groupsWithAllowReference: new Map([ ['@developers', { id: 'developers', - name: 'developers' - }] + name: 'developers', + }], ]), channelMemberCountsByGroup: { developers: { channel_member_count: 10, channel_member_timezones_count: 5, - } + }, }, isTimezoneEnabled: true, channelMembersCount: 8, @@ -871,7 +871,7 @@ describe('components/CreateComment', () => { }; const wrapper = shallowWithIntl( - + , ); await wrapper.instance().handleSubmit({preventDefault}); @@ -901,7 +901,7 @@ describe('components/CreateComment', () => { }; const wrapper = shallowWithIntl( - + , ); expect(wrapper.find('[id="postServerError"]').exists()).toBe(false); @@ -935,7 +935,7 @@ describe('components/CreateComment', () => { }; const wrapper = shallowWithIntl( - + , ); const submitPromise = wrapper.instance().handleSubmit({preventDefault}); @@ -959,7 +959,7 @@ describe('components/CreateComment', () => { }; const wrapper = shallowWithIntl( - + , ); wrapper.instance().handleSubmit({preventDefault}); @@ -981,7 +981,7 @@ describe('components/CreateComment', () => { }; const wrapper = shallowWithIntl( - + , ); wrapper.instance().handleSubmit({preventDefault}); @@ -1003,7 +1003,7 @@ describe('components/CreateComment', () => { }; const wrapper = shallowWithIntl( - + , ); wrapper.instance().handleSubmit({preventDefault}); @@ -1022,7 +1022,7 @@ describe('components/CreateComment', () => { const props = {...baseProps, draft, onUpdateCommentDraft}; const wrapper = shallowWithIntl( - + , ); wrapper.setState({draft}); @@ -1030,13 +1030,13 @@ describe('components/CreateComment', () => { wrapper.instance().removePreview(3); expect(onUpdateCommentDraft).toHaveBeenCalled(); expect(onUpdateCommentDraft.mock.calls[0][0]).toEqual( - expect.objectContaining({fileInfos: [{id: 1}, {id: 2}]}) + expect.objectContaining({fileInfos: [{id: 1}, {id: 2}]}), ); expect(wrapper.state().draft.fileInfos).toEqual([{id: 1}, {id: 2}]); wrapper.instance().removePreview(5); expect(onUpdateCommentDraft.mock.calls[1][0]).toEqual( - expect.objectContaining({uploadsInProgress: [4, 6]}) + expect.objectContaining({uploadsInProgress: [4, 6]}), ); expect(wrapper.state().draft.uploadsInProgress).toEqual([4, 6]); }); @@ -1049,7 +1049,7 @@ describe('components/CreateComment', () => { }; const wrapper = shallowWithIntl( - + , ); expect(wrapper.state('draft')).toEqual(draft); @@ -1066,7 +1066,7 @@ describe('components/CreateComment', () => { }; const wrapper = shallowWithIntl( - + , ); wrapper.setState({draft}); expect(wrapper.state('draft')).toEqual(draft); @@ -1078,7 +1078,7 @@ describe('components/CreateComment', () => { test('should match snapshot read only channel', () => { const props = {...baseProps, readOnlyChannel: true}; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -1087,7 +1087,7 @@ describe('components/CreateComment', () => { test('should match snapshot when cannot post', () => { const props = {...baseProps, canPost: false}; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -1096,7 +1096,7 @@ describe('components/CreateComment', () => { test('should match snapshot, emoji picker disabled', () => { const props = {...baseProps, enableEmojiPicker: false}; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -1104,7 +1104,7 @@ describe('components/CreateComment', () => { test('check for handleFileUploadChange callback for focus', () => { const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); instance.focusTextbox = jest.fn(); @@ -1126,7 +1126,7 @@ describe('components/CreateComment', () => { onMoveHistoryIndexBack={onMoveHistoryIndexBack} onMoveHistoryIndexForward={onMoveHistoryIndexForward} onEditLatestPost={onEditLatestPost} - /> + />, ); const instance = wrapper.instance(); instance.commentMsgKeyPress = jest.fn(); @@ -1204,7 +1204,7 @@ describe('components/CreateComment', () => { }; const wrapper = shallowWithIntl( - + , ); wrapper.instance().scrollToBottom = jest.fn(); @@ -1233,7 +1233,7 @@ describe('components/CreateComment', () => { + />, ); wrapper.instance().scrollToBottom = jest.fn(); @@ -1260,7 +1260,7 @@ describe('components/CreateComment', () => { + />, ); const event = { @@ -1294,7 +1294,7 @@ describe('components/CreateComment', () => { + />, ); const mockTop = () => { @@ -1345,7 +1345,7 @@ describe('components/CreateComment', () => { + />, ); const mockTop = () => { @@ -1394,7 +1394,7 @@ describe('components/CreateComment', () => { test('should show preview and edit mode, and return focus on preview disable', () => { const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); instance.focusTextbox = jest.fn(); diff --git a/components/create_comment/index.js b/components/create_comment/index.js index 83d09d567efd..e3b09f1ab85c 100644 --- a/components/create_comment/index.js +++ b/components/create_comment/index.js @@ -62,7 +62,7 @@ function makeMapStateToProps() { channel: channel.id, team: channel.team_id, permission: Permissions.CREATE_POST, - } + }, ); const useChannelMentions = haveIChannelPermission(state, { channel: channel.id, @@ -156,7 +156,7 @@ function makeMapDispatchToProps() { getChannelTimezones, emitShortcutReactToLastPostFrom, setShowPreview: setShowPreviewOnCreateComment, - getChannelMemberCountsByGroup + getChannelMemberCountsByGroup, }, dispatch); }; } diff --git a/components/create_post/create_post.jsx b/components/create_post/create_post.jsx index ec8aad89b2b2..b5e32f6441e9 100644 --- a/components/create_post/create_post.jsx +++ b/components/create_post/create_post.jsx @@ -571,7 +571,7 @@ class CreatePost extends React.PureComponent { groupsWithAllowReference, channelMemberCountsByGroup, currentChannelMembersCount, - useGroupMentions + useGroupMentions, } = this.props; const notificationsToChannel = this.props.enableConfirmNotificationsToChannel && this.props.useChannelMentions; @@ -675,7 +675,7 @@ class CreatePost extends React.PureComponent { draft, useGroupMentions, useChannelMentions, - groupsWithAllowReference + groupsWithAllowReference, } = this.props; let post = originalPost; diff --git a/components/create_post/create_post.test.jsx b/components/create_post/create_post.test.jsx index 294d1d113bc3..4f75730e5878 100644 --- a/components/create_post/create_post.test.jsx +++ b/components/create_post/create_post.test.jsx @@ -293,7 +293,7 @@ describe('components/create_post', () => { ...actionsProp, setDraft, }, - }) + }), ); const postTextbox = wrapper.find('#post_textbox'); @@ -340,15 +340,15 @@ describe('components/create_post', () => { groupsWithAllowReference: new Map([ ['@developers', { id: 'developers', - name: 'developers' - }] + name: 'developers', + }], ]), channelMemberCountsByGroup: { developers: { channel_member_count: 10, channel_member_timezones_count: 0, - } - } + }, + }, }); wrapper.setState({ message: '@developers', @@ -411,7 +411,7 @@ describe('components/create_post', () => { channel_member_count: 5, channel_member_timezones_count: 0, }, - } + }, }); wrapper.setState({ message: '@developers @boss @love @you @software-developers', @@ -466,7 +466,7 @@ describe('components/create_post', () => { channel_member_count: 40, channel_member_timezones_count: 5, }, - } + }, }); wrapper.setState({ message: '@developers @boss @love @you', @@ -551,7 +551,7 @@ describe('components/create_post', () => { }, isTimezoneEnabled: true, currentChannelMembersCount: 9, - }) + }), ); wrapper.setState({ @@ -582,7 +582,7 @@ describe('components/create_post', () => { createPost({ getChannelTimezones: jest.fn(() => Promise.resolve([])), isTimezoneEnabled: false, - }) + }), ); wrapper.setState({ @@ -613,7 +613,7 @@ describe('components/create_post', () => { ...actionsProp, openModal, }, - }) + }), ); wrapper.setState({ @@ -636,7 +636,7 @@ describe('components/create_post', () => { ...actionsProp, openModal, }, - }) + }), ); wrapper.setState({ @@ -686,7 +686,7 @@ describe('components/create_post', () => { ...actionsProp, addReaction, }, - }) + }), ); wrapper.setState({ @@ -706,7 +706,7 @@ describe('components/create_post', () => { ...actionsProp, removeReaction, }, - }) + }), ); wrapper.setState({ @@ -754,7 +754,7 @@ describe('components/create_post', () => { ...actionsProp, setDraft, }, - }) + }), ); const instance = wrapper.instance(); @@ -780,7 +780,7 @@ describe('components/create_post', () => { ...actionsProp, setDraft, }, - }) + }), ); const instance = wrapper.instance(); @@ -820,7 +820,7 @@ describe('components/create_post', () => { ...actionsProp, setDraft, }, - }) + }), ); const instance = wrapper.instance(); @@ -872,7 +872,7 @@ describe('components/create_post', () => { ...draftProp, ...uploadsInProgressDraft, }, - }) + }), ); const instance = wrapper.instance(); @@ -949,7 +949,7 @@ describe('components/create_post', () => { return new Promise((resolve) => { process.nextTick(() => resolve()); }); - } + }, ); const wrapper = shallowWithIntl(createPost({ actions: { @@ -969,7 +969,7 @@ describe('components/create_post', () => { return new Promise((resolve) => { process.nextTick(() => resolve()); }); - } + }, ); const wrapper = shallowWithIntl(createPost({ actions: { @@ -1067,7 +1067,7 @@ describe('components/create_post', () => { executeCommand, onSubmitPost, }, - }) + }), ); wrapper.setState({ @@ -1106,7 +1106,7 @@ describe('components/create_post', () => { executeCommand, onSubmitPost, }, - }) + }), ); wrapper.setState({ @@ -1284,6 +1284,6 @@ describe('components/create_post', () => { testComponentForLineBreak( (value) => createPost({draft: {...draftProp, message: value}}), - (instance) => instance.state().message + (instance) => instance.state().message, ); }); diff --git a/components/create_post/index.js b/components/create_post/index.js index 2ef5ab582afe..3c1d13647105 100644 --- a/components/create_post/index.js +++ b/components/create_post/index.js @@ -78,7 +78,7 @@ function makeMapStateToProps() { channel: currentChannel.id, team: currentChannel.team_id, permission: Permissions.CREATE_POST, - } + }, ); const useChannelMentions = haveIChannelPermission(state, { channel: currentChannel.id, diff --git a/components/create_team/components/display_name.test.jsx b/components/create_team/components/display_name.test.jsx index ff47653a851a..13334a35f1b9 100644 --- a/components/create_team/components/display_name.test.jsx +++ b/components/create_team/components/display_name.test.jsx @@ -48,7 +48,7 @@ describe('/components/create_team/components/display_name', () => { + />, ); }); @@ -69,7 +69,7 @@ describe('/components/create_team/components/display_name', () => { min: Constants.MIN_TEAMNAME_LENGTH, max: Constants.MAX_TEAMNAME_LENGTH, }} - /> + />, ); }); }); diff --git a/components/create_team/components/team_url/team_url.test.jsx b/components/create_team/components/team_url/team_url.test.jsx index 15fdd58549c0..805fb9484e85 100644 --- a/components/create_team/components/team_url/team_url.test.jsx +++ b/components/create_team/components/team_url/team_url.test.jsx @@ -64,7 +64,7 @@ describe('/components/create_team/components/display_name', () => { const props = {...defaultProps, actions}; const wrapper = mountWithIntl( - + , ); await wrapper.instance().submitNext({preventDefault: jest.fn()}); @@ -88,7 +88,7 @@ describe('/components/create_team/components/display_name', () => { + />, ); }); @@ -111,7 +111,7 @@ describe('/components/create_team/components/display_name', () => { + />, ); }); @@ -123,7 +123,7 @@ describe('/components/create_team/components/display_name', () => { + />, ); }); }); diff --git a/components/create_team/create_team.test.tsx b/components/create_team/create_team.test.tsx index ecc5493356e2..13aed0eccac4 100644 --- a/components/create_team/create_team.test.tsx +++ b/components/create_team/create_team.test.tsx @@ -22,7 +22,7 @@ const match: RouterMatch<{ id: string }> = { isExact: false, path, url: path.replace(':id', '1'), - params: {id: '1'} + params: {id: '1'}, }; const location = createLocation(match.url); @@ -45,7 +45,7 @@ describe('/components/create_team', () => { extra_update_at: 1, creator_id: 'a', scheme_id: 'a', - group_constrained: false + group_constrained: false, }, currentTeam: { id: '1', @@ -62,7 +62,7 @@ describe('/components/create_team', () => { invite_id: 'a', allow_open_invite: true, scheme_id: 'a', - group_constrained: false + group_constrained: false, }, siteName: 'Mattermost', customBrand: true, @@ -70,12 +70,12 @@ describe('/components/create_team', () => { customDescriptionText: 'Welcome to our custom branded site!', match, history, - location + location, }; test('should match snapshot', () => { const wrapper: ShallowWrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -83,7 +83,7 @@ describe('/components/create_team', () => { test('should run props.history.push with new state', () => { const wrapper: ShallowWrapper = shallow( - + , ); const pushSpy = jest.spyOn(history, 'push'); diff --git a/components/create_team/create_team.tsx b/components/create_team/create_team.tsx index a3763f770a31..12948e955936 100644 --- a/components/create_team/create_team.tsx +++ b/components/create_team/create_team.tsx @@ -70,7 +70,7 @@ export default class CreateTeam extends React.PureComponent { creator_id: 'zaktnt8bpbgu8mb6ez9k64r7sa', scheme_id: '', props: null, - group_constrained: false + group_constrained: false, }; const currentTeamDetails = { @@ -41,7 +41,7 @@ describe('components/delete_channel_modal', () => { actions: { deleteChannel: jest.fn(() => { return {data: true}; - }) + }), }, onHide: jest.fn(), penultimateViewedChannelName: 'my-prev-channel', @@ -49,14 +49,14 @@ describe('components/delete_channel_modal', () => { test('should match snapshot for delete_channel_modal', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); test('should match state when onHide is called', () => { const wrapper = shallow( - + , ); wrapper.setState({show: true}); @@ -69,7 +69,7 @@ describe('components/delete_channel_modal', () => { const actions = {deleteChannel: jest.fn()}; const props = {...baseProps, actions}; const wrapper = shallow( - + , ); wrapper.setState({show: true}); @@ -84,7 +84,7 @@ describe('components/delete_channel_modal', () => { test('should have called props.onHide when Modal.onExited is called', () => { const props = {...baseProps}; const wrapper = shallow( - + , ); wrapper.find(Modal).props().onExited!(document.createElement('div')); diff --git a/components/delete_channel_modal/index.ts b/components/delete_channel_modal/index.ts index d94dfd91de23..d33623c2adb3 100644 --- a/components/delete_channel_modal/index.ts +++ b/components/delete_channel_modal/index.ts @@ -30,8 +30,8 @@ function mapDispatchToProps(dispatch: Dispatch) { { deleteChannel, }, - dispatch - ) + dispatch, + ), }; } diff --git a/components/delete_modal_trigger.test.jsx b/components/delete_modal_trigger.test.jsx index 16fe43d02992..dffab3d8b879 100644 --- a/components/delete_modal_trigger.test.jsx +++ b/components/delete_modal_trigger.test.jsx @@ -39,7 +39,7 @@ describe('components/DeleteModalTrigger', () => { const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); @@ -53,7 +53,7 @@ describe('components/DeleteModalTrigger', () => { const wrapper = shallow( + />, ); wrapper.setState({showDeleteModal: true}); @@ -68,7 +68,7 @@ describe('components/DeleteModalTrigger', () => { const wrapper = shallow( + />, ); wrapper.find(ConfirmModal).first().props().onConfirm(); @@ -83,7 +83,7 @@ describe('components/DeleteModalTrigger', () => { const wrapper = shallow( + />, ); wrapper.find(ConfirmModal).first().props().onKeyDown({key: Constants.KeyCodes.ENTER[0]}); @@ -98,7 +98,7 @@ describe('components/DeleteModalTrigger', () => { const wrapper = shallow( + />, ); wrapper.find(ConfirmModal).first().props().onKeyDown({key: Constants.KeyCodes.TAB[0]}); @@ -109,7 +109,7 @@ describe('components/DeleteModalTrigger', () => { class ChildModal extends DeleteModalTrigger {} const wrapper = shallow( - + , ); const preventDefault = jest.fn(); @@ -123,7 +123,7 @@ describe('components/DeleteModalTrigger', () => { class ChildModal extends DeleteModalTrigger {} const onDelete = jest.fn(); const wrapper = shallow( - + , ); wrapper.instance().handleConfirm(); @@ -134,7 +134,7 @@ describe('components/DeleteModalTrigger', () => { class ChildModal extends DeleteModalTrigger {} const wrapper = shallow( - + , ); wrapper.setState({showDeleteModal: true}); @@ -146,7 +146,7 @@ describe('components/DeleteModalTrigger', () => { class ChildModal extends DeleteModalTrigger {} const onDelete = jest.fn(); const wrapper = shallow( - + , ); const evt = {key: Constants.KeyCodes.ENTER[0]}; const instance = wrapper.instance(); diff --git a/components/delete_post_modal/delete_post_modal.test.jsx b/components/delete_post_modal/delete_post_modal.test.jsx index f1e4face87d6..ebfda657324a 100644 --- a/components/delete_post_modal/delete_post_modal.test.jsx +++ b/components/delete_post_modal/delete_post_modal.test.jsx @@ -36,7 +36,7 @@ describe('components/delete_post_modal', () => { test('should match snapshot for delete_post_modal with 0 comments', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -45,7 +45,7 @@ describe('components/delete_post_modal', () => { const commentCount = 1; const props = {...baseProps, commentCount}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -64,14 +64,14 @@ describe('components/delete_post_modal', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); test('should focus delete button on enter', () => { const wrapper = shallow( - + , ); const deletePostBtn = {focus: jest.fn()}; @@ -83,7 +83,7 @@ describe('components/delete_post_modal', () => { test('should match state when onHide is called', () => { const wrapper = shallow( - + , ); wrapper.setState({show: true}); @@ -93,7 +93,7 @@ describe('components/delete_post_modal', () => { test('should match state when the cancel button is clicked', () => { const wrapper = shallow( - + , ); wrapper.setState({show: true}); @@ -109,11 +109,11 @@ describe('components/delete_post_modal', () => { deleteAndRemovePost, }, location: { - pathname: '/teamname/messages/@username' - } + pathname: '/teamname/messages/@username', + }, }; const wrapper = shallow( - + , ); wrapper.setState({show: true}); @@ -132,12 +132,12 @@ describe('components/delete_post_modal', () => { deleteAndRemovePost, }, location: { - pathname: '/teamname/messages/@username/123' - } + pathname: '/teamname/messages/@username/123', + }, }; const wrapper = shallow( - + , ); wrapper.setState({show: true}); @@ -154,12 +154,12 @@ describe('components/delete_post_modal', () => { deleteAndRemovePost, }, location: { - pathname: '/teamname/channels/channelName/123' - } + pathname: '/teamname/channels/channelName/123', + }, }; const wrapper = shallow( - + , ); wrapper.setState({show: true}); @@ -172,7 +172,7 @@ describe('components/delete_post_modal', () => { const onHide = jest.fn(); const props = {...baseProps, onHide}; const wrapper = shallow( - + , ); wrapper.find(Modal).props().onExited(); diff --git a/components/do_verify_email/do_verify_email.test.tsx b/components/do_verify_email/do_verify_email.test.tsx index a83a3ec39d6a..e74b16d5f80e 100644 --- a/components/do_verify_email/do_verify_email.test.tsx +++ b/components/do_verify_email/do_verify_email.test.tsx @@ -9,7 +9,7 @@ import DoVerifyEmail from 'components/do_verify_email/do_verify_email'; describe('components/DoVerifyEmail', () => { const requiredProps = { location: { - search: '?token=9f392f193973g11ggh398h39hg0ghH&email=test@example.com' + search: '?token=9f392f193973g11ggh398h39hg0ghH&email=test@example.com', }, siteName: 'Mattermost', actions: { @@ -23,7 +23,7 @@ describe('components/DoVerifyEmail', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -31,7 +31,7 @@ describe('components/DoVerifyEmail', () => { test('should show verifyStatus as pending', () => { const wrapper = shallow( - + , ); expect(wrapper.state('verifyStatus')).toEqual('pending'); @@ -39,7 +39,7 @@ describe('components/DoVerifyEmail', () => { test('should set serverError state on mount', () => { const wrapper = shallow( - + , ); expect(wrapper.state('serverError')).toBeDefined(); diff --git a/components/dot_menu/dot_menu.test.jsx b/components/dot_menu/dot_menu.test.jsx index daa33690e566..d83b5be19e0d 100644 --- a/components/dot_menu/dot_menu.test.jsx +++ b/components/dot_menu/dot_menu.test.jsx @@ -46,7 +46,7 @@ describe('components/dot_menu/DotMenu', () => { canEdit: true, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -65,7 +65,7 @@ describe('components/dot_menu/DotMenu', () => { canDelete: true, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -78,7 +78,7 @@ describe('components/dot_menu/DotMenu', () => { canDelete: true, }; const wrapper = shallow( - + , ); expect(wrapper.state('canEdit')).toBe(true); @@ -101,7 +101,7 @@ describe('components/dot_menu/DotMenu', () => { }, }; const wrapper = shallow( - + , ); expect(wrapper.find('#divider_post_post_id_1_edit').exists()).toBe(false); @@ -109,7 +109,7 @@ describe('components/dot_menu/DotMenu', () => { test('should have divider when plugin menu item exists', () => { const wrapper = shallow( - + , ); expect(wrapper.find('#divider_post_post_id_1_plugins').exists()).toBe(false); @@ -123,7 +123,7 @@ describe('components/dot_menu/DotMenu', () => { test('should have divider when pluggable menu item exists', () => { const wrapper = shallow( - + , ); expect(wrapper.find('#divider_post_post_id_1_plugins').exists()).toBe(false); @@ -137,7 +137,7 @@ describe('components/dot_menu/DotMenu', () => { test('should show mark as unread when channel is not archived', () => { const wrapper = shallow( - + , ); expect(wrapper.find(`#unread_post_${baseProps.post.id}`).prop('show')).toBe(true); @@ -149,7 +149,7 @@ describe('components/dot_menu/DotMenu', () => { channelIsArchived: true, }; const wrapper = shallow( - + , ); expect(wrapper.find(`#unread_post_${baseProps.post.id}`).prop('show')).toBe(false); @@ -161,7 +161,7 @@ describe('components/dot_menu/DotMenu', () => { location: Locations.SEARCH, }; const wrapper = shallow( - + , ); expect(wrapper.find(`#unread_post_${baseProps.post.id}`).prop('show')).toBe(false); diff --git a/components/dot_menu/dot_menu_empty.test.jsx b/components/dot_menu/dot_menu_empty.test.jsx index 10392ba6ad39..f91a6deee30d 100644 --- a/components/dot_menu/dot_menu_empty.test.jsx +++ b/components/dot_menu/dot_menu_empty.test.jsx @@ -45,7 +45,7 @@ describe('components/dot_menu/DotMenu returning empty ("")', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/dot_menu/dot_menu_mobile.test.jsx b/components/dot_menu/dot_menu_mobile.test.jsx index 2e3d9b97dfa4..eaa6da1b3714 100644 --- a/components/dot_menu/dot_menu_mobile.test.jsx +++ b/components/dot_menu/dot_menu_mobile.test.jsx @@ -45,7 +45,7 @@ describe('components/dot_menu/DotMenu on mobile view', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/edit_channel_header_modal/edit_channel_header_modal.test.jsx b/components/edit_channel_header_modal/edit_channel_header_modal.test.jsx index 55949900e195..8b461d7a0b51 100644 --- a/components/edit_channel_header_modal/edit_channel_header_modal.test.jsx +++ b/components/edit_channel_header_modal/edit_channel_header_modal.test.jsx @@ -43,7 +43,7 @@ describe('components/EditChannelHeaderModal', () => { test('should match snapshot, init', () => { const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -57,7 +57,7 @@ describe('components/EditChannelHeaderModal', () => { + />, ); expect(wrapper).toMatchSnapshot(); @@ -65,7 +65,7 @@ describe('components/EditChannelHeaderModal', () => { test('submitted', () => { const wrapper = shallowWithIntl( - + , ); wrapper.setState({saving: true}); @@ -75,7 +75,7 @@ describe('components/EditChannelHeaderModal', () => { test('error with intl message', () => { const wrapper = shallowWithIntl( - + , ); wrapper.setState({serverError: {...serverError, server_error_id: 'model.channel.is_valid.header.app_error'}}); @@ -84,7 +84,7 @@ describe('components/EditChannelHeaderModal', () => { test('error without intl message', () => { const wrapper = shallowWithIntl( - + , ); wrapper.setState({serverError}); @@ -93,7 +93,7 @@ describe('components/EditChannelHeaderModal', () => { test('should match state and called actions on handleSave', async () => { const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); @@ -118,19 +118,19 @@ describe('components/EditChannelHeaderModal', () => { test('change header', () => { const wrapper = shallowWithIntl( - + , ); wrapper.find(Textbox).simulate('change', {target: {value: 'header'}}); expect( - wrapper.state('header') + wrapper.state('header'), ).toBe('header'); }); test('patch on save button click', () => { const wrapper = shallowWithIntl( - + , ); const newHeader = 'New channel header'; @@ -145,7 +145,7 @@ describe('components/EditChannelHeaderModal', () => { + />, ); const newHeader = 'New channel header'; @@ -164,7 +164,7 @@ describe('components/EditChannelHeaderModal', () => { test('patch on enter keypress', () => { const wrapper = shallowWithIntl( - + , ); const newHeader = 'New channel header'; @@ -186,7 +186,7 @@ describe('components/EditChannelHeaderModal', () => { + />, ); const newHeader = 'New channel header'; diff --git a/components/edit_channel_purpose_modal/edit_channel_purpose_modal.jsx b/components/edit_channel_purpose_modal/edit_channel_purpose_modal.jsx index 023e49de7226..efce8efd4e85 100644 --- a/components/edit_channel_purpose_modal/edit_channel_purpose_modal.jsx +++ b/components/edit_channel_purpose_modal/edit_channel_purpose_modal.jsx @@ -58,7 +58,7 @@ class EditChannelPurposeModal extends React.PureComponent { this.setState({ serverError: Utils.localizeMessage( 'edit_channel_purpose_modal.error', - 'This channel purpose is too long, please enter a shorter one' + 'This channel purpose is too long, please enter a shorter one', ), }); } else { diff --git a/components/edit_channel_purpose_modal/edit_channel_purpose_modal.test.jsx b/components/edit_channel_purpose_modal/edit_channel_purpose_modal.test.jsx index 9d1b3c6854c0..cd5a956f1b14 100644 --- a/components/edit_channel_purpose_modal/edit_channel_purpose_modal.test.jsx +++ b/components/edit_channel_purpose_modal/edit_channel_purpose_modal.test.jsx @@ -22,7 +22,7 @@ describe('comoponents/EditChannelPurposeModal', () => { onModalDismissed={jest.fn()} actions={{patchChannel: jest.fn()}} />, - {disableLifecycleMethods: true} + {disableLifecycleMethods: true}, ); expect(wrapper).toMatchSnapshot(); @@ -42,7 +42,7 @@ describe('comoponents/EditChannelPurposeModal', () => { onModalDismissed={jest.fn()} actions={{patchChannel: jest.fn()}} />, - {disableLifecycleMethods: true} + {disableLifecycleMethods: true}, ); expect(wrapper).toMatchSnapshot(); @@ -62,7 +62,7 @@ describe('comoponents/EditChannelPurposeModal', () => { onModalDismissed={jest.fn()} actions={{patchChannel: jest.fn()}} />, - {disableLifecycleMethods: true} + {disableLifecycleMethods: true}, ); expect(wrapper).toMatchSnapshot(); @@ -77,7 +77,7 @@ describe('comoponents/EditChannelPurposeModal', () => { onModalDismissed={jest.fn()} actions={{patchChannel: jest.fn()}} />, - {disableLifecycleMethods: true} + {disableLifecycleMethods: true}, ).dive(); expect(wrapper).toMatchSnapshot(); @@ -97,7 +97,7 @@ describe('comoponents/EditChannelPurposeModal', () => { onModalDismissed={jest.fn()} actions={{patchChannel: jest.fn().mockResolvedValue({error: serverError})}} />, - {disableLifecycleMethods: true} + {disableLifecycleMethods: true}, ); const instance = wrapper.instance(); @@ -120,7 +120,7 @@ describe('comoponents/EditChannelPurposeModal', () => { onModalDismissed={jest.fn()} actions={{patchChannel: jest.fn().mockResolvedValue({error: serverError})}} />, - {disableLifecycleMethods: true} + {disableLifecycleMethods: true}, ); const instance = wrapper.instance(); @@ -138,7 +138,7 @@ describe('comoponents/EditChannelPurposeModal', () => { onModalDismissed={jest.fn()} actions={{patchChannel: jest.fn().mockResolvedValue({data: true})}} />, - {disableLifecycleMethods: true} + {disableLifecycleMethods: true}, ); const serverError = { @@ -161,7 +161,7 @@ describe('comoponents/EditChannelPurposeModal', () => { onModalDismissed={jest.fn()} actions={{patchChannel: jest.fn()}} />, - {disableLifecycleMethods: true} + {disableLifecycleMethods: true}, ); wrapper.find('textarea').simulate( @@ -169,7 +169,7 @@ describe('comoponents/EditChannelPurposeModal', () => { { preventDefault: jest.fn(), target: {value: 'new info'}, - } + }, ); expect(wrapper.state('purpose')).toBe('new info'); @@ -184,7 +184,7 @@ describe('comoponents/EditChannelPurposeModal', () => { onModalDismissed={jest.fn()} actions={{patchChannel: jest.fn().mockResolvedValue({data: true})}} />, - {disableLifecycleMethods: true} + {disableLifecycleMethods: true}, ); const instance = wrapper.instance(); await instance.handleSave(); @@ -203,7 +203,7 @@ describe('comoponents/EditChannelPurposeModal', () => { onModalDismissed={jest.fn()} actions={{patchChannel}} />, - {disableLifecycleMethods: true} + {disableLifecycleMethods: true}, ); wrapper.find('.save-button').simulate('click'); @@ -222,7 +222,7 @@ describe('comoponents/EditChannelPurposeModal', () => { onModalDismissed={jest.fn()} actions={{patchChannel}} />, - {disableLifecycleMethods: true} + {disableLifecycleMethods: true}, ); wrapper.find('textarea').simulate('keydown', { @@ -246,7 +246,7 @@ describe('comoponents/EditChannelPurposeModal', () => { onModalDismissed={jest.fn()} actions={{patchChannel}} />, - {disableLifecycleMethods: true} + {disableLifecycleMethods: true}, ); wrapper.find('textarea').simulate('keydown', { diff --git a/components/emoji/add_emoji/add_emoji.test.js b/components/emoji/add_emoji/add_emoji.test.js index 25d9bc757962..4ba4a6ba0460 100644 --- a/components/emoji/add_emoji/add_emoji.test.js +++ b/components/emoji/add_emoji/add_emoji.test.js @@ -28,7 +28,7 @@ describe('components/emoji/components/AddEmoji', () => { test('should match snapshot', () => { const wrapper = shallow( , - {context} + {context}, ); expect(wrapper).toMatchSnapshot(); @@ -40,7 +40,7 @@ describe('components/emoji/components/AddEmoji', () => { test('should update emoji name and match snapshot', () => { const wrapper = shallow( , - {context} + {context}, ); const nameInput = wrapper.find('#name'); @@ -52,7 +52,7 @@ describe('components/emoji/components/AddEmoji', () => { test('should select a file and match snapshot', () => { const wrapper = shallow( , - {context} + {context}, ); const file = new Blob([image], {type: 'image/png'}); @@ -85,7 +85,7 @@ describe('components/emoji/components/AddEmoji', () => { test('should submit the new added emoji', () => { const wrapper = shallow( , - {context} + {context}, ); const file = new Blob([image], {type: 'image/png'}); diff --git a/components/emoji/emoji_list/emoji_list.jsx b/components/emoji/emoji_list/emoji_list.jsx index 285570be6d77..f63bf11850c8 100644 --- a/components/emoji/emoji_list/emoji_list.jsx +++ b/components/emoji/emoji_list/emoji_list.jsx @@ -154,7 +154,7 @@ export default class EmojiList extends React.Component { - + , ); } else if (this.props.emojiIds.length === 0 || (searchEmojis && searchEmojis.length === 0)) { emojis.push( @@ -168,7 +168,7 @@ export default class EmojiList extends React.Component { defaultMessage='No custom emoji found' /> - + , ); } else if (searchEmojis) { searchEmojis.forEach((emojiId) => { @@ -177,7 +177,7 @@ export default class EmojiList extends React.Component { key={'emoji_search_item' + emojiId} emojiId={emojiId} onDelete={this.deleteFromSearch} - /> + />, ); }); } else { @@ -190,7 +190,7 @@ export default class EmojiList extends React.Component { + />, ); }); diff --git a/components/emoji_picker/components/emoji_picker_header.test.jsx b/components/emoji_picker/components/emoji_picker_header.test.jsx index a10759183f64..86dd98401018 100644 --- a/components/emoji_picker/components/emoji_picker_header.test.jsx +++ b/components/emoji_picker/components/emoji_picker_header.test.jsx @@ -13,7 +13,7 @@ describe('components/emoji_picker/components/EmojiPickerHeader', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -24,7 +24,7 @@ describe('components/emoji_picker/components/EmojiPickerHeader', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/emoji_picker/emoji_picker.jsx b/components/emoji_picker/emoji_picker.jsx index 08901c573976..dd2479bb349e 100644 --- a/components/emoji_picker/emoji_picker.jsx +++ b/components/emoji_picker/emoji_picker.jsx @@ -142,7 +142,7 @@ export default class EmojiPicker extends React.PureComponent { incrementEmojiPickerPage: PropTypes.func.isRequired, }).isRequired, filter: PropTypes.string.isRequired, - handleFilterChange: PropTypes.func.isRequired + handleFilterChange: PropTypes.func.isRequired, }; static defaultProps = { diff --git a/components/emoji_picker/emoji_picker.test.jsx b/components/emoji_picker/emoji_picker.test.jsx index 9b393001479f..b514c6b636a7 100644 --- a/components/emoji_picker/emoji_picker.test.jsx +++ b/components/emoji_picker/emoji_picker.test.jsx @@ -67,12 +67,12 @@ describe('components/emoji_picker/EmojiPicker', () => { recentEmojis: [], actions, filter: '', - handleFilterChange: jest.fn() + handleFilterChange: jest.fn(), }; test('Recent category should not exist if there are no recent emojis', () => { const wrapper = shallow( - + , ); wrapper.instance().emojiPickerContainer = { @@ -96,7 +96,7 @@ describe('components/emoji_picker/EmojiPicker', () => { }; const wrapper = shallow( - + , ); wrapper.instance().emojiPickerContainer = { @@ -121,7 +121,7 @@ describe('components/emoji_picker/EmojiPicker', () => { }; const wrapper = await shallow( - + , ); wrapper.instance().emojiPickerContainer = { diff --git a/components/emoji_picker/emoji_picker_tabs.jsx b/components/emoji_picker/emoji_picker_tabs.jsx index 9a77dbffd3fd..47805cde5365 100644 --- a/components/emoji_picker/emoji_picker_tabs.jsx +++ b/components/emoji_picker/emoji_picker_tabs.jsx @@ -36,7 +36,7 @@ export default class EmojiPickerTabs extends PureComponent { this.state = { emojiTabVisible: true, - filter: '' + filter: '', }; } diff --git a/components/error_page/error_link.test.tsx b/components/error_page/error_link.test.tsx index e4485a6787dd..fd2b58c61b3f 100644 --- a/components/error_page/error_link.test.tsx +++ b/components/error_page/error_link.test.tsx @@ -15,7 +15,7 @@ describe('components/error_page/ErrorLink', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/error_page/error_message.test.tsx b/components/error_page/error_message.test.tsx index 756b01b86edf..21c9984936b0 100644 --- a/components/error_page/error_message.test.tsx +++ b/components/error_page/error_message.test.tsx @@ -17,7 +17,7 @@ describe('components/error_page/ErrorMessage', () => { test('should match snapshot, local_storage type', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -26,7 +26,7 @@ describe('components/error_page/ErrorMessage', () => { test('should match snapshot, permalink_not_found type', () => { const props = {...baseProps, type: ErrorPageTypes.PERMALINK_NOT_FOUND}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -35,7 +35,7 @@ describe('components/error_page/ErrorMessage', () => { test('should match snapshot, oauth_missing_code type', () => { const props = {...baseProps, type: ErrorPageTypes.OAUTH_MISSING_CODE, service: 'Gitlab'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -44,7 +44,7 @@ describe('components/error_page/ErrorMessage', () => { test('should match snapshot, oauth_access_denied type', () => { const props = {...baseProps, type: ErrorPageTypes.OAUTH_ACCESS_DENIED, service: 'Gitlab'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -53,7 +53,7 @@ describe('components/error_page/ErrorMessage', () => { test('should match snapshot, oauth_invalid_param type', () => { const props = {...baseProps, type: ErrorPageTypes.OAUTH_INVALID_PARAM, message: 'error message'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -62,7 +62,7 @@ describe('components/error_page/ErrorMessage', () => { test('should match snapshot, page_not_found type', () => { const props = {...baseProps, type: ErrorPageTypes.PAGE_NOT_FOUND}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -71,7 +71,7 @@ describe('components/error_page/ErrorMessage', () => { test('should match snapshot, team_not_found type', () => { const props = {...baseProps, type: ErrorPageTypes.TEAM_NOT_FOUND}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -80,7 +80,7 @@ describe('components/error_page/ErrorMessage', () => { test('should match snapshot, channel_not_found type', () => { const props = {...baseProps, type: ErrorPageTypes.CHANNEL_NOT_FOUND}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -89,7 +89,7 @@ describe('components/error_page/ErrorMessage', () => { + />, ); expect(wrapper2).toMatchSnapshot(); @@ -98,7 +98,7 @@ describe('components/error_page/ErrorMessage', () => { test('should match snapshot, no type but with message', () => { const props = {...baseProps, type: '', message: 'error message'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -107,7 +107,7 @@ describe('components/error_page/ErrorMessage', () => { test('should match snapshot, no type nor message', () => { const props = {...baseProps, type: '', message: ''}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/error_page/error_title.test.tsx b/components/error_page/error_title.test.tsx index e01a3ddbfa51..dc21050d1dea 100644 --- a/components/error_page/error_title.test.tsx +++ b/components/error_page/error_title.test.tsx @@ -16,7 +16,7 @@ describe('components/error_page/ErrorTitle', () => { test('should match snapshot, local_storage type', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -25,7 +25,7 @@ describe('components/error_page/ErrorTitle', () => { test('should match snapshot, permalink_not_found type', () => { const props = {...baseProps, type: ErrorPageTypes.PERMALINK_NOT_FOUND}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -34,7 +34,7 @@ describe('components/error_page/ErrorTitle', () => { test('should match snapshot, oauth_missing_code type', () => { const props = {...baseProps, type: ErrorPageTypes.OAUTH_MISSING_CODE}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -43,7 +43,7 @@ describe('components/error_page/ErrorTitle', () => { test('should match snapshot, oauth_access_denied type', () => { const props = {...baseProps, type: ErrorPageTypes.OAUTH_ACCESS_DENIED}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -52,7 +52,7 @@ describe('components/error_page/ErrorTitle', () => { test('should match snapshot, oauth_invalid_param type', () => { const props = {...baseProps, type: ErrorPageTypes.OAUTH_INVALID_PARAM}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -61,7 +61,7 @@ describe('components/error_page/ErrorTitle', () => { test('should match snapshot, page_not_found type', () => { const props = {...baseProps, type: ErrorPageTypes.PAGE_NOT_FOUND}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -70,7 +70,7 @@ describe('components/error_page/ErrorTitle', () => { test('should match snapshot, team_not_found type', () => { const props = {...baseProps, type: ErrorPageTypes.TEAM_NOT_FOUND}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -79,7 +79,7 @@ describe('components/error_page/ErrorTitle', () => { test('should match snapshot, channel_not_found type', () => { const props = {...baseProps, type: ErrorPageTypes.CHANNEL_NOT_FOUND}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -88,7 +88,7 @@ describe('components/error_page/ErrorTitle', () => { test('should match snapshot, no type but with title', () => { const props = {...baseProps, type: '', title: 'error title'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -97,7 +97,7 @@ describe('components/error_page/ErrorTitle', () => { test('should match snapshot, no type nor title', () => { const props = {...baseProps, type: '', title: ''}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/favicon_title_handler/favicon_title_handler.test.jsx b/components/favicon_title_handler/favicon_title_handler.test.jsx index d99eae7fd27c..b18283cef834 100644 --- a/components/favicon_title_handler/favicon_title_handler.test.jsx +++ b/components/favicon_title_handler/favicon_title_handler.test.jsx @@ -42,7 +42,7 @@ describe('components/FaviconTitleHandler', () => { test('set correctly the title when needed', () => { const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); instance.updateTitle(); @@ -70,7 +70,7 @@ describe('components/FaviconTitleHandler', () => { document.head.appendChild(link); const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); instance.updateFavicon = jest.fn(); diff --git a/components/file_attachment/file_thumbnail/file_thumbnail.test.tsx b/components/file_attachment/file_thumbnail/file_thumbnail.test.tsx index dff9dc1053a4..78beeb4c5735 100644 --- a/components/file_attachment/file_thumbnail/file_thumbnail.test.tsx +++ b/components/file_attachment/file_thumbnail/file_thumbnail.test.tsx @@ -29,7 +29,7 @@ describe('FileThumbnail', () => { test('should render a small image', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -46,7 +46,7 @@ describe('FileThumbnail', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -63,7 +63,7 @@ describe('FileThumbnail', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -81,7 +81,7 @@ describe('FileThumbnail', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -98,7 +98,7 @@ describe('FileThumbnail', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/file_attachment/filename_overlay.test.tsx b/components/file_attachment/filename_overlay.test.tsx index 113c1fc0057e..40ffc88430e3 100644 --- a/components/file_attachment/filename_overlay.test.tsx +++ b/components/file_attachment/filename_overlay.test.tsx @@ -35,7 +35,7 @@ describe('components/file_attachment/FilenameOverlay', () => { test('should match snapshot, standard display', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -45,7 +45,7 @@ describe('components/file_attachment/FilenameOverlay', () => { const handleImageClick = jest.fn(); const props = {...baseProps, compactDisplay: true, handleImageClick}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -60,7 +60,7 @@ describe('components/file_attachment/FilenameOverlay', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -72,7 +72,7 @@ describe('components/file_attachment/FilenameOverlay', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/file_attachment_list/file_attachment_list.jsx b/components/file_attachment_list/file_attachment_list.jsx index 0f71f3fa10c8..8b7f3704ff38 100644 --- a/components/file_attachment_list/file_attachment_list.jsx +++ b/components/file_attachment_list/file_attachment_list.jsx @@ -91,7 +91,7 @@ export default class FileAttachmentList extends React.Component { index={i} handleImageClick={this.handleImageClick} compactDisplay={compactDisplay} - /> + />, ); } } else if (fileCount > 0) { @@ -101,7 +101,7 @@ export default class FileAttachmentList extends React.Component {
+ />, ); } } diff --git a/components/file_attachment_list/file_attachment_list.test.jsx b/components/file_attachment_list/file_attachment_list.test.jsx index 42aeda51c087..11041364c336 100644 --- a/components/file_attachment_list/file_attachment_list.test.jsx +++ b/components/file_attachment_list/file_attachment_list.test.jsx @@ -37,7 +37,7 @@ describe('FileAttachmentList', () => { }; const wrapper = shallow( - + , ); expect(wrapper.find(FileAttachment).exists()).toBe(true); @@ -45,7 +45,7 @@ describe('FileAttachmentList', () => { test('should render multiple, sorted FileAttachments for multiple files', () => { const wrapper = shallow( - + , ); expect(wrapper.find(FileAttachment)).toHaveLength(3); @@ -63,7 +63,7 @@ describe('FileAttachmentList', () => { }; const wrapper = shallow( - + , ); expect(wrapper.find(SingleImageView).exists()).toBe(true); @@ -80,7 +80,7 @@ describe('FileAttachmentList', () => { }; const wrapper = shallow( - + , ); expect(wrapper.find(SingleImageView).exists()).toBe(true); @@ -96,7 +96,7 @@ describe('FileAttachmentList', () => { }; const wrapper = shallow( - + , ); expect(wrapper.find(SingleImageView).exists()).toBe(false); @@ -105,7 +105,7 @@ describe('FileAttachmentList', () => { test('should match state on handleImageClick', () => { const wrapper = shallow( - + , ); wrapper.setState({showPreviewModal: false, startImgIndex: 0}); @@ -118,7 +118,7 @@ describe('FileAttachmentList', () => { test('should match state on hidePreviewModal', () => { const wrapper = shallow( - + , ); wrapper.setState({showPreviewModal: true}); diff --git a/components/file_info_preview/file_info_preview.test.tsx b/components/file_info_preview/file_info_preview.test.tsx index e475b7e30796..0b41fc1dbb18 100644 --- a/components/file_info_preview/file_info_preview.test.tsx +++ b/components/file_info_preview/file_info_preview.test.tsx @@ -13,7 +13,7 @@ describe('components/FileInfoPreview', () => { fileUrl='https://pre-release.mattermost.com/api/v4/files/rqir81f7a7ft8m6j6ej7g1txuo' fileInfo={{name: 'Test Image', size: 100, extension: 'jpg'}} canDownloadFiles={true} - /> + />, ); expect(wrapper).toMatchSnapshot(); @@ -25,7 +25,7 @@ describe('components/FileInfoPreview', () => { fileUrl='https://pre-release.mattermost.com/api/v4/files/aasf9afshaskj1asf91jasf0a0' fileInfo={{name: 'Test Image 2', size: 200, extension: 'png'}} canDownloadFiles={false} - /> + />, ); expect(wrapper).toMatchSnapshot(); diff --git a/components/file_preview/file_preview.test.tsx b/components/file_preview/file_preview.test.tsx index ca1810a5a6db..54183db568e0 100644 --- a/components/file_preview/file_preview.test.tsx +++ b/components/file_preview/file_preview.test.tsx @@ -58,14 +58,14 @@ describe('FilePreview', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); test('should match snapshot when props are changed', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); const fileInfo2 = { @@ -87,7 +87,7 @@ describe('FilePreview', () => { const newOnRemove = jest.fn(); const props = {...baseProps, onRemove: newOnRemove}; const wrapper = shallow( - + , ); wrapper.instance().handleRemove(''); @@ -103,12 +103,12 @@ describe('FilePreview', () => { ...baseProps.fileInfos[0], type: 'image/svg', extension: 'svg', - } + }, ], }; const wrapper = shallow( - + , ); expect(wrapper.find('img').find({src: getFileUrl(fileId)}).exists()).toBe(false); @@ -125,12 +125,12 @@ describe('FilePreview', () => { ...baseProps.fileInfos[0], type: 'image/svg', extension: 'svg', - } + }, ], }; const wrapper = shallow( - + , ); expect(wrapper.find('img').find({src: getFileUrl(fileId)}).exists()).toBe(true); diff --git a/components/file_preview/file_preview.tsx b/components/file_preview/file_preview.tsx index cf74d8f1845f..cc697a059548 100644 --- a/components/file_preview/file_preview.tsx +++ b/components/file_preview/file_preview.tsx @@ -110,7 +110,7 @@ export default class FilePreview extends React.PureComponent {
- + , ); }); @@ -125,7 +125,7 @@ export default class FilePreview extends React.PureComponent { clientId={clientId} fileInfo={fileInfo} handleRemove={this.handleRemove} - /> + />, ); } }); diff --git a/components/file_preview/file_progress_preview.test.tsx b/components/file_preview/file_progress_preview.test.tsx index 1d89984514c5..81e249c4f633 100644 --- a/components/file_preview/file_progress_preview.test.tsx +++ b/components/file_preview/file_progress_preview.test.tsx @@ -35,7 +35,7 @@ describe('component/file_preview/file_progress_preview', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -50,7 +50,7 @@ describe('component/file_preview/file_progress_preview', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/file_upload/file_upload.test.jsx b/components/file_upload/file_upload.test.jsx index 11cff438a449..d3ca9cc75c81 100644 --- a/components/file_upload/file_upload.test.jsx +++ b/components/file_upload/file_upload.test.jsx @@ -82,7 +82,7 @@ describe('components/FileUpload', () => { test('should match snapshot', () => { const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -90,7 +90,7 @@ describe('components/FileUpload', () => { test('should call onClick when fileInput is clicked', () => { const wrapper = shallowWithIntl( - + , ); wrapper.find('input').simulate('click'); @@ -99,7 +99,7 @@ describe('components/FileUpload', () => { test('should prevent event default and progogation on call of onTouchEnd on fileInput', () => { const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); instance.handleLocalFileUploaded = jest.fn(); @@ -119,7 +119,7 @@ describe('components/FileUpload', () => { test('should prevent event default and progogation on call of onClick on fileInput', () => { const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); instance.handleLocalFileUploaded = jest.fn(); @@ -142,7 +142,7 @@ describe('components/FileUpload', () => { + />, ); const evt = {preventDefault: jest.fn()}; @@ -172,7 +172,7 @@ describe('components/FileUpload', () => { }; const wrapper = shallowWithIntl( - + , ); wrapper.instance().fileUploadSuccess(data, 'channel_id', 'root_id'); @@ -190,7 +190,7 @@ describe('components/FileUpload', () => { }; const wrapper = shallowWithIntl( - + , ); wrapper.instance().fileUploadFail(params.err, params.clientId, params.channelId, params.rootId); @@ -213,7 +213,7 @@ describe('components/FileUpload', () => { const wrapper = shallowWithIntl( + />, ); jest.spyOn(wrapper.instance(), 'containsEventTarget').mockReturnValue(true); const spy = jest.spyOn(wrapper.instance(), 'checkPluginHooksAndUploadFiles'); @@ -231,7 +231,7 @@ describe('components/FileUpload', () => { const files = [{name: 'file1.pdf'}, {name: 'file2.jpg'}]; const wrapper = shallowWithIntl( - + , ); wrapper.instance().checkPluginHooksAndUploadFiles(files); @@ -254,7 +254,7 @@ describe('components/FileUpload', () => { const files = [{name: 'file1.pdf'}, {name: 'file2.jpg'}]; const wrapper = shallowWithIntl( - + , ); wrapper.instance().checkPluginHooksAndUploadFiles(files); @@ -273,7 +273,7 @@ describe('components/FileUpload', () => { const files = [{name: 'file1.pdf'}, {name: 'file2.jpg'}]; const wrapper = shallowWithIntl( - + , ); wrapper.instance().checkPluginHooksAndUploadFiles(files); @@ -290,7 +290,7 @@ describe('components/FileUpload', () => { const files = [{name: 'file1.pdf', size: MaxFileSize + 1}]; const wrapper = shallowWithIntl( - + , ); wrapper.instance().checkPluginHooksAndUploadFiles(files); @@ -305,7 +305,7 @@ describe('components/FileUpload', () => { test('should functions when handleChange is called', () => { const wrapper = shallowWithIntl( - + , ); const e = {target: {files: [{name: 'file1.pdf'}]}}; @@ -325,7 +325,7 @@ describe('components/FileUpload', () => { test('should functions when handleDrop is called', () => { const wrapper = shallowWithIntl( - + , ); const e = {dataTransfer: {files: [{name: 'file1.pdf'}]}}; @@ -351,7 +351,7 @@ describe('components/FileUpload', () => { const files = [{name: 'file1.pdf'}, {name: 'file2.jpg'}]; const wrapper = shallowWithIntl( - + , ); wrapper.instance().checkPluginHooksAndUploadFiles(files); @@ -372,7 +372,7 @@ describe('components/FileUpload', () => { const files = [{name: 'file1.pdf'}, {name: 'file2.jpg'}]; const wrapper = shallowWithIntl( - + , ); wrapper.instance().checkPluginHooksAndUploadFiles(files); diff --git a/components/file_upload_overlay.test.tsx b/components/file_upload_overlay.test.tsx index e463e5f2b72d..6f172d94a890 100644 --- a/components/file_upload_overlay.test.tsx +++ b/components/file_upload_overlay.test.tsx @@ -11,7 +11,7 @@ describe('components/FileUploadOverlay', () => { const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); @@ -21,7 +21,7 @@ describe('components/FileUploadOverlay', () => { const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); @@ -31,7 +31,7 @@ describe('components/FileUploadOverlay', () => { const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); diff --git a/components/formatted_markdown_message.jsx b/components/formatted_markdown_message.jsx index 932a7312d5bf..b63726b652fd 100644 --- a/components/formatted_markdown_message.jsx +++ b/components/formatted_markdown_message.jsx @@ -47,7 +47,7 @@ export class CustomRenderer extends marked.Renderer { */ class FormattedMarkdownMessage extends React.PureComponent { static defaultProps = { - disableLinks: false + disableLinks: false, }; static get propTypes() { diff --git a/components/formatted_markdown_message.test.jsx b/components/formatted_markdown_message.test.jsx index 30c9c82cd767..ab4d8fd5c83b 100644 --- a/components/formatted_markdown_message.test.jsx +++ b/components/formatted_markdown_message.test.jsx @@ -54,7 +54,7 @@ describe('components/FormattedMarkdownMessage', () => { values: { petName: 'http://www.mattermost.com', }, - disableLinks: true + disableLinks: true, }; const wrapper = mount(wrapProvider()); expect(wrapper).toMatchSnapshot(); diff --git a/components/get_link_modal.test.tsx b/components/get_link_modal.test.tsx index b6f8ed42e48f..a9ff8c941ad6 100644 --- a/components/get_link_modal.test.tsx +++ b/components/get_link_modal.test.tsx @@ -22,7 +22,7 @@ describe('components/GetLinkModal', () => { const props = {...requiredProps, helpText}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -30,7 +30,7 @@ describe('components/GetLinkModal', () => { test('should match snapshot when helpText is not set', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -41,7 +41,7 @@ describe('components/GetLinkModal', () => { const props = {...requiredProps, onHide: newOnHide}; const wrapper = shallow( - + , ); wrapper.find(Modal).first().props().onHide(); @@ -61,7 +61,7 @@ describe('components/GetLinkModal', () => { test('should have handle copyLink', () => { const wrapper = mountWithIntl( - + , ); wrapper.find('#linkModalTextArea').simulate('click'); expect(wrapper.state('copiedLink')).toBe(true); diff --git a/components/get_public_link_modal/get_public_link_modal.test.jsx b/components/get_public_link_modal/get_public_link_modal.test.jsx index ae99986e4c4a..5ba21bcf8c8b 100644 --- a/components/get_public_link_modal/get_public_link_modal.test.jsx +++ b/components/get_public_link_modal/get_public_link_modal.test.jsx @@ -13,7 +13,7 @@ describe('components/GetPublicLinkModal', () => { + />, ); expect(wrapper).toMatchSnapshot(); @@ -23,7 +23,7 @@ describe('components/GetPublicLinkModal', () => { const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); @@ -34,7 +34,7 @@ describe('components/GetPublicLinkModal', () => { + />, ); expect(wrapper).toMatchSnapshot(); @@ -48,7 +48,7 @@ describe('components/GetPublicLinkModal', () => { + />, ); wrapper.setState({show: true, fileId}); @@ -64,7 +64,7 @@ describe('components/GetPublicLinkModal', () => { + />, ); wrapper.setState({show: true, fileId}); @@ -78,7 +78,7 @@ describe('components/GetPublicLinkModal', () => { + />, ); wrapper.find(GetLinkModal).first().props().onHide(); diff --git a/components/gif_picker/components/App/index.jsx b/components/gif_picker/components/App/index.jsx index 868419d338fd..3d410567c1b4 100644 --- a/components/gif_picker/components/App/index.jsx +++ b/components/gif_picker/components/App/index.jsx @@ -24,7 +24,7 @@ export class App extends PureComponent { saveAppProps: PropTypes.func, authenticateSdk: PropTypes.func, defaultSearchText: PropTypes.string, - handleSearchTextChange: PropTypes.func.isRequired + handleSearchTextChange: PropTypes.func.isRequired, } constructor(props) { @@ -42,7 +42,7 @@ export class App extends PureComponent { onTrending, children, defaultSearchText, - handleSearchTextChange + handleSearchTextChange, } = this.props; const appClassName = 'main-container ' + (appProps.appClassName || ''); return ( diff --git a/components/gif_picker/components/Header/index.jsx b/components/gif_picker/components/Header/index.jsx index b42f35f6e632..aa3c68d7ad8c 100644 --- a/components/gif_picker/components/Header/index.jsx +++ b/components/gif_picker/components/Header/index.jsx @@ -54,7 +54,7 @@ export class Header extends PureComponent { searchTextUpdate: PropTypes.func, theme: PropTypes.object.isRequired, defaultSearchText: PropTypes.string, - handleSearchTextChange: PropTypes.func.isRequired + handleSearchTextChange: PropTypes.func.isRequired, } constructor(props) { diff --git a/components/gif_picker/components/SearchBar/index.jsx b/components/gif_picker/components/SearchBar/index.jsx index eafb1870e60b..bf64c8d74dd2 100644 --- a/components/gif_picker/components/SearchBar/index.jsx +++ b/components/gif_picker/components/SearchBar/index.jsx @@ -61,7 +61,7 @@ export class SearchBar extends Component { saveSearchBarText: PropTypes.func, searchTextUpdate: PropTypes.func, defaultSearchText: PropTypes.string, - handleSearchTextChange: PropTypes.func.isRequired + handleSearchTextChange: PropTypes.func.isRequired, } constructor(props) { diff --git a/components/gif_picker/gif_picker.jsx b/components/gif_picker/gif_picker.jsx index e3b5790d3f1f..215d7fa41370 100644 --- a/components/gif_picker/gif_picker.jsx +++ b/components/gif_picker/gif_picker.jsx @@ -32,7 +32,7 @@ export default class GifPicker extends React.Component { static propTypes = { onGifClick: PropTypes.func.isRequired, defaultSearchText: PropTypes.string, - handleSearchTextChange: PropTypes.func.isRequired + handleSearchTextChange: PropTypes.func.isRequired, } constructor(props) { @@ -43,7 +43,7 @@ export default class GifPicker extends React.Component { const action = props.defaultSearchText ? 'search' : 'trending'; this.state = { - action + action, }; } diff --git a/components/header_footer_template/header_footer_template.jsx b/components/header_footer_template/header_footer_template.jsx index 662f7245bfbd..bc13f54a04aa 100644 --- a/components/header_footer_template/header_footer_template.jsx +++ b/components/header_footer_template/header_footer_template.jsx @@ -42,7 +42,7 @@ export default class NotLoggedIn extends React.PureComponent { href={this.props.config.AboutLink} > - + , ); } @@ -57,7 +57,7 @@ export default class NotLoggedIn extends React.PureComponent { href={this.props.config.PrivacyPolicyLink} > - + , ); } @@ -72,7 +72,7 @@ export default class NotLoggedIn extends React.PureComponent { href={this.props.config.TermsOfServiceLink} > - + , ); } @@ -87,7 +87,7 @@ export default class NotLoggedIn extends React.PureComponent { href={this.props.config.HelpLink} > - + , ); } diff --git a/components/header_footer_template/header_footer_template.test.jsx b/components/header_footer_template/header_footer_template.test.jsx index 0bacee7b69dd..2782548c7281 100644 --- a/components/header_footer_template/header_footer_template.test.jsx +++ b/components/header_footer_template/header_footer_template.test.jsx @@ -33,7 +33,7 @@ describe('components/HeaderFooterTemplate', () => { test('should match snapshot without children', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -42,35 +42,35 @@ describe('components/HeaderFooterTemplate', () => { const wrapper = shallow(

{'test'}

-
+
, ); expect(wrapper).toMatchSnapshot(); }); test('should match snapshot with help link', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); test('should match snapshot with term of service link', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); test('should match snapshot with privacy policy link', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); test('should match snapshot with about link', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -84,7 +84,7 @@ describe('components/HeaderFooterTemplate', () => { PrivacyPolicyLink: 'http://testprivacypolicylink', AboutLink: 'http://testaboutlink', }} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -101,7 +101,7 @@ describe('components/HeaderFooterTemplate', () => { expect(document.body.classList.contains('sticky')).toBe(false); expect(document.getElementById('root').classList.contains('container-fluid')).toBe(true); const wrapper = shallow( - + , ); expect(document.body.classList.contains('sticky')).toBe(true); expect(document.getElementById('root').classList.contains('container-fluid')).toBe(true); diff --git a/components/integrations/abstract_command.test.jsx b/components/integrations/abstract_command.test.jsx index 6d7fe94bfd3d..704f754776c8 100644 --- a/components/integrations/abstract_command.test.jsx +++ b/components/integrations/abstract_command.test.jsx @@ -39,7 +39,7 @@ describe('components/integrations/AbstractCommand', () => { return new Promise((resolve) => { process.nextTick(() => resolve()); }); - } + }, ); const baseProps = { @@ -55,7 +55,7 @@ describe('components/integrations/AbstractCommand', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -64,7 +64,7 @@ describe('components/integrations/AbstractCommand', () => { const newSeverError = 'server error'; const props = {...baseProps, serverError: newSeverError}; const wrapper = shallow( - + , ); wrapper.find('#trigger').simulate('change', {target: {value: ''}}); @@ -76,7 +76,7 @@ describe('components/integrations/AbstractCommand', () => { test('should call action function', () => { const wrapper = shallow( - + , ); wrapper.find('#displayName').simulate('change', {target: {value: 'name'}}); @@ -87,7 +87,7 @@ describe('components/integrations/AbstractCommand', () => { test('should match object returned by getStateFromCommand', () => { const wrapper = shallow( - + , ); const expectedOutput = { @@ -110,7 +110,7 @@ describe('components/integrations/AbstractCommand', () => { test('should match state when method is called', () => { const wrapper = shallow( - + , ); const displayName = 'new display_name'; @@ -161,11 +161,11 @@ describe('components/integrations/AbstractCommand', () => { return new Promise((resolve) => { process.nextTick(() => resolve()); }); - } + }, ); const props = {...baseProps, action: newAction}; const wrapper = shallow( - + , ); expect(newAction).toHaveBeenCalledTimes(0); diff --git a/components/integrations/abstract_incoming_hook.test.jsx b/components/integrations/abstract_incoming_hook.test.jsx index 48756dd93911..dbfd1622ad1a 100644 --- a/components/integrations/abstract_incoming_hook.test.jsx +++ b/components/integrations/abstract_incoming_hook.test.jsx @@ -25,7 +25,7 @@ describe('components/integrations/AbstractIncomingWebhook', () => { return new Promise((resolve) => { process.nextTick(() => resolve()); }); - } + }, ); const requiredProps = { diff --git a/components/integrations/abstract_oauth_app.test.jsx b/components/integrations/abstract_oauth_app.test.jsx index a67d137e65d8..dee1d4be4ce1 100644 --- a/components/integrations/abstract_oauth_app.test.jsx +++ b/components/integrations/abstract_oauth_app.test.jsx @@ -30,7 +30,7 @@ describe('components/integrations/AbstractOAuthApp', () => { return new Promise((resolve) => { process.nextTick(() => resolve()); }); - } + }, ); const baseProps = { team, @@ -45,7 +45,7 @@ describe('components/integrations/AbstractOAuthApp', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -54,7 +54,7 @@ describe('components/integrations/AbstractOAuthApp', () => { const newServerError = 'serverError'; const props = {...baseProps, serverError: newServerError}; const wrapper = shallow( - + , ); wrapper.find('#callbackUrls').simulate('change', {target: {value: ''}}); @@ -69,7 +69,7 @@ describe('components/integrations/AbstractOAuthApp', () => { test('should call action function', () => { const props = {...baseProps, action}; const wrapper = shallow( - + , ); wrapper.find('#name').simulate('change', {target: {value: 'name'}}); @@ -83,7 +83,7 @@ describe('components/integrations/AbstractOAuthApp', () => { test('should have correct state when updateName is called', () => { const props = {...baseProps, action}; const wrapper = shallow( - + , ); wrapper.instance().updateName({target: {value: 'new name'}}); @@ -96,7 +96,7 @@ describe('components/integrations/AbstractOAuthApp', () => { test('should have correct state when updateTrusted is called', () => { const props = {...baseProps, action}; const wrapper = shallow( - + , ); wrapper.instance().updateTrusted({target: {value: 'false'}}); @@ -109,7 +109,7 @@ describe('components/integrations/AbstractOAuthApp', () => { test('should have correct state when updateDescription is called', () => { const props = {...baseProps, action}; const wrapper = shallow( - + , ); wrapper.instance().updateDescription({target: {value: 'new description'}}); @@ -122,7 +122,7 @@ describe('components/integrations/AbstractOAuthApp', () => { test('should have correct state when updateHomepage is called', () => { const props = {...baseProps, action}; const wrapper = shallow( - + , ); wrapper.instance().updateHomepage({target: {value: 'new homepage'}}); @@ -135,7 +135,7 @@ describe('components/integrations/AbstractOAuthApp', () => { test('should have correct state when updateIconUrl is called', () => { const props = {...baseProps, action}; const wrapper = shallow( - + , ); wrapper.setState({has_icon: true}); @@ -152,7 +152,7 @@ describe('components/integrations/AbstractOAuthApp', () => { test('should have correct state when handleSubmit is called', () => { const props = {...baseProps, action}; const wrapper = shallow( - + , ); const newState = {saving: false, name: 'name', description: 'description', homepage: 'homepage'}; @@ -174,7 +174,7 @@ describe('components/integrations/AbstractOAuthApp', () => { defaultMessage='Name for the OAuth 2.0 application is required.' id='add_oauth_app.nameRequired' values={{}} - /> + />, ); wrapper.setState({...newState, description: ''}); @@ -185,7 +185,7 @@ describe('components/integrations/AbstractOAuthApp', () => { defaultMessage='Description for the OAuth 2.0 application is required.' id='add_oauth_app.descriptionRequired' values={{}} - /> + />, ); wrapper.setState({...newState, homepage: ''}); @@ -196,7 +196,7 @@ describe('components/integrations/AbstractOAuthApp', () => { defaultMessage='Homepage for the OAuth 2.0 application is required.' id='add_oauth_app.homepageRequired' values={{}} - /> + />, ); }); }); diff --git a/components/integrations/add_command/add_command.test.jsx b/components/integrations/add_command/add_command.test.jsx index 351d72131c92..9bf6ecd16030 100644 --- a/components/integrations/add_command/add_command.test.jsx +++ b/components/integrations/add_command/add_command.test.jsx @@ -18,7 +18,7 @@ describe('components/integrations/AddCommand', () => { error: null, }} actions={{addCommand: emptyFunction}} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/integrations/add_oauth_app/add_oauth_app.test.jsx b/components/integrations/add_oauth_app/add_oauth_app.test.jsx index 0adb31bcd95b..bbca78290bad 100644 --- a/components/integrations/add_oauth_app/add_oauth_app.test.jsx +++ b/components/integrations/add_oauth_app/add_oauth_app.test.jsx @@ -22,7 +22,7 @@ describe('components/integrations/AddOAuthApp', () => { error: null, }} actions={{addOAuthApp: emptyFunction}} - /> + />, ); expect(wrapper).toMatchSnapshot(); diff --git a/components/integrations/add_outgoing_webhook/add_outgoing_webhook.test.jsx b/components/integrations/add_outgoing_webhook/add_outgoing_webhook.test.jsx index faee89449cc8..4e3e4bf96399 100644 --- a/components/integrations/add_outgoing_webhook/add_outgoing_webhook.test.jsx +++ b/components/integrations/add_outgoing_webhook/add_outgoing_webhook.test.jsx @@ -20,7 +20,7 @@ describe('components/integrations/AddOutgoingWebhook', () => { actions={{createOutgoingHook: emptyFunction}} enablePostUsernameOverride={false} enablePostIconOverride={false} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/integrations/bots/add_bot/add_bot.jsx b/components/integrations/bots/add_bot/add_bot.jsx index dcb5737fe0a9..118879ed6eb5 100644 --- a/components/integrations/bots/add_bot/add_bot.jsx +++ b/components/integrations/bots/add_bot/add_bot.jsx @@ -308,7 +308,7 @@ export default class AddBot extends React.Component { await this.props.actions.setDefaultProfileImage(data.user_id); } const tokenResult = await this.props.actions.createUserAccessToken(data.user_id, - Utils.localizeMessage('bot.token.default.description', 'Default Token') + Utils.localizeMessage('bot.token.default.description', 'Default Token'), ); // On error just skip the confirmation because we have a bot without a token. diff --git a/components/integrations/bots/add_bot/add_bot.test.jsx b/components/integrations/bots/add_bot/add_bot.test.jsx index d255aab97a18..48749803a68c 100644 --- a/components/integrations/bots/add_bot/add_bot.test.jsx +++ b/components/integrations/bots/add_bot/add_bot.test.jsx @@ -18,30 +18,30 @@ describe('components/integrations/bots/AddBot', () => { maxFileSize={100} team={team} editingUserHasManageSystem={true} - /> + />, ); expect(wrapper.containsMatchingElement( + />, )).toEqual(true); expect(wrapper.containsMatchingElement( + />, )).toEqual(true); expect(wrapper.containsMatchingElement( + />, )).toEqual(true); expect(wrapper.containsMatchingElement( + />, )).toEqual(true); }); @@ -53,25 +53,25 @@ describe('components/integrations/bots/AddBot', () => { maxFileSize={100} team={team} editingUserHasManageSystem={true} - /> + />, ); expect(wrapper.containsMatchingElement( + />, )).toEqual(true); expect(wrapper.containsMatchingElement( + />, )).toEqual(true); expect(wrapper.containsMatchingElement( + />, )).toEqual(true); }); }); diff --git a/components/integrations/bots/bot.jsx b/components/integrations/bots/bot.jsx index c7a8ae56b04f..5fc59723d9d3 100644 --- a/components/integrations/bots/bot.jsx +++ b/components/integrations/bots/bot.jsx @@ -278,7 +278,7 @@ export default class Bot extends React.PureComponent { - + , ); }); @@ -398,7 +398,7 @@ export default class Bot extends React.PureComponent { - + , ); } else if (this.state.creatingTokenState === 'CREATED') { tokenList.push( @@ -445,7 +445,7 @@ export default class Bot extends React.PureComponent { /> - + , ); } diff --git a/components/integrations/bots/bot.test.jsx b/components/integrations/bots/bot.test.jsx index bdaa2c5e08dc..97d8f5f67a19 100644 --- a/components/integrations/bots/bot.test.jsx +++ b/components/integrations/bots/bot.test.jsx @@ -27,7 +27,7 @@ describe('components/integrations/bots/Bot', () => { owner={null} accessTokens={{}} team={team} - /> + />, ); expect(wrapper.contains(bot.display_name + ' (@' + bot.username + ')')).toEqual(true); @@ -39,25 +39,25 @@ describe('components/integrations/bots/Bot', () => { + />, )).toEqual(false); expect(wrapper.contains( + />, )).toEqual(false); expect(wrapper.contains( + />, )).toEqual(false); expect(wrapper.contains( + />, )).toEqual(false); }); @@ -74,7 +74,7 @@ describe('components/integrations/bots/Bot', () => { owner={null} accessTokens={{}} team={team} - /> + />, ); expect(wrapper.contains(bot.display_name + ' (@' + bot.username + ')')).toEqual(true); expect(wrapper.contains()).toEqual(true); @@ -83,25 +83,25 @@ describe('components/integrations/bots/Bot', () => { + />, )).toEqual(false); expect(wrapper.contains( + />, )).toEqual(false); expect(wrapper.contains( + />, )).toEqual(false); expect(wrapper.contains( + />, )).toEqual(true); }); @@ -118,7 +118,7 @@ describe('components/integrations/bots/Bot', () => { user={user} accessTokens={{}} team={team} - /> + />, ); expect(wrapper.contains(owner.username)).toEqual(true); expect(wrapper.contains('plugin')).toEqual(false); @@ -128,19 +128,19 @@ describe('components/integrations/bots/Bot', () => { + />, )).toEqual(true); expect(wrapper.contains( + />, )).toEqual(true); expect(wrapper.contains( + />, )).toEqual(true); }); @@ -166,7 +166,7 @@ describe('components/integrations/bots/Bot', () => { user={user} accessTokens={accessTokens} team={team} - /> + />, ); expect(wrapper.contains(tokenId)).toEqual(true); @@ -174,13 +174,13 @@ describe('components/integrations/bots/Bot', () => { + />, )).toEqual(true); expect(wrapper.contains( + />, )).toEqual(false); }); @@ -207,7 +207,7 @@ describe('components/integrations/bots/Bot', () => { user={user} accessTokens={accessTokens} team={team} - /> + />, ); expect(wrapper.contains(tokenId)).toEqual(true); @@ -215,13 +215,13 @@ describe('components/integrations/bots/Bot', () => { + />, )).toEqual(false); expect(wrapper.contains( + />, )).toEqual(true); }); }); diff --git a/components/integrations/bots/bots.jsx b/components/integrations/bots/bots.jsx index 3a895ae839d9..e7f42a1ad889 100644 --- a/components/integrations/bots/bots.jsx +++ b/components/integrations/bots/bots.jsx @@ -92,7 +92,7 @@ export default class Bots extends React.PureComponent { componentDidMount() { this.props.actions.loadBots( Constants.Integrations.START_PAGE_NUM, - Constants.Integrations.PAGE_SIZE + Constants.Integrations.PAGE_SIZE, ).then( (result) => { if (result.data) { @@ -111,7 +111,7 @@ export default class Bots extends React.PureComponent { this.setState({loading: false}); }); } - } + }, ); } diff --git a/components/integrations/bots/bots.test.jsx b/components/integrations/bots/bots.test.jsx index dc48cdfbf762..1075cb31159a 100644 --- a/components/integrations/bots/bots.test.jsx +++ b/components/integrations/bots/bots.test.jsx @@ -46,7 +46,7 @@ describe('components/integrations/bots/Bots', () => { owners={{}} users={users} actions={actions} - /> + />, ); wrapperFull.instance().setState({loading: false}); const wrapper = shallow(
{wrapperFull.instance().bots()[0]}
); @@ -60,7 +60,7 @@ describe('components/integrations/bots/Bots', () => { accessTokens={{}} team={team} actions={actions} - /> + />, )).toEqual(true); expect(wrapper.find('EnabledSection').shallow().contains( { accessTokens={{}} team={team} actions={actions} - /> + />, )).toEqual(true); expect(wrapper.find('EnabledSection').shallow().contains( { accessTokens={{}} team={team} actions={actions} - /> + />, )).toEqual(true); }); @@ -124,7 +124,7 @@ describe('components/integrations/bots/Bots', () => { owners={owners} users={users} actions={actions} - /> + />, ); wrapperFull.instance().setState({loading: false}); const wrapper = shallow(
{wrapperFull.instance().bots()[0]}
); @@ -138,7 +138,7 @@ describe('components/integrations/bots/Bots', () => { accessTokens={passedTokens} team={team} actions={actions} - /> + />, )).toEqual(true); }); }); diff --git a/components/integrations/commands_container/commands_container.jsx b/components/integrations/commands_container/commands_container.jsx index 47144bdf5804..1d1325e9c2a9 100644 --- a/components/integrations/commands_container/commands_container.jsx +++ b/components/integrations/commands_container/commands_container.jsx @@ -76,7 +76,7 @@ export default class CommandsContainer extends React.PureComponent { componentDidMount() { if (this.props.enableCommands) { this.props.actions.loadCommandsAndProfilesForTeam(this.props.team.id).then( - () => this.setState({loading: false}) + () => this.setState({loading: false}), ); } } diff --git a/components/integrations/confirm_integration/confirm_integration.jsx b/components/integrations/confirm_integration/confirm_integration.jsx index aa6b560165bb..a4b84ca34e89 100644 --- a/components/integrations/confirm_integration/confirm_integration.jsx +++ b/components/integrations/confirm_integration/confirm_integration.jsx @@ -172,7 +172,7 @@ export default class ConfirmIntegration extends React.Component { id='add_oauth_app.doneHelp' defaultMessage='Your OAuth 2.0 application is set up. Please use the following Client ID and Client Secret when requesting authorization for your application (details at [oAuth 2 Applications](!https://docs.mattermost.com/developer/oauth-2-0-applications.html)).' /> -

+

, ); helpText.push(

@@ -201,7 +201,7 @@ export default class ConfirmIntegration extends React.Component { defaultMessage='Copy Client Secret' value={oauthAppSecret} /> -

+

, ); helpText.push( @@ -210,7 +210,7 @@ export default class ConfirmIntegration extends React.Component { id='add_oauth_app.doneUrlHelp' defaultMessage='Here are your authorized redirect URLs.' /> -

+

, ); tokenText = ( diff --git a/components/integrations/confirm_integration/confirm_integration.test.jsx b/components/integrations/confirm_integration/confirm_integration.test.jsx index 20c609232ef7..1b02c96c40d9 100644 --- a/components/integrations/confirm_integration/confirm_integration.test.jsx +++ b/components/integrations/confirm_integration/confirm_integration.test.jsx @@ -50,7 +50,7 @@ describe('components/integrations/ConfirmIntegration', () => { test('should match snapshot, oauthApps case', () => { props.location.search = getSearchString('oauth2-apps'); const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -60,7 +60,7 @@ describe('components/integrations/ConfirmIntegration', () => { const {container} = renderWithIntl( - + , ); expect(container.querySelector('.word-break--all')).toHaveTextContent('URL(s): https://someCallback, https://anotherCallback'); @@ -69,7 +69,7 @@ describe('components/integrations/ConfirmIntegration', () => { test('should match snapshot, commands case', () => { props.location.search = getSearchString('commands'); const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -77,7 +77,7 @@ describe('components/integrations/ConfirmIntegration', () => { test('should match snapshot, incomingHooks case', () => { props.location.search = getSearchString('incoming_webhooks'); const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -85,7 +85,7 @@ describe('components/integrations/ConfirmIntegration', () => { test('should match snapshot, outgoingHooks case', () => { props.location.search = getSearchString('outgoing_webhooks'); const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -93,7 +93,7 @@ describe('components/integrations/ConfirmIntegration', () => { test('should match snapshot, outgoingHooks and bad identifier case', () => { props.location.search = getSearchString('outgoing_webhooks', 'bad'); const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -101,7 +101,7 @@ describe('components/integrations/ConfirmIntegration', () => { test('should match snapshot, bad integration type case', () => { props.location.search = getSearchString('bad'); const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/integrations/edit_command/edit_command.jsx b/components/integrations/edit_command/edit_command.jsx index b326abb33900..d6cb4004954a 100644 --- a/components/integrations/edit_command/edit_command.jsx +++ b/components/integrations/edit_command/edit_command.jsx @@ -69,7 +69,7 @@ export default class EditCommand extends React.PureComponent { this.setState({ originalCommand: Object.values(this.props.commands).filter((command) => command.id === this.props.commandId)[0], }); - } + }, ); } } diff --git a/components/integrations/edit_command/edit_command.test.jsx b/components/integrations/edit_command/edit_command.test.jsx index 654433e54f73..3891c8d1eaaa 100644 --- a/components/integrations/edit_command/edit_command.test.jsx +++ b/components/integrations/edit_command/edit_command.test.jsx @@ -12,7 +12,7 @@ describe('components/integrations/EditCommand', () => { return new Promise((resolve) => { process.nextTick(() => resolve()); }); - } + }, ); const commands = { @@ -59,7 +59,7 @@ describe('components/integrations/EditCommand', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); wrapper.setState({originalCommand: commands.r5tpgt4iepf45jt768jz84djic}); @@ -71,7 +71,7 @@ describe('components/integrations/EditCommand', () => { test('should match snapshot, loading', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -84,7 +84,7 @@ describe('components/integrations/EditCommand', () => { }; const props = {...baseProps, actions, enableCommands: false}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -94,7 +94,7 @@ describe('components/integrations/EditCommand', () => { test('should have match state when handleConfirmModal is called', () => { const props = {...baseProps, getCustomTeamCommands}; const wrapper = shallow( - + , ); wrapper.setState({showConfirmModal: false}); @@ -105,7 +105,7 @@ describe('components/integrations/EditCommand', () => { test('should have match state when confirmModalDismissed is called', () => { const props = {...baseProps, getCustomTeamCommands}; const wrapper = shallow( - + , ); wrapper.setState({showConfirmModal: true}); @@ -116,7 +116,7 @@ describe('components/integrations/EditCommand', () => { test('should have match renderExtra', () => { const props = {...baseProps, getCustomTeamCommands}; const wrapper = shallow( - + , ); expect(wrapper.instance().renderExtra()).toMatchSnapshot(); @@ -125,7 +125,7 @@ describe('components/integrations/EditCommand', () => { test('should have match when editCommand is called', () => { const props = {...baseProps, getCustomTeamCommands}; const wrapper = shallow( - + , ); wrapper.setState({originalCommand: commands.r5tpgt4iepf45jt768jz84djic}); diff --git a/components/integrations/edit_oauth_app/edit_oauth_app.test.jsx b/components/integrations/edit_oauth_app/edit_oauth_app.test.jsx index 1d118da1a3c9..f9918f06a7ea 100644 --- a/components/integrations/edit_oauth_app/edit_oauth_app.test.jsx +++ b/components/integrations/edit_oauth_app/edit_oauth_app.test.jsx @@ -43,7 +43,7 @@ describe('components/integrations/EditOAuthApp', () => { test('should match snapshot, loading', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -52,7 +52,7 @@ describe('components/integrations/EditOAuthApp', () => { test('should match snapshot', () => { const props = {...baseProps, oauthApp}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -62,7 +62,7 @@ describe('components/integrations/EditOAuthApp', () => { test('should match snapshot when EnableOAuthServiceProvider is false', () => { const props = {...baseProps, oauthApp, enableOAuthServiceProvider: false}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -72,7 +72,7 @@ describe('components/integrations/EditOAuthApp', () => { test('should have match state when handleConfirmModal is called', () => { const props = {...baseProps, oauthApp}; const wrapper = shallow( - + , ); wrapper.setState({showConfirmModal: false}); @@ -83,7 +83,7 @@ describe('components/integrations/EditOAuthApp', () => { test('should have match state when confirmModalDismissed is called', () => { const props = {...baseProps, oauthApp}; const wrapper = shallow( - + , ); wrapper.setState({showConfirmModal: true}); @@ -94,7 +94,7 @@ describe('components/integrations/EditOAuthApp', () => { test('should have match renderExtra', () => { const props = {...baseProps, oauthApp}; const wrapper = shallow( - + , ); expect(wrapper.instance().renderExtra()).toMatchSnapshot(); @@ -103,7 +103,7 @@ describe('components/integrations/EditOAuthApp', () => { test('should have match when editOAuthApp is called', () => { const props = {...baseProps, oauthApp}; const wrapper = shallow( - + , ); const instance = wrapper.instance(); @@ -124,13 +124,13 @@ describe('components/integrations/EditOAuthApp', () => { error: null, })); }); - } + }, ); browserHistory.push = jest.fn(); const props = {...baseProps, oauthApp}; const wrapper = shallow( - + , ); const instance = wrapper.instance(); @@ -150,11 +150,11 @@ describe('components/integrations/EditOAuthApp', () => { error: {message: 'error message'}, })); }); - } + }, ); const props = {...baseProps, oauthApp}; const wrapper = shallow( - + , ); const instance = wrapper.instance(); diff --git a/components/integrations/edit_outgoing_webhook/edit_outgoing_webhook.test.jsx b/components/integrations/edit_outgoing_webhook/edit_outgoing_webhook.test.jsx index 3d32beb74f03..938989483e18 100644 --- a/components/integrations/edit_outgoing_webhook/edit_outgoing_webhook.test.jsx +++ b/components/integrations/edit_outgoing_webhook/edit_outgoing_webhook.test.jsx @@ -48,14 +48,14 @@ describe('components/integrations/EditOutgoingWebhook', () => { test('should match snapshot', () => { const props = {...baseProps, hook}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); test('should match snapshot, loading', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -63,7 +63,7 @@ describe('components/integrations/EditOutgoingWebhook', () => { test('should match snapshot when EnableOutgoingWebhooks is false', () => { const props = {...baseProps, enableOutgoingWebhooks: false, hook}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -72,7 +72,7 @@ describe('components/integrations/EditOutgoingWebhook', () => { test('should have match state when handleConfirmModal is called', () => { const props = {...baseProps, hook}; const wrapper = shallow( - + , ); wrapper.setState({showConfirmModal: false}); @@ -83,7 +83,7 @@ describe('components/integrations/EditOutgoingWebhook', () => { test('should have match state when confirmModalDismissed is called', () => { const props = {...baseProps, hook}; const wrapper = shallow( - + , ); wrapper.setState({showConfirmModal: true}); @@ -94,7 +94,7 @@ describe('components/integrations/EditOutgoingWebhook', () => { test('should have match renderExtra', () => { const props = {...baseProps, hook}; const wrapper = shallow( - + , ); expect(wrapper.instance().renderExtra()).toMatchSnapshot(); @@ -103,7 +103,7 @@ describe('components/integrations/EditOutgoingWebhook', () => { test('should have match when editOutgoingHook is called', () => { const props = {...baseProps, hook}; const wrapper = shallow( - + , ); const instance = wrapper.instance(); @@ -120,7 +120,7 @@ describe('components/integrations/EditOutgoingWebhook', () => { browserHistory.push = jest.fn(); const props = {...baseProps, hook, actions: newActions}; const wrapper = shallow( - + , ); const instance = wrapper.instance(); @@ -136,7 +136,7 @@ describe('components/integrations/EditOutgoingWebhook', () => { const newActions = {...baseProps.actions, updateOutgoingHook: jest.fn().mockReturnValue({data: ''})}; const props = {...baseProps, hook, actions: newActions}; const wrapper = shallow( - + , ); const instance = wrapper.instance(); diff --git a/components/integrations/installed_incoming_webhook.test.jsx b/components/integrations/installed_incoming_webhook.test.jsx index cc0ec75dd887..ba8ad3801f0d 100644 --- a/components/integrations/installed_incoming_webhook.test.jsx +++ b/components/integrations/installed_incoming_webhook.test.jsx @@ -43,7 +43,7 @@ describe('components/integrations/InstalledIncomingWebhook', () => { id: '1jiw9kphbjrntfyrm7xpdcya4o', name: 'town-square', }} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -66,7 +66,7 @@ describe('components/integrations/InstalledIncomingWebhook', () => { id: '1jiw9kphbjrntfyrm7xpdcya4o', name: 'town-square', }} - /> + />, ); expect(wrapper.find('.item-actions').length).toBe(0); }); @@ -89,7 +89,7 @@ describe('components/integrations/InstalledIncomingWebhook', () => { id: '1jiw9kphbjrntfyrm7xpdcya4o', name: 'town-square', }} - /> + />, ); expect(wrapper.find('.item-actions').find(Link).exists()).toBe(true); expect(wrapper.find('.item-actions').find(DeleteIntegration).exists()).toBe(true); @@ -113,7 +113,7 @@ describe('components/integrations/InstalledIncomingWebhook', () => { id: '1jiw9kphbjrntfyrm7xpdcya4o', name: 'town-square', }} - /> + />, ); expect(wrapper.find('.item-details__description').text()).toBe('build status'); @@ -138,7 +138,7 @@ describe('components/integrations/InstalledIncomingWebhook', () => { id: '1jiw9kphbjrntfyrm7xpdcya4o', name: 'town-square', }} - /> + />, ); expect(wrapper.find('.item-details__description').length).toBe(0); }); @@ -161,7 +161,7 @@ describe('components/integrations/InstalledIncomingWebhook', () => { id: '1jiw9kphbjrntfyrm7xpdcya4o', name: 'town-square', }} - /> + />, ); expect(wrapper.getElement()).toBe(null); }); @@ -184,7 +184,7 @@ describe('components/integrations/InstalledIncomingWebhook', () => { id: '1jiw9kphbjrntfyrm7xpdcya4o', name: 'town-square', }} - /> + />, ); expect(wrapper.find('.item-details').exists()).toBe(true); }); diff --git a/components/integrations/installed_incoming_webhooks/installed_incoming_webhooks.jsx b/components/integrations/installed_incoming_webhooks/installed_incoming_webhooks.jsx index 665934201591..4d7687fc8e06 100644 --- a/components/integrations/installed_incoming_webhooks/installed_incoming_webhooks.jsx +++ b/components/integrations/installed_incoming_webhooks/installed_incoming_webhooks.jsx @@ -81,9 +81,9 @@ export default class InstalledIncomingWebhooks extends React.PureComponent { this.props.actions.loadIncomingHooksAndProfilesForTeam( this.props.teamId, Constants.Integrations.START_PAGE_NUM, - Constants.Integrations.PAGE_SIZE + Constants.Integrations.PAGE_SIZE, ).then( - () => this.setState({loading: false}) + () => this.setState({loading: false}), ); } } diff --git a/components/integrations/installed_oauth_app/installed_oauth_app.jsx b/components/integrations/installed_oauth_app/installed_oauth_app.jsx index 098ed52b95a2..eb044324b55b 100644 --- a/components/integrations/installed_oauth_app/installed_oauth_app.jsx +++ b/components/integrations/installed_oauth_app/installed_oauth_app.jsx @@ -85,7 +85,7 @@ export default class InstalledOAuthApp extends React.PureComponent { this.setState({error: null}); this.handleShowClientSecret(); } - } + }, ); } diff --git a/components/integrations/installed_oauth_app/installed_oauth_app.test.jsx b/components/integrations/installed_oauth_app/installed_oauth_app.test.jsx index 19819aeffc76..5fa8b11cfa9f 100644 --- a/components/integrations/installed_oauth_app/installed_oauth_app.test.jsx +++ b/components/integrations/installed_oauth_app/installed_oauth_app.test.jsx @@ -41,7 +41,7 @@ describe('components/integrations/InstalledOAuthApp', () => { test('should match snapshot', () => { const props = {...baseProps, team}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -51,7 +51,7 @@ describe('components/integrations/InstalledOAuthApp', () => { props.oauthApp.name = ''; props.oauthApp.is_trusted = false; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -59,7 +59,7 @@ describe('components/integrations/InstalledOAuthApp', () => { test('should match snapshot, on error', () => { const props = {...baseProps, team}; const wrapper = shallow( - + , ); wrapper.setState({error: 'error'}); expect(wrapper).toMatchSnapshot(); @@ -71,11 +71,11 @@ describe('components/integrations/InstalledOAuthApp', () => { return new Promise((resolve) => { process.nextTick(() => resolve()); }); - } + }, ); const props = {...baseProps, onRegenerateSecret: newOnRegenerateSecret, team}; const wrapper = shallow( - + , ); wrapper.find('#regenerateSecretButton').simulate('click', {preventDefault: jest.fn()}); @@ -87,7 +87,7 @@ describe('components/integrations/InstalledOAuthApp', () => { const filter = 'filter'; const props = {...baseProps, filter}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -95,7 +95,7 @@ describe('components/integrations/InstalledOAuthApp', () => { test('should match state on button clicks, both showSecretButton and hideSecretButton', () => { const props = {...baseProps, team}; const wrapper = shallow( - + , ); expect(wrapper.find('#showSecretButton').exists()).toBe(true); expect(wrapper.find('#hideSecretButton').exists()).toBe(false); @@ -117,11 +117,11 @@ describe('components/integrations/InstalledOAuthApp', () => { return new Promise((resolve) => { process.nextTick(() => resolve()); }); - } + }, ); const props = {...baseProps, onRegenerateSecret: newOnRegenerateSecret, team}; const wrapper = shallow( - + , ); expect(wrapper.find('#regenerateSecretButton').exists()).toBe(true); @@ -134,7 +134,7 @@ describe('components/integrations/InstalledOAuthApp', () => { const newOnDelete = jest.fn(); const props = {...baseProps, team, onDelete: newOnDelete}; const wrapper = shallow( - + , ); expect(wrapper.find(DeleteIntegration).exists()).toBe(true); diff --git a/components/integrations/installed_oauth_apps/installed_oauth_apps.jsx b/components/integrations/installed_oauth_apps/installed_oauth_apps.jsx index 908bef201598..537afdaa2a4c 100644 --- a/components/integrations/installed_oauth_apps/installed_oauth_apps.jsx +++ b/components/integrations/installed_oauth_apps/installed_oauth_apps.jsx @@ -63,7 +63,7 @@ export default class InstalledOAuthApps extends React.PureComponent { componentDidMount() { if (this.props.enableOAuthServiceProvider) { this.props.actions.loadOAuthAppsAndProfiles().then( - () => this.setState({loading: false}) + () => this.setState({loading: false}), ); } } diff --git a/components/integrations/installed_oauth_apps/installed_oauth_apps.test.jsx b/components/integrations/installed_oauth_apps/installed_oauth_apps.test.jsx index 2cf39d919ab5..4ea1cf07741d 100644 --- a/components/integrations/installed_oauth_apps/installed_oauth_apps.test.jsx +++ b/components/integrations/installed_oauth_apps/installed_oauth_apps.test.jsx @@ -55,13 +55,13 @@ describe('components/integrations/InstalledOAuthApps', () => { return new Promise((resolve) => { process.nextTick(() => resolve()); }); - } + }, ); const props = {...baseProps}; props.actions.loadOAuthAppsAndProfiles = newGetOAuthApps; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -81,7 +81,7 @@ describe('components/integrations/InstalledOAuthApps', () => { const props = {...baseProps}; props.actions.deleteOAuthApp = newDeleteOAuthApp; const wrapper = shallow( - + , ); wrapper.instance().deleteOAuthApp(oauthApps.facxd9wpzpbpfp8pad78xj75pr); diff --git a/components/integrations/installed_outgoing_webhook.test.jsx b/components/integrations/installed_outgoing_webhook.test.jsx index 1c64c73d9801..760f4ba1ea42 100644 --- a/components/integrations/installed_outgoing_webhook.test.jsx +++ b/components/integrations/installed_outgoing_webhook.test.jsx @@ -49,7 +49,7 @@ describe('components/integrations/InstalledOutgoingWebhook', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -58,14 +58,14 @@ describe('components/integrations/InstalledOutgoingWebhook', () => { const newCanChange = false; const props = {...baseProps, canChange: newCanChange}; const wrapper = shallow( - + , ); expect(wrapper.find('.item-actions').length).toBe(0); }); test('should have edit and delete actions if user can change webhook', () => { const wrapper = shallow( - + , ); expect(wrapper.find('.item-actions').find(Link).exists()).toBe(true); expect(wrapper.find('.item-actions').find(DeleteIntegration).exists()).toBe(true); @@ -75,7 +75,7 @@ describe('components/integrations/InstalledOutgoingWebhook', () => { const newCanChange = false; const props = {...baseProps, canChange: newCanChange}; const wrapper = shallow( - + , ); expect(wrapper.find('.item-details__description').text()).toBe('build status'); @@ -86,7 +86,7 @@ describe('components/integrations/InstalledOutgoingWebhook', () => { const newOutgoingWebhook = {...outgoingWebhook, description: null}; const props = {...baseProps, outgoingWebhook: newOutgoingWebhook}; const wrapper = shallow( - + , ); expect(wrapper.find('.item-details__description').length).toBe(0); @@ -96,7 +96,7 @@ describe('components/integrations/InstalledOutgoingWebhook', () => { const newFilter = 'someLongText'; const props = {...baseProps, filter: newFilter}; const wrapper = shallow( - + , ); expect(wrapper.getElement()).toBe(null); @@ -106,7 +106,7 @@ describe('components/integrations/InstalledOutgoingWebhook', () => { const newFilter = 'buil'; const props = {...baseProps, filter: newFilter}; const wrapper = shallow( - + , ); expect(wrapper.find('.item-details').exists()).toBe(true); @@ -118,7 +118,7 @@ describe('components/integrations/InstalledOutgoingWebhook', () => { const props = {...baseProps, filter: newFilter, onRegenToken: newOnRegenToken}; const wrapper = shallow( - + , ); wrapper.find('.item-actions button').first().simulate('click', {preventDefault() { @@ -133,7 +133,7 @@ describe('components/integrations/InstalledOutgoingWebhook', () => { const props = {...baseProps, filter: newFilter, onDelete: newOnDelete}; const wrapper = shallow( - + , ); wrapper.find(DeleteIntegration).first().prop('onDelete')(); @@ -142,7 +142,7 @@ describe('components/integrations/InstalledOutgoingWebhook', () => { test('Should match snapshot of makeDisplayName', () => { const wrapper = shallow( - + , ); // displays webhook's display name diff --git a/components/integrations/installed_outgoing_webhooks/installed_outgoing_webhooks.jsx b/components/integrations/installed_outgoing_webhooks/installed_outgoing_webhooks.jsx index 0b6ebaac6095..487220780cf4 100644 --- a/components/integrations/installed_outgoing_webhooks/installed_outgoing_webhooks.jsx +++ b/components/integrations/installed_outgoing_webhooks/installed_outgoing_webhooks.jsx @@ -86,9 +86,9 @@ export default class InstalledOutgoingWebhooks extends React.PureComponent { this.props.actions.loadOutgoingHooksAndProfilesForTeam( this.props.teamId, Constants.Integrations.START_PAGE_NUM, - Constants.Integrations.PAGE_SIZE + Constants.Integrations.PAGE_SIZE, ).then( - () => this.setState({loading: false}) + () => this.setState({loading: false}), ); } } diff --git a/components/integrations/installed_outgoing_webhooks/installed_outgoing_webhooks.test.jsx b/components/integrations/installed_outgoing_webhooks/installed_outgoing_webhooks.test.jsx index 8121978363f6..7609a60d25e5 100644 --- a/components/integrations/installed_outgoing_webhooks/installed_outgoing_webhooks.test.jsx +++ b/components/integrations/installed_outgoing_webhooks/installed_outgoing_webhooks.test.jsx @@ -90,7 +90,7 @@ describe('components/integrations/InstalledOutgoingWebhooks', () => { }, }} enableOutgoingWebhooks={true} - /> + />, ); expect(shallow(
{wrapper.instance().outgoingWebhooks('town')}
)).toMatchSnapshot(); expect(shallow(
{wrapper.instance().outgoingWebhooks('ZZZ')}
)).toMatchSnapshot(); @@ -137,7 +137,7 @@ describe('components/integrations/InstalledOutgoingWebhooks', () => { }, }} enableOutgoingWebhooks={true} - /> + />, ); wrapper.instance().regenOutgoingWebhookToken(outgoingWebhooks[0]); expect(mockFunc).toHaveBeenCalledTimes(1); @@ -184,7 +184,7 @@ describe('components/integrations/InstalledOutgoingWebhooks', () => { }, }} enableOutgoingWebhooks={true} - /> + />, ); wrapper.instance().removeOutgoingHook(outgoingWebhooks[1]); diff --git a/components/integrations/integrations.jsx b/components/integrations/integrations.jsx index 38a090cd06b4..c78bfe963a8e 100644 --- a/components/integrations/integrations.jsx +++ b/components/integrations/integrations.jsx @@ -69,7 +69,7 @@ export default class Integrations extends React.Component { } link={'/' + this.props.team.name + '/integrations/incoming_webhooks'} /> - + , ); } @@ -97,7 +97,7 @@ export default class Integrations extends React.Component { } link={'/' + this.props.team.name + '/integrations/outgoing_webhooks'} /> - + , ); } @@ -125,7 +125,7 @@ export default class Integrations extends React.Component { } link={'/' + this.props.team.name + '/integrations/commands'} /> - + , ); } @@ -152,7 +152,7 @@ export default class Integrations extends React.Component { } link={'/' + this.props.team.name + '/integrations/oauth2-apps'} /> - + , ); } @@ -177,7 +177,7 @@ export default class Integrations extends React.Component { } link={'/' + this.props.team.name + '/integrations/bots'} /> - + , ); return ( diff --git a/components/interactive_dialog/dialog_element/dialog_element.jsx b/components/interactive_dialog/dialog_element/dialog_element.jsx index ce2dbe246497..d011460dfe81 100644 --- a/components/interactive_dialog/dialog_element/dialog_element.jsx +++ b/components/interactive_dialog/dialog_element/dialog_element.jsx @@ -57,7 +57,7 @@ export default class DialogElement extends React.PureComponent { if (props.value && props.options) { const defaultOption = props.options.find( - (option) => option.value === props.value + (option) => option.value === props.value, ); defaultText = defaultOption ? defaultOption.text : ''; } diff --git a/components/interactive_dialog/dialog_element/dialog_element.test.jsx b/components/interactive_dialog/dialog_element/dialog_element.test.jsx index c40a74ea8842..d25405fa0c81 100644 --- a/components/interactive_dialog/dialog_element/dialog_element.test.jsx +++ b/components/interactive_dialog/dialog_element/dialog_element.test.jsx @@ -37,13 +37,13 @@ describe('components/interactive_dialog/DialogElement', () => { + />, ); expect(wrapper.matchesElement( + />, )).toEqual(true); }); @@ -52,13 +52,13 @@ describe('components/interactive_dialog/DialogElement', () => { + />, ); expect(wrapper.matchesElement( + />, )).toEqual(true); }); @@ -67,13 +67,13 @@ describe('components/interactive_dialog/DialogElement', () => { + />, ); expect(wrapper.matchesElement( + />, )).toEqual(true); }); @@ -82,13 +82,13 @@ describe('components/interactive_dialog/DialogElement', () => { + />, ); expect(wrapper.matchesElement( + />, )).toEqual(true); }); @@ -105,7 +105,7 @@ describe('components/interactive_dialog/DialogElement', () => { type='radio' options={radioOptions} onChange={jest.fn()} - /> + />, ); expect(wrapper.find(RadioSetting).exists()).toBe(true); @@ -118,7 +118,7 @@ describe('components/interactive_dialog/DialogElement', () => { type='radio' options={null} onChange={jest.fn()} - /> + />, ); expect(wrapper.find(RadioSetting).exists()).toBe(true); @@ -132,7 +132,7 @@ describe('components/interactive_dialog/DialogElement', () => { options={null} value={null} onChange={jest.fn()} - /> + />, ); expect(wrapper.find(RadioSetting).exists()).toBe(true); @@ -146,7 +146,7 @@ describe('components/interactive_dialog/DialogElement', () => { options={null} value={'a'} onChange={jest.fn()} - /> + />, ); expect(wrapper.find(RadioSetting).exists()).toBe(true); @@ -160,7 +160,7 @@ describe('components/interactive_dialog/DialogElement', () => { options={radioOptions} value={'a'} onChange={jest.fn()} - /> + />, ); expect(wrapper.find(RadioSetting).exists()).toBe(true); @@ -173,7 +173,7 @@ describe('components/interactive_dialog/DialogElement', () => { type='radio' options={radioOptions} onChange={jest.fn()} - /> + />, ); expect(wrapper.find({options: radioOptions}).props.value).toBeUndefined(); }); @@ -186,7 +186,7 @@ describe('components/interactive_dialog/DialogElement', () => { options={radioOptions} value={radioOptions[1].value} onChange={jest.fn()} - /> + />, ); expect(wrapper.find({options: radioOptions, value: radioOptions[1].value}).exists()).toBe(true); }); diff --git a/components/interactive_dialog/dialog_introduction_text.jsx b/components/interactive_dialog/dialog_introduction_text.jsx index 713989268a61..1607b0378be8 100644 --- a/components/interactive_dialog/dialog_introduction_text.jsx +++ b/components/interactive_dialog/dialog_introduction_text.jsx @@ -10,7 +10,7 @@ export default class DialogIntroductionText extends React.PureComponent { static propTypes = { id: PropTypes.string, value: PropTypes.string.isRequired, - emojiMap: PropTypes.object.isRequired + emojiMap: PropTypes.object.isRequired, }; render() { @@ -19,9 +19,9 @@ export default class DialogIntroductionText extends React.PureComponent { { breaks: true, sanitize: true, - gfm: true + gfm: true, }, - this.props.emojiMap + this.props.emojiMap, ); return ( diff --git a/components/interactive_dialog/dialog_introduction_text.test.jsx b/components/interactive_dialog/dialog_introduction_text.test.jsx index 93cb4191e9e1..f1657edeacff 100644 --- a/components/interactive_dialog/dialog_introduction_text.test.jsx +++ b/components/interactive_dialog/dialog_introduction_text.test.jsx @@ -15,7 +15,7 @@ describe('components/DialogIntroductionText', () => { const descriptor = { id: 'testsupported', value: '**bold** *italic* [link](https://mattermost.com/)
[link target blank](!https://mattermost.com/)', - emojiMap + emojiMap, }; const wrapper = mount(); expect(wrapper).toMatchSnapshot(); @@ -25,7 +25,7 @@ describe('components/DialogIntroductionText', () => { const descriptor = { id: 'testblankvalue', value: '', - emojiMap + emojiMap, }; const wrapper = mount(); expect(wrapper).toMatchSnapshot(); diff --git a/components/interactive_dialog/index.js b/components/interactive_dialog/index.js index 9312ff0fa81b..41457f5e27e2 100644 --- a/components/interactive_dialog/index.js +++ b/components/interactive_dialog/index.js @@ -26,15 +26,15 @@ function mapStateToProps(state) { submitLabel: data.dialog.submit_label, notifyOnCancel: data.dialog.notify_on_cancel, state: data.dialog.state, - emojiMap: getEmojiMap(state) + emojiMap: getEmojiMap(state), }; } function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ - submitInteractiveDialog - }, dispatch) + submitInteractiveDialog, + }, dispatch), }; } diff --git a/components/interactive_dialog/interactive_dialog.jsx b/components/interactive_dialog/interactive_dialog.jsx index 796640e5872f..ec9a35553369 100644 --- a/components/interactive_dialog/interactive_dialog.jsx +++ b/components/interactive_dialog/interactive_dialog.jsx @@ -7,7 +7,7 @@ import {Modal} from 'react-bootstrap'; import {FormattedMessage} from 'react-intl'; import { checkDialogElementForError, - checkIfErrorsMatchElements + checkIfErrorsMatchElements, } from 'mattermost-redux/utils/integration_utils'; import SpinnerButton from 'components/spinner_button'; @@ -30,9 +30,9 @@ export default class InteractiveDialog extends React.Component { state: PropTypes.string, onHide: PropTypes.func, actions: PropTypes.shape({ - submitInteractiveDialog: PropTypes.func.isRequired + submitInteractiveDialog: PropTypes.func.isRequired, }).isRequired, - emojiMap: PropTypes.object.isRequired + emojiMap: PropTypes.object.isRequired, }; constructor(props) { @@ -56,7 +56,7 @@ export default class InteractiveDialog extends React.Component { values, error: null, errors: {}, - submitting: false + submitting: false, }; } @@ -70,7 +70,7 @@ export default class InteractiveDialog extends React.Component { elements.forEach((elem) => { const error = checkDialogElementForError( elem, - values[elem.name] + values[elem.name], ); if (error) { errors[elem.name] = ( @@ -96,13 +96,13 @@ export default class InteractiveDialog extends React.Component { url, callback_id: callbackId, state, - submission: values + submission: values, }; this.setState({submitting: true}); const {data} = await this.props.actions.submitInteractiveDialog( - dialog + dialog, ); this.setState({submitting: false}); @@ -142,7 +142,7 @@ export default class InteractiveDialog extends React.Component { url, callback_id: callbackId, state, - cancelled: true + cancelled: true, }; this.props.actions.submitInteractiveDialog(dialog); @@ -162,7 +162,7 @@ export default class InteractiveDialog extends React.Component { introductionText, iconUrl, submitLabel, - elements + elements, } = this.props; let submitText = ( @@ -270,7 +270,7 @@ export default class InteractiveDialog extends React.Component { spinning={this.state.submitting} spinningText={localizeMessage( 'interactive_dialog.submitting', - 'Submitting...' + 'Submitting...', )} > {submitText} diff --git a/components/interactive_dialog/interactive_dialog.test.jsx b/components/interactive_dialog/interactive_dialog.test.jsx index b50b34b7989f..833a037b1a75 100644 --- a/components/interactive_dialog/interactive_dialog.test.jsx +++ b/components/interactive_dialog/interactive_dialog.test.jsx @@ -73,23 +73,23 @@ describe('components/interactive_dialog/InteractiveDialog', () => { options: [ {text: 'Option1', value: 'opt1'}, {text: 'Option2', value: 'opt2'}, - {text: 'Option3', value: 'opt3'} + {text: 'Option3', value: 'opt3'}, ], - type: 'select' + type: 'select', }; const {elements, ...rest} = baseProps; elements.push(selectElement); const props = { ...rest, - elements + elements, }; const store = mockStore({}); const wrapper = mountWithIntl( - + , ); expect(wrapper.find(Modal.Body).find('input').find({defaultValue: 'Option3'}).exists()).toBe(true); }); @@ -135,7 +135,7 @@ describe('components/interactive_dialog/InteractiveDialog', () => { const wrapper = mountWithIntl( - + , ); expect(wrapper.find(Modal.Body).find('input').find({checked: testCase.expectedChecked}).exists()).toBe(true); })); diff --git a/components/invitation_modal/invitation_modal.test.jsx b/components/invitation_modal/invitation_modal.test.jsx index db7ec0ae4b7e..a7575cd91194 100644 --- a/components/invitation_modal/invitation_modal.test.jsx +++ b/components/invitation_modal/invitation_modal.test.jsx @@ -35,7 +35,7 @@ describe('components/invitation_modal/InvitationModal', () => { test('should match the snapshot', () => { const wrapper = shallow( , - {context} + {context}, ); expect(wrapper).toMatchSnapshot(); }); @@ -46,7 +46,7 @@ describe('components/invitation_modal/InvitationModal', () => { {...defaultProps} show={false} />, - {context} + {context}, ); expect(wrapper).toMatchSnapshot(); }); @@ -57,7 +57,7 @@ describe('components/invitation_modal/InvitationModal', () => { {...defaultProps} canAddUsers={false} />, - {context} + {context}, ); expect(wrapper).toMatchSnapshot(); }); @@ -68,7 +68,7 @@ describe('components/invitation_modal/InvitationModal', () => { {...defaultProps} canInviteGuests={false} />, - {context} + {context}, ); expect(wrapper).toMatchSnapshot(); }); @@ -78,7 +78,7 @@ describe('components/invitation_modal/InvitationModal', () => { props.currentTeam.invite_id = ''; const wrapper = shallow( , - {context} + {context}, ); wrapper.instance().goToMembers(); @@ -90,7 +90,7 @@ describe('components/invitation_modal/InvitationModal', () => { const props = {...defaultProps}; props.currentTeam.invite_id = ''; const wrapper = mountWithIntl( - + , ); wrapper.instance().goToMembers(); diff --git a/components/invitation_modal/invitation_modal_confirm_step.test.jsx b/components/invitation_modal/invitation_modal_confirm_step.test.jsx index 832c948cbc69..46f2bde0517e 100644 --- a/components/invitation_modal/invitation_modal_confirm_step.test.jsx +++ b/components/invitation_modal/invitation_modal_confirm_step.test.jsx @@ -18,7 +18,7 @@ describe('components/invitation_modal/InvitationModalConfirmStep', () => { invitesType={InviteTypes.INVITE_GUEST} invitesSent={[{email: 'invite1@email'}, {email: 'invite2@email'}]} invitesNotSent={[{email: 'invite3@email'}, {email: 'invite4@email'}]} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -32,7 +32,7 @@ describe('components/invitation_modal/InvitationModalConfirmStep', () => { invitesType={InviteTypes.INVITE_MEMBER} invitesSent={[{email: 'invite1@email'}, {email: 'invite2@email'}]} invitesNotSent={[{email: 'invite3@email'}, {email: 'invite4@email'}]} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -46,7 +46,7 @@ describe('components/invitation_modal/InvitationModalConfirmStep', () => { invitesType={InviteTypes.INVITE_MEMBER} invitesSent={[]} invitesNotSent={[{email: 'invite3@email'}, {email: 'invite4@email'}]} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -60,7 +60,7 @@ describe('components/invitation_modal/InvitationModalConfirmStep', () => { invitesType={InviteTypes.INVITE_MEMBER} invitesSent={[{email: 'invite1@email'}, {email: 'invite2@email'}]} invitesNotSent={[]} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -74,7 +74,7 @@ describe('components/invitation_modal/InvitationModalConfirmStep', () => { invitesType={InviteTypes.INVITE_MEMBER} invitesSent={[]} invitesNotSent={[]} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/invitation_modal/invitation_modal_confirm_step_row.test.jsx b/components/invitation_modal/invitation_modal_confirm_step_row.test.jsx index 65adab85086b..2bce84dd05b6 100644 --- a/components/invitation_modal/invitation_modal_confirm_step_row.test.jsx +++ b/components/invitation_modal/invitation_modal_confirm_step_row.test.jsx @@ -11,7 +11,7 @@ describe('components/invitation_modal/InvitationModalConfirmStepRow', () => { const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -29,7 +29,7 @@ describe('components/invitation_modal/InvitationModalConfirmStepRow', () => { }, reason: 'Test reason user', }} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -51,7 +51,7 @@ describe('components/invitation_modal/InvitationModalConfirmStepRow', () => { values: {count: 1}, }, }} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -63,7 +63,7 @@ describe('components/invitation_modal/InvitationModalConfirmStepRow', () => { text: 'test', reason: 'Test reason for text', }} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/invitation_modal/invitation_modal_confirm_step_table.test.jsx b/components/invitation_modal/invitation_modal_confirm_step_table.test.jsx index 843ecd5ff400..32b31359388a 100644 --- a/components/invitation_modal/invitation_modal_confirm_step_table.test.jsx +++ b/components/invitation_modal/invitation_modal_confirm_step_table.test.jsx @@ -11,7 +11,7 @@ describe('components/invitation_modal/InvitationModalConfirmStepTable', () => { const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/invitation_modal/invitation_modal_guests_step.test.jsx b/components/invitation_modal/invitation_modal_guests_step.test.jsx index cc84aaa36e16..d66c30d77328 100644 --- a/components/invitation_modal/invitation_modal_guests_step.test.jsx +++ b/components/invitation_modal/invitation_modal_guests_step.test.jsx @@ -18,7 +18,7 @@ describe('components/invitation_modal/InvitationModalGuestsStep', () => { emailInvitationsEnabled={true} onSubmit={jest.fn()} onEdit={jest.fn()} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -34,7 +34,7 @@ describe('components/invitation_modal/InvitationModalGuestsStep', () => { emailInvitationsEnabled={false} onSubmit={jest.fn()} onEdit={jest.fn()} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/invitation_modal/invitation_modal_initial_step.test.jsx b/components/invitation_modal/invitation_modal_initial_step.test.jsx index 4890f1f1aedd..77f66087ff2b 100644 --- a/components/invitation_modal/invitation_modal_initial_step.test.jsx +++ b/components/invitation_modal/invitation_modal_initial_step.test.jsx @@ -14,7 +14,7 @@ describe('components/invitation_modal/InvitationModalInitialStep', () => { goToMembers={jest.fn()} goToGuests={jest.fn()} emailInvitationsEnabled={true} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -26,7 +26,7 @@ describe('components/invitation_modal/InvitationModalInitialStep', () => { goToMembers={jest.fn()} goToGuests={jest.fn()} emailInvitationsEnabled={false} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/invitation_modal/invitation_modal_members_step.test.jsx b/components/invitation_modal/invitation_modal_members_step.test.jsx index 28dc8f6e50ed..d5622f9f30d5 100644 --- a/components/invitation_modal/invitation_modal_members_step.test.jsx +++ b/components/invitation_modal/invitation_modal_members_step.test.jsx @@ -18,7 +18,7 @@ describe('components/invitation_modal/InvitationModalMembersStep', () => { emailInvitationsEnabled={true} onSubmit={jest.fn()} onEdit={jest.fn()} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -33,7 +33,7 @@ describe('components/invitation_modal/InvitationModalMembersStep', () => { emailInvitationsEnabled={false} onSubmit={jest.fn()} onEdit={jest.fn()} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -54,7 +54,7 @@ describe('components/invitation_modal/InvitationModalMembersStep', () => { emailInvitationsEnabled={false} onSubmit={jest.fn()} onEdit={jest.fn()} - /> + />, ); wrapper.instance().usersLoader('@something', jest.fn()); diff --git a/components/latex_block/latex_block.jsx b/components/latex_block/latex_block.jsx index d60c5c438ea6..9e1f7fa03b2a 100644 --- a/components/latex_block/latex_block.jsx +++ b/components/latex_block/latex_block.jsx @@ -42,7 +42,7 @@ export default class LatexBlock extends React.Component { displayMode: true, maxSize: 200, maxExpand: 100, - fleqn: true + fleqn: true, }; const html = this.state.katex.renderToString(this.props.content, katexOptions); diff --git a/components/leave_private_channel_modal/leave_private_channel_modal.test.tsx b/components/leave_private_channel_modal/leave_private_channel_modal.test.tsx index bbca038325c0..d0044d933288 100644 --- a/components/leave_private_channel_modal/leave_private_channel_modal.test.tsx +++ b/components/leave_private_channel_modal/leave_private_channel_modal.test.tsx @@ -26,7 +26,7 @@ describe('components/LeavePrivateChannelModal', () => { delete_at: 0, last_post_at: 0, total_msg_count: 0, - extra_update_at: 0 + extra_update_at: 0, }, 'channel-2': { id: 'channel-2', @@ -44,7 +44,7 @@ describe('components/LeavePrivateChannelModal', () => { delete_at: 0, last_post_at: 0, total_msg_count: 0, - extra_update_at: 0 + extra_update_at: 0, }, 'town-square': { id: 'town-square-id', @@ -62,7 +62,7 @@ describe('components/LeavePrivateChannelModal', () => { delete_at: 0, last_post_at: 0, total_msg_count: 0, - extra_update_at: 0 + extra_update_at: 0, }, }; @@ -76,7 +76,7 @@ describe('components/LeavePrivateChannelModal', () => { const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); @@ -86,7 +86,7 @@ describe('components/LeavePrivateChannelModal', () => { const wrapper = shallow( + />, ); wrapper.instance().handleToggle(channels['channel-2']); @@ -112,7 +112,7 @@ describe('components/LeavePrivateChannelModal', () => { const wrapper = shallow( + />, ); wrapper.setState({ @@ -143,7 +143,7 @@ describe('components/LeavePrivateChannelModal', () => { const wrapper = shallow( + />, ); wrapper.setState({ diff --git a/components/leave_private_channel_modal/leave_private_channel_modal.tsx b/components/leave_private_channel_modal/leave_private_channel_modal.tsx index 5feae6f30f40..0ce035dd29fe 100644 --- a/components/leave_private_channel_modal/leave_private_channel_modal.tsx +++ b/components/leave_private_channel_modal/leave_private_channel_modal.tsx @@ -26,7 +26,7 @@ export default class LeavePrivateChannelModal extends React.Component { this.setState({ - show: false + show: false, }); }; diff --git a/components/legacy_sidebar/index.js b/components/legacy_sidebar/index.js index 910b47a9a71a..c395b0848120 100644 --- a/components/legacy_sidebar/index.js +++ b/components/legacy_sidebar/index.js @@ -56,7 +56,7 @@ function mapStateToProps(state) { state, Preferences.CATEGORY_SIDEBAR_SETTINGS, 'channel_switcher_section', - 'true' + 'true', ); return { @@ -72,7 +72,7 @@ function mapStateToProps(state) { canCreatePrivateChannel, isOpen: getIsLhsOpen(state), unreads: getUnreads(state), - viewArchivedChannels: (getConfig(state).ExperimentalViewArchivedChannels === 'true') + viewArchivedChannels: (getConfig(state).ExperimentalViewArchivedChannels === 'true'), }; } diff --git a/components/legacy_sidebar/sidebar.jsx b/components/legacy_sidebar/sidebar.jsx index dcd52504d763..c3b2b977505f 100644 --- a/components/legacy_sidebar/sidebar.jsx +++ b/components/legacy_sidebar/sidebar.jsx @@ -428,7 +428,7 @@ class LegacySidebar extends React.PureComponent { this.props.currentChannel.id, allChannelIds, this.props.unreadChannelIds, - direction + direction, ); if (nextIndex !== -1) { diff --git a/components/legacy_sidebar/sidebar.test.jsx b/components/legacy_sidebar/sidebar.test.jsx index 37b3d407eda0..22a663642fc9 100644 --- a/components/legacy_sidebar/sidebar.test.jsx +++ b/components/legacy_sidebar/sidebar.test.jsx @@ -152,7 +152,7 @@ describe('component/legacy_sidebar/sidebar_channel/SidebarChannel', () => { test('should match snapshot, on sidebar show', () => { const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -164,7 +164,7 @@ describe('component/legacy_sidebar/sidebar_channel/SidebarChannel', () => { ...defaultProps, favoriteChannelIds: ['c1', 'c3', 'c5'], }} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -177,7 +177,7 @@ describe('component/legacy_sidebar/sidebar_channel/SidebarChannel', () => { unreadChannelIds: ['c3', 'c5'], showUnreadSection: true, }} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -190,7 +190,7 @@ describe('component/legacy_sidebar/sidebar_channel/SidebarChannel', () => { unreadChannelIds: ['c3', 'c5'], channelSwitcherOption: true, }} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -202,7 +202,7 @@ describe('component/legacy_sidebar/sidebar_channel/SidebarChannel', () => { ...defaultProps, currentTeam: null, }} - /> + />, ); expect(wrapper).toMatchSnapshot(); wrapper = shallowWithIntl( @@ -211,7 +211,7 @@ describe('component/legacy_sidebar/sidebar_channel/SidebarChannel', () => { ...defaultProps, currentUser: null, }} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -233,7 +233,7 @@ describe('component/legacy_sidebar/sidebar_channel/SidebarChannel', () => { }; const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); instance.scrollToChannel = jest.fn(); @@ -322,7 +322,7 @@ describe('component/legacy_sidebar/sidebar_channel/SidebarChannel', () => { }; const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); instance.scrollToChannel = jest.fn(); @@ -397,7 +397,7 @@ describe('component/legacy_sidebar/sidebar_channel/SidebarChannel', () => { }; const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); instance.handleOpenMoreDirectChannelsModal = jest.fn(); @@ -416,7 +416,7 @@ describe('component/legacy_sidebar/sidebar_channel/SidebarChannel', () => { test('should show/hide correctly more channels modal', () => { const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); instance.componentDidUpdate = jest.fn(); @@ -430,7 +430,7 @@ describe('component/legacy_sidebar/sidebar_channel/SidebarChannel', () => { test('should show/hide correctly new channel modal', () => { const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); instance.componentDidUpdate = jest.fn(); @@ -444,7 +444,7 @@ describe('component/legacy_sidebar/sidebar_channel/SidebarChannel', () => { test('should show/hide correctly more direct channels modal', () => { const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); instance.componentDidUpdate = jest.fn(); @@ -458,7 +458,7 @@ describe('component/legacy_sidebar/sidebar_channel/SidebarChannel', () => { test('should verify if the channel is displayed for props', () => { const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); expect(instance.channelIdIsDisplayedForProps(instance.props.orderedChannelIds, 'c1')).toBe(true); @@ -467,7 +467,7 @@ describe('component/legacy_sidebar/sidebar_channel/SidebarChannel', () => { test('should handle correctly open more direct channels toggle', () => { const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); instance.showMoreDirectChannelsModal = jest.fn(); @@ -487,7 +487,7 @@ describe('component/legacy_sidebar/sidebar_channel/SidebarChannel', () => { document.addEventListener = jest.fn(); document.removeEventListener = jest.fn(); const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); diff --git a/components/legacy_sidebar/sidebar_channel/sidebar_channel.jsx b/components/legacy_sidebar/sidebar_channel/sidebar_channel.jsx index 380fca77c975..0e0510b3dcac 100644 --- a/components/legacy_sidebar/sidebar_channel/sidebar_channel.jsx +++ b/components/legacy_sidebar/sidebar_channel/sidebar_channel.jsx @@ -191,7 +191,7 @@ class SidebarChannel extends React.PureComponent { this.props.actions.savePreferences(currentUserId, [{user_id: currentUserId, category, name: id, value: 'false'}]).then( () => { this.isLeaving = false; - } + }, ); trackEvent('ui', 'ui_direct_channel_x_button_clicked'); diff --git a/components/legacy_sidebar/sidebar_channel/sidebar_channel.test.jsx b/components/legacy_sidebar/sidebar_channel/sidebar_channel.test.jsx index 4205799b2b39..173dfe2385b6 100644 --- a/components/legacy_sidebar/sidebar_channel/sidebar_channel.test.jsx +++ b/components/legacy_sidebar/sidebar_channel/sidebar_channel.test.jsx @@ -79,7 +79,7 @@ describe('component/legacy_sidebar/sidebar_channel/SidebarChannel', () => { test('should match snapshot, on channel show', () => { const props = defaultProps; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); expect(props.actions.openLhs).not.toBeCalled(); @@ -88,7 +88,7 @@ describe('component/legacy_sidebar/sidebar_channel/SidebarChannel', () => { test('should match snapshot, on channel hide', () => { const props = {...defaultProps, shouldHideChannel: true}; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); expect(props.actions.openLhs).not.toBeCalled(); diff --git a/components/legacy_sidebar/sidebar_channel_button_or_link/sidebar_channel_button_or_link.test.jsx b/components/legacy_sidebar/sidebar_channel_button_or_link/sidebar_channel_button_or_link.test.jsx index 1fabd87cc0e5..2b01576b759d 100644 --- a/components/legacy_sidebar/sidebar_channel_button_or_link/sidebar_channel_button_or_link.test.jsx +++ b/components/legacy_sidebar/sidebar_channel_button_or_link/sidebar_channel_button_or_link.test.jsx @@ -34,7 +34,7 @@ describe('component/legacy_sidebar/sidebar_channel_button_or_link/SidebarChannel test('should match snapshot, on desktop with mentions badge', () => { const props = {...baseProps, badge: true}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -42,14 +42,14 @@ describe('component/legacy_sidebar/sidebar_channel_button_or_link/SidebarChannel test('should match snapshot, on desktop with draft', () => { const props = {...baseProps, hasDraft: true, badge: false, unreadMentions: 0}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); test('should match snapshot, on desktop without badge', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -68,7 +68,7 @@ describe('component/legacy_sidebar/sidebar_channel_button_or_link/SidebarChannel const props = {...baseProps, badge: true}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -78,7 +78,7 @@ describe('component/legacy_sidebar/sidebar_channel_button_or_link/SidebarChannel userAgentMock.isDesktopApp.mockImplementation(() => false); const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -120,7 +120,7 @@ describe('component/legacy_sidebar/sidebar_channel_button_or_link/SidebarChannel }; const wrapper = shallow( - + , ); expect(wrapper.find(OverlayTrigger)).toHaveLength(0); diff --git a/components/legacy_sidebar/sidebar_channel_button_or_link/sidebar_channel_button_or_link_close_button.test.jsx b/components/legacy_sidebar/sidebar_channel_button_or_link/sidebar_channel_button_or_link_close_button.test.jsx index 3d1e7c311471..43a309262dbe 100644 --- a/components/legacy_sidebar/sidebar_channel_button_or_link/sidebar_channel_button_or_link_close_button.test.jsx +++ b/components/legacy_sidebar/sidebar_channel_button_or_link/sidebar_channel_button_or_link_close_button.test.jsx @@ -14,7 +14,7 @@ describe('component/legacy_sidebar/sidebar_channel_button_or_link/SidebarChannel + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -26,7 +26,7 @@ describe('component/legacy_sidebar/sidebar_channel_button_or_link/SidebarChannel channelId={'test-id'} channelType={Constants.DM_CHANNEL} badge={true} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -37,7 +37,7 @@ describe('component/legacy_sidebar/sidebar_channel_button_or_link/SidebarChannel handleClose={jest.fn()} channelId={'test-id'} channelType={Constants.OPEN_CHANNEL} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -48,7 +48,7 @@ describe('component/legacy_sidebar/sidebar_channel_button_or_link/SidebarChannel handleClose={jest.fn()} channelId={'test-id'} channelType={Constants.PRIVATE_CHANNEL} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -59,7 +59,7 @@ describe('component/legacy_sidebar/sidebar_channel_button_or_link/SidebarChannel handleClose={jest.fn()} channelId={'test-id'} channelType={Constants.DM_CHANNEL} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -70,7 +70,7 @@ describe('component/legacy_sidebar/sidebar_channel_button_or_link/SidebarChannel handleClose={jest.fn()} channelId={'test-id'} channelType={Constants.GM_CHANNEL} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -82,7 +82,7 @@ describe('component/legacy_sidebar/sidebar_channel_button_or_link/SidebarChannel handleClose={mock} channelId={'test-id'} channelType={Constants.GM_CHANNEL} - /> + />, ); expect(mock).not.toBeCalled(); wrapper.find('.btn-close').simulate('click', {stopPropagation: jest.fn(), preventDefault: jest.fn()}); diff --git a/components/legacy_sidebar/sidebar_channel_button_or_link/sidebar_channel_button_or_link_icon.test.jsx b/components/legacy_sidebar/sidebar_channel_button_or_link/sidebar_channel_button_or_link_icon.test.jsx index aafdef227118..a306738e28ac 100644 --- a/components/legacy_sidebar/sidebar_channel_button_or_link/sidebar_channel_button_or_link_icon.test.jsx +++ b/components/legacy_sidebar/sidebar_channel_button_or_link/sidebar_channel_button_or_link_icon.test.jsx @@ -17,7 +17,7 @@ describe('component/legacy_sidebar/sidebar_channel_button_or_link/SidebarChannel channelId={'test-channel-id'} channelStatus={'test'} hasDraft={false} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -31,7 +31,7 @@ describe('component/legacy_sidebar/sidebar_channel_button_or_link/SidebarChannel teammateId={'test'} teammateDeletedAt={1} hasDraft={false} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -44,7 +44,7 @@ describe('component/legacy_sidebar/sidebar_channel_button_or_link/SidebarChannel channelId={'test-channel-id'} membersCount={3} hasDraft={false} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -56,7 +56,7 @@ describe('component/legacy_sidebar/sidebar_channel_button_or_link/SidebarChannel channelType={Constants.PRIVATE_CHANNEL} channelId={'test-channel-id'} hasDraft={false} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -68,7 +68,7 @@ describe('component/legacy_sidebar/sidebar_channel_button_or_link/SidebarChannel channelType={Constants.OPEN_CHANNEL} channelId={'test-channel-id'} hasDraft={false} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -80,7 +80,7 @@ describe('component/legacy_sidebar/sidebar_channel_button_or_link/SidebarChannel channelType={Constants.OPEN_CHANNEL} channelId={'test-channel-id'} hasDraft={false} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -92,7 +92,7 @@ describe('component/legacy_sidebar/sidebar_channel_button_or_link/SidebarChannel channelType={Constants.OPEN_CHANNEL} channelId={'test-channel-id'} hasDraft={true} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/legacy_sidebar/sidebar_tutorial_tip.jsx b/components/legacy_sidebar/sidebar_tutorial_tip.jsx index 06867ff3b30a..4e8ce9dafea7 100644 --- a/components/legacy_sidebar/sidebar_tutorial_tip.jsx +++ b/components/legacy_sidebar/sidebar_tutorial_tip.jsx @@ -14,7 +14,7 @@ export default class SidebarTutorialTip extends React.PureComponent { static propTypes = { townSquareDisplayName: PropTypes.string, offTopicDisplayName: PropTypes.string, - openLhs: PropTypes.func + openLhs: PropTypes.func, } componentDidMount() { @@ -50,7 +50,7 @@ export default class SidebarTutorialTip extends React.PureComponent { defaultMessage={'**Channels** organize conversations across different topics. They\'re open to everyone on your team. To send private communications use **Direct Messages** for a single person or **Private Channels** for multiple people.'} />

- + , ); screens.push( @@ -89,7 +89,7 @@ export default class SidebarTutorialTip extends React.PureComponent { }} />

- + , ); screens.push( @@ -112,7 +112,7 @@ export default class SidebarTutorialTip extends React.PureComponent { defaultMessage='You can also create a new channel by clicking the **"+" symbol** next to the public or private channel header.' />

- + , ); return ( diff --git a/components/legacy_sidebar/sidebar_tutorial_tip.test.jsx b/components/legacy_sidebar/sidebar_tutorial_tip.test.jsx index fb21a20d6680..eb072f09f782 100644 --- a/components/legacy_sidebar/sidebar_tutorial_tip.test.jsx +++ b/components/legacy_sidebar/sidebar_tutorial_tip.test.jsx @@ -20,7 +20,7 @@ describe('component/legacy_sidebar/SidebarTutorialTip', () => { test('should match snapshot, with townSquare and without offTopic', () => { const props = {...defaultProps, townSquareDisplayName: 'TestTownSquare'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); expect(props.openLhs).toBeCalled(); @@ -29,7 +29,7 @@ describe('component/legacy_sidebar/SidebarTutorialTip', () => { test('should match snapshot, without townSquare and with offTopic', () => { const props = {...defaultProps, offTopicDisplayName: 'TestOffTopic'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); expect(props.openLhs).toBeCalled(); @@ -38,7 +38,7 @@ describe('component/legacy_sidebar/SidebarTutorialTip', () => { test('should match snapshot, with townSquare and with offTopic', () => { const props = {...defaultProps, townSquareDisplayName: 'TestTownSquare', offTopicDisplayName: 'TestOffTopic'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); expect(props.openLhs).toBeCalled(); diff --git a/components/legacy_team_sidebar/legacy_team_sidebar_controller.jsx b/components/legacy_team_sidebar/legacy_team_sidebar_controller.jsx index cc72d37248da..c726e4977a75 100644 --- a/components/legacy_team_sidebar/legacy_team_sidebar_controller.jsx +++ b/components/legacy_team_sidebar/legacy_team_sidebar_controller.jsx @@ -183,7 +183,7 @@ export default class LegacyTeamSidebar extends React.Component { const newTeamsOrder = pushElement( popElement(teams, sourceIndex), destinationIndex, - result.draggableId + result.draggableId, ); updateTeamsOrderForUser(newTeamsOrder.map((o) => o.id)); this.setState({teamsOrder: newTeamsOrder}); @@ -238,7 +238,7 @@ export default class LegacyTeamSidebar extends React.Component { } content={'+'} switchTeam={this.props.actions.switchTeam} - /> + />, ); } else { joinableTeams.push( @@ -258,7 +258,7 @@ export default class LegacyTeamSidebar extends React.Component { content={'+'} switchTeam={this.props.actions.switchTeam} /> - + , ); } @@ -268,7 +268,7 @@ export default class LegacyTeamSidebar extends React.Component { className='team-sidebar-bottom-plugin is-empty' > - + , ); return ( diff --git a/components/link_tooltip/link_tooltip.test.tsx b/components/link_tooltip/link_tooltip.test.tsx index 6e9eec467500..799d95b21227 100644 --- a/components/link_tooltip/link_tooltip.test.tsx +++ b/components/link_tooltip/link_tooltip.test.tsx @@ -14,7 +14,7 @@ describe('components/link_tooltip/link_tooltip', () => { + />, ); expect(wrapper).toMatchSnapshot(); diff --git a/components/link_tooltip/link_tooltip.tsx b/components/link_tooltip/link_tooltip.tsx index e3f5d2a4d9b5..ad9f45320abf 100644 --- a/components/link_tooltip/link_tooltip.tsx +++ b/components/link_tooltip/link_tooltip.tsx @@ -104,7 +104,7 @@ export default class LinkTooltip extends React.PureComponent { pluggableName='LinkTooltip' /> , - document.getElementById('root') as HTMLElement + document.getElementById('root') as HTMLElement, )} { it('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); setTimeout(() => { @@ -54,7 +54,7 @@ describe('components/ListModal', () => { const props = {...baseProps}; props.numPerPage = numPerPage; const wrapper = shallow( - + , ); setTimeout(() => { expect(wrapper.state('numPerPage')).toEqual(numPerPage); @@ -66,7 +66,7 @@ describe('components/ListModal', () => { props.titleBarButtonText = 'Add Foo'; props.titleBarButtonTextOnClick = () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -75,7 +75,7 @@ describe('components/ListModal', () => { const onHide = jest.fn(); const props = {...baseProps, onHide}; const wrapper = shallow( - + , ); wrapper.instance().handleExit(); expect(onHide).toHaveBeenCalledTimes(1); @@ -83,7 +83,7 @@ describe('components/ListModal', () => { test('paging loads new items', () => { const wrapper = shallow( - + , ); wrapper.instance().onNext(); setTimeout(() => { @@ -99,7 +99,7 @@ describe('components/ListModal', () => { test('search input', () => { const wrapper = shallow( - + , ); wrapper.instance().onSearchInput({target: {value: mockSearchTerm}}); setTimeout(() => { diff --git a/components/loading_image_preview.test.tsx b/components/loading_image_preview.test.tsx index a42e7c6b8113..1fb98ec4e3f2 100644 --- a/components/loading_image_preview.test.tsx +++ b/components/loading_image_preview.test.tsx @@ -15,7 +15,7 @@ describe('components/LoadingImagePreview', () => { + />, ); expect(wrapper).toMatchSnapshot(); diff --git a/components/local_date_time/local_date_time.test.tsx b/components/local_date_time/local_date_time.test.tsx index f77645944652..3afa1d22202b 100644 --- a/components/local_date_time/local_date_time.test.tsx +++ b/components/local_date_time/local_date_time.test.tsx @@ -12,7 +12,7 @@ describe('components/LocalDateTime', () => { const wrapper = mountWithIntl( + />, ); expect(wrapper.find('time').prop('title')).toBe('Fri Jan 12 2018 12:15:13 GMT+0000'); @@ -25,7 +25,7 @@ describe('components/LocalDateTime', () => { eventTime={new Date('Fri Jan 12 2018 20:15:13 GMT+0800 (+08)').getTime()} enableTimezone={false} timeZone={'Australia/Sydney'} - /> + />, ); expect(wrapper.find('time').prop('title')).toBe('Fri Jan 12 2018 12:15:13 GMT+0000'); @@ -39,7 +39,7 @@ describe('components/LocalDateTime', () => { useMilitaryTime={true} enableTimezone={false} timeZone={'Australia/Sydney'} - /> + />, ); expect(wrapper.find('time').prop('title')).toBe('Fri Jan 12 2018 15:15:13 GMT+0000'); @@ -51,7 +51,7 @@ describe('components/LocalDateTime', () => { + />, ); // Can't do an exact match here, since without a default, the timezone gets set to local @@ -81,7 +81,7 @@ describe('components/LocalDateTime', () => { const wrapper = mountWithIntl( + />, ); expect(wrapper.find('time').prop('title')).toBe('Fri Jan 12 2018 10:15:13 GMT-1000 (US/Hawaii)'); expect(wrapper.find('span').text()).toBe('10:15 AM'); @@ -112,7 +112,7 @@ describe('components/LocalDateTime', () => { const wrapper = mountWithIntl( + />, ); expect(wrapper.find('time').prop('title')).toBe('Fri Jan 12 2018 19:15:13 GMT-0900 (US/Alaska)'); expect(wrapper.find('span').text()).toBe('19:15'); diff --git a/components/localized_input/localized_input.test.tsx b/components/localized_input/localized_input.test.tsx index 3ffbeee196af..aed53290b650 100644 --- a/components/localized_input/localized_input.test.tsx +++ b/components/localized_input/localized_input.test.tsx @@ -24,7 +24,7 @@ describe('components/localized_input/localized_input', () => { messages={{}} > - + , ).childAt(0); expect(wrapper).toMatchSnapshot(); @@ -47,7 +47,7 @@ describe('components/localized_input/localized_input', () => { messages={{}} > - + , ); expect(ref.current).toBe(wrapper.find('input').instance()); diff --git a/components/logged_in/logged_in.jsx b/components/logged_in/logged_in.jsx index 38b3af43f670..cc9fac967672 100644 --- a/components/logged_in/logged_in.jsx +++ b/components/logged_in/logged_in.jsx @@ -65,7 +65,7 @@ export default class LoggedIn extends React.PureComponent { viewChannel('', this.props.currentChannelId || '')(dispatch, getState); } WebSocketActions.close(); - } + }, ); // Listen for focused tab/window state @@ -80,7 +80,7 @@ export default class LoggedIn extends React.PureComponent { { type: 'webapp-ready', }, - window.location.origin + window.location.origin, ); // Because current CSS requires the root tag to have specific stuff diff --git a/components/logged_in/logged_in.test.jsx b/components/logged_in/logged_in.test.jsx index d07dde9d9d34..c10a7349774b 100644 --- a/components/logged_in/logged_in.test.jsx +++ b/components/logged_in/logged_in.test.jsx @@ -39,7 +39,7 @@ describe('components/logged_in/LoggedIn', () => { position="relative" style={Object {}} /> -` +`, ); }); @@ -55,7 +55,7 @@ describe('components/logged_in/LoggedIn', () => { -` +`, ); }); @@ -74,7 +74,7 @@ describe('components/logged_in/LoggedIn', () => { Test -` +`, ); }); @@ -93,7 +93,7 @@ describe('components/logged_in/LoggedIn', () => { Test -` +`, ); }); @@ -110,7 +110,7 @@ describe('components/logged_in/LoggedIn', () => { -` +`, ); }); @@ -130,7 +130,7 @@ describe('components/logged_in/LoggedIn', () => { Test -` +`, ); }); @@ -147,7 +147,7 @@ describe('components/logged_in/LoggedIn', () => { Test -` +`, ); }); }); diff --git a/components/login/login_controller/login_controller.jsx b/components/login/login_controller/login_controller.jsx index ce621099ad83..e367c32c8452 100644 --- a/components/login/login_controller/login_controller.jsx +++ b/components/login/login_controller/login_controller.jsx @@ -157,7 +157,7 @@ class LoginController extends React.Component { title: this.props.siteName, body: Utils.localizeMessage( 'login.session_expired.notification', - 'Session Expired: Please sign in to continue receiving notifications.' + 'Session Expired: Please sign in to continue receiving notifications.', ), requireInteraction: true, silent: false, @@ -603,7 +603,7 @@ class LoginController extends React.Component { - + , ); } @@ -629,7 +629,7 @@ class LoginController extends React.Component { /> - + , ); } @@ -646,7 +646,7 @@ class LoginController extends React.Component { defaultMessage='I forgot my password.' /> - + , ); } @@ -660,7 +660,7 @@ class LoginController extends React.Component { id='login.or' defaultMessage='or' /> - + , ); loginControls.push( @@ -669,7 +669,7 @@ class LoginController extends React.Component { id='login.signInWith' defaultMessage='Sign in with:' /> - + , ); } @@ -689,7 +689,7 @@ class LoginController extends React.Component { /> - + , ); } @@ -709,7 +709,7 @@ class LoginController extends React.Component { /> - + , ); } @@ -729,7 +729,7 @@ class LoginController extends React.Component { /> - + , ); } @@ -749,7 +749,7 @@ class LoginController extends React.Component { {this.props.samlLoginButtonText} - + , ); } @@ -764,7 +764,7 @@ class LoginController extends React.Component { /> } margin={true} - /> + />, ); } diff --git a/components/login/login_controller/login_controller.test.jsx b/components/login/login_controller/login_controller.test.jsx index 7d12a3280752..b94d3f3f526a 100644 --- a/components/login/login_controller/login_controller.test.jsx +++ b/components/login/login_controller/login_controller.test.jsx @@ -41,7 +41,7 @@ describe('components/login/LoginController', () => { it('should match snapshot', () => { const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -52,7 +52,7 @@ describe('components/login/LoginController', () => { ...baseProps, }; const wrapper = shallowWithIntl( - + , ); wrapper.setState({sessionExpired: true}); @@ -65,7 +65,7 @@ describe('components/login/LoginController', () => { initializing: true, }; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -79,7 +79,7 @@ describe('components/login/LoginController', () => { LocalStorageStore.setWasLoggedIn(true); const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -96,7 +96,7 @@ describe('components/login/LoginController', () => { LocalStorageStore.setWasLoggedIn(true); const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -112,7 +112,7 @@ describe('components/login/LoginController', () => { }; const wrapper = shallowWithIntl( - + , ); wrapper.setState({sessionExpired: true}); diff --git a/components/login/login_mfa.jsx b/components/login/login_mfa.jsx index 6a1af83a7bc5..7e3dabea498d 100644 --- a/components/login/login_mfa.jsx +++ b/components/login/login_mfa.jsx @@ -61,7 +61,7 @@ export default class LoginMfa extends React.PureComponent { this.props.submit( this.props.loginId, this.props.password, - this.state.token + this.state.token, ); } diff --git a/components/login/login_mfa.test.jsx b/components/login/login_mfa.test.jsx index b2c5fd06af19..b6bb25e1d581 100644 --- a/components/login/login_mfa.test.jsx +++ b/components/login/login_mfa.test.jsx @@ -15,7 +15,7 @@ describe('components/login/LoginMfa', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -23,7 +23,7 @@ describe('components/login/LoginMfa', () => { test('should have match state when handleChange is called', () => { const wrapper = shallow( - + , ); wrapper.setState({token: ''}); @@ -36,7 +36,7 @@ describe('components/login/LoginMfa', () => { const submit = jest.fn(); const props = {...baseProps, submit}; const wrapper = shallow( - + , ); wrapper.setState({token: '', serverError: '', saving: false}); diff --git a/components/markdown/index.ts b/components/markdown/index.ts index f797f1e743e1..6817d8009ddb 100644 --- a/components/markdown/index.ts +++ b/components/markdown/index.ts @@ -34,7 +34,7 @@ function makeGetChannelNamesMap() { } return channelNamesMap; - } + }, ); } @@ -53,7 +53,7 @@ function makeMapStateToProps() { team: getCurrentTeam(state), hasImageProxy: config.HasImageProxy === 'true', minimumHashtagLength: parseInt(config.MinimumHashtagLength || '', 10), - emojiMap: getEmojiMap(state) + emojiMap: getEmojiMap(state), }; }; } diff --git a/components/markdown/markdown.test.tsx b/components/markdown/markdown.test.tsx index 6a4a0448d040..4ededc9f9543 100644 --- a/components/markdown/markdown.test.tsx +++ b/components/markdown/markdown.test.tsx @@ -41,7 +41,7 @@ describe('components/Markdown', () => { test('should render properly', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -53,7 +53,7 @@ describe('components/Markdown', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/markdown_image.test.jsx b/components/markdown_image.test.jsx index f12975030052..a8448da8334f 100644 --- a/components/markdown_image.test.jsx +++ b/components/markdown_image.test.jsx @@ -21,13 +21,13 @@ describe('components/MarkdownImage', () => { className: 'markdown-inline-img', postId: 'post_id', imageIsLink: false, - onImageLoaded: jest.fn() + onImageLoaded: jest.fn(), }; test('should match snapshot', () => { const props = {...baseProps, src: '/images/logo.png'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -36,7 +36,7 @@ describe('components/MarkdownImage', () => { test('should match snapshot for broken link', () => { const props = {...baseProps, imageMetadata: {}, src: 'brokenLink'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -45,7 +45,7 @@ describe('components/MarkdownImage', () => { test('should handle load failure properly', () => { const props = {...baseProps, imageMetadata: {}, src: 'brokenLink'}; const wrapper = shallow( - + , ); expect(wrapper.state('loadFailed')).toBe(false); @@ -59,7 +59,7 @@ describe('components/MarkdownImage', () => { const props = {...baseProps, imageMetadata: {}, src: 'brokenLink'}; const nextProps = {...baseProps, src: 'https://example.com/image.png'}; const wrapper = shallow( - + , ); wrapper.instance().setState({loadFailed: true}); @@ -72,7 +72,7 @@ describe('components/MarkdownImage', () => { test('should render a link if the source is unsafe', () => { const props = {...baseProps, src: ''}; const wrapper = shallow( - + , ); expect(wrapper.find('img').props().alt).toBe(props.alt); expect(wrapper.find('img').props().className).toBe(props.className + ' broken-image'); @@ -82,7 +82,7 @@ describe('components/MarkdownImage', () => { test('should handle not loaded state properly', () => { const props = {...baseProps, src: 'https://example.com/image.png'}; const wrapper = shallow( - + , ); expect(wrapper.state('loaded')).toBe(false); @@ -100,7 +100,7 @@ describe('components/MarkdownImage', () => { test('should handle not loaded state properly in case of a header change system message', () => { const props = {...baseProps, src: 'https://example.com/image.png', postType: 'system_header_change'}; const wrapper = shallow( - + , ); expect(wrapper.state('loaded')).toBe(false); @@ -118,11 +118,11 @@ describe('components/MarkdownImage', () => { test('should set loaded state when img loads and call onImageLoaded prop', () => { const props = {...baseProps, src: 'https://example.com/image.png'}; const wrapper = shallow( - + , ); const dimensions = { height: props.imageMetadata.height, - width: props.imageMetadata.width + width: props.imageMetadata.width, }; expect(wrapper.state('loaded')).toBe(false); @@ -141,7 +141,7 @@ describe('components/MarkdownImage', () => { src: 'path/image', }; const wrapper = shallow( - + , ); wrapper.instance().setState({loaded: true}); @@ -153,7 +153,7 @@ describe('components/MarkdownImage', () => { test('should render an image with preview modal if the source is safe', () => { const props = {...baseProps, src: 'https://example.com/image.png'}; const wrapper = shallow( - + , ); wrapper.instance().setState({loaded: true}); @@ -172,7 +172,7 @@ describe('components/MarkdownImage', () => { test('should render an image with no preview if the source is safe and the image is a link', () => { const props = {...baseProps, src: 'https://example.com/image.png', imageIsLink: true}; const wrapper = shallow( - + , ); wrapper.instance().setState({loaded: true}); @@ -191,7 +191,7 @@ describe('components/MarkdownImage', () => { test('should handle showModal state properly', () => { const props = {...baseProps, src: 'https://example.com/image.png'}; const wrapper = shallow( - + , ); wrapper.instance().showModal({preventDefault: () => {}}); expect(wrapper.state('showModal')).toEqual(true); @@ -200,7 +200,7 @@ describe('components/MarkdownImage', () => { test('should handle showModal state properly in case the image is a link', () => { const props = {...baseProps, src: 'https://example.com/image.png', imageIsLink: true}; const wrapper = shallow( - + , ); wrapper.instance().showModal(); expect(wrapper.state('showModal')).toEqual(false); @@ -209,7 +209,7 @@ describe('components/MarkdownImage', () => { test('should properly scale down the image in case of a header change system message', () => { const props = {...baseProps, src: 'https://example.com/image.png', postType: 'system_header_change'}; const wrapper = shallow( - + , ); wrapper.instance().setState({loaded: true}); @@ -232,11 +232,11 @@ describe('components/MarkdownImage', () => { src: 'https://example.com/image.png', imageIsLink: false, height: 76, - width: 50 + width: 50, }; const wrapper = shallow( - + , ); wrapper.instance().setState({loaded: true}); diff --git a/components/member_list_channel/index.ts b/components/member_list_channel/index.ts index a7b5d05d0d33..0c24e6b7487f 100644 --- a/components/member_list_channel/index.ts +++ b/components/member_list_channel/index.ts @@ -58,7 +58,7 @@ const getUsersAndActionsToDisplay = createSelector( usersToDisplay: usersToDisplay.sort(sortByUsername), actionUserProps, }; - } + }, ); function mapStateToProps(state: GlobalState) { diff --git a/components/member_list_channel/member_list_channel.tsx b/components/member_list_channel/member_list_channel.tsx index b93973890938..0b14d834e4d9 100644 --- a/components/member_list_channel/member_list_channel.tsx +++ b/components/member_list_channel/member_list_channel.tsx @@ -109,7 +109,7 @@ export default class MemberListChannel extends React.PureComponent } }); }, - Constants.SEARCH_TIMEOUT_MILLISECONDS + Constants.SEARCH_TIMEOUT_MILLISECONDS, ); this.searchTimeoutId = searchTimeoutId; diff --git a/components/member_list_team/member_list_team.tsx b/components/member_list_team/member_list_team.tsx index afab588ce6aa..14a5dd2f6004 100644 --- a/components/member_list_team/member_list_team.tsx +++ b/components/member_list_team/member_list_team.tsx @@ -66,8 +66,8 @@ export default class MemberListTeam extends React.Component { this.props.actions.getTeamMembers(this.props.currentTeamId, 0, Constants.DEFAULT_MAX_USERS_PER_TEAM, { sort: Teams.SORT_USERNAME_OPTION, - exclude_deleted_users: true - } as GetTeamMembersOpts + exclude_deleted_users: true, + } as GetTeamMembersOpts, ), this.props.actions.getTeamStats(this.props.currentTeamId), ]); @@ -111,7 +111,7 @@ export default class MemberListTeam extends React.Component { } }); }, - Constants.SEARCH_TIMEOUT_MILLISECONDS + Constants.SEARCH_TIMEOUT_MILLISECONDS, ); this.searchTimeoutId = searchTimeoutId; @@ -128,8 +128,8 @@ export default class MemberListTeam extends React.Component { await this.props.actions.getTeamMembers(this.props.currentTeamId, page, Constants.DEFAULT_MAX_USERS_PER_TEAM, { sort: Teams.SORT_USERNAME_OPTION, - exclude_deleted_users: true - } as GetTeamMembersOpts + exclude_deleted_users: true, + } as GetTeamMembersOpts, ); this.loadComplete(); } diff --git a/components/message_submit_error.test.tsx b/components/message_submit_error.test.tsx index 80acf5ea4490..5ecde71ae3e6 100644 --- a/components/message_submit_error.test.tsx +++ b/components/message_submit_error.test.tsx @@ -25,7 +25,7 @@ describe('components/MessageSubmitError', () => { }; const wrapper = shallow( - + , ); expect(wrapper.find('[id="message_submit_error.invalidCommand"]').exists()).toBe(true); @@ -46,7 +46,7 @@ describe('components/MessageSubmitError', () => { }; const wrapper = shallow( - + , ); expect(wrapper.find('[id="message_submit_error.invalidCommand"]').exists()).toBe(false); diff --git a/components/modal_controller/modal_controller.test.jsx b/components/modal_controller/modal_controller.test.jsx index e58e1eb44c7a..97571ac1eb87 100644 --- a/components/modal_controller/modal_controller.test.jsx +++ b/components/modal_controller/modal_controller.test.jsx @@ -39,7 +39,7 @@ describe('components/ModalController', () => { const wrapper = mount( - + , ); expect(wrapper).toMatchSnapshot(); @@ -67,7 +67,7 @@ describe('components/ModalController', () => { mount( - + , ); expect(document.getElementsByClassName('modal-dialog').length).toBe(1); diff --git a/components/more_channels/index.js b/components/more_channels/index.js index f5b65791e833..da0d63847cc0 100644 --- a/components/more_channels/index.js +++ b/components/more_channels/index.js @@ -19,12 +19,12 @@ import MoreChannels from './more_channels.jsx'; const getNotArchivedOtherChannels = createSelector( getOtherChannels, - (channels) => channels && channels.filter((c) => c.delete_at === 0) + (channels) => channels && channels.filter((c) => c.delete_at === 0), ); const getArchivedOtherChannels = createSelector( getChannelsInCurrentTeam, - (channels) => channels && channels.filter((c) => c.delete_at !== 0) + (channels) => channels && channels.filter((c) => c.delete_at !== 0), ); function mapStateToProps(state) { diff --git a/components/more_channels/more_channels.jsx b/components/more_channels/more_channels.jsx index 2021043afa75..4c2cf9d9368f 100644 --- a/components/more_channels/more_channels.jsx +++ b/components/more_channels/more_channels.jsx @@ -136,7 +136,7 @@ export default class MoreChannels extends React.Component { this.setState({searchedChannels: [], searching: false}); }); }, - SEARCH_TIMEOUT_MILLISECONDS + SEARCH_TIMEOUT_MILLISECONDS, ); this.searchTimeoutId = searchTimeoutId; diff --git a/components/more_channels/more_channels.test.jsx b/components/more_channels/more_channels.test.jsx index 378e5b9ea1d6..bfef1e3c7d81 100644 --- a/components/more_channels/more_channels.test.jsx +++ b/components/more_channels/more_channels.test.jsx @@ -86,7 +86,7 @@ describe('components/MoreChannels', () => { test('should match snapshot and state', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -104,7 +104,7 @@ describe('components/MoreChannels', () => { test('should match state on handleHide', () => { const wrapper = shallow( - + , ); wrapper.setState({show: true}); wrapper.instance().handleHide(); @@ -114,7 +114,7 @@ describe('components/MoreChannels', () => { test('should call props.onModalDismissed on handleExit', () => { const props = {...baseProps, onModalDismissed: jest.fn()}; const wrapper = shallow( - + , ); wrapper.instance().handleExit(); @@ -124,7 +124,7 @@ describe('components/MoreChannels', () => { test('should match state on onChange', () => { const wrapper = shallow( - + , ); wrapper.setState({searchedChannels: [{id: 'other_channel_id'}]}); wrapper.instance().onChange(); @@ -137,7 +137,7 @@ describe('components/MoreChannels', () => { test('should call props.getChannels on nextPage', () => { const wrapper = shallow( - + , ); const instance = wrapper.instance(); @@ -149,7 +149,7 @@ describe('components/MoreChannels', () => { test('should have loading prop true when searching state is true', () => { const wrapper = shallow( - + , ); wrapper.setState({search: true, searching: true}); @@ -173,7 +173,7 @@ describe('components/MoreChannels', () => { }; const wrapper = shallow( - + , ); const instance = wrapper.instance(); @@ -203,7 +203,7 @@ describe('components/MoreChannels', () => { }; const wrapper = shallow( - + , ); const instance = wrapper.instance(); @@ -221,7 +221,7 @@ describe('components/MoreChannels', () => { test('should not perform a search if term is empty', () => { const wrapper = shallow( - + , ); const instance = wrapper.instance(); @@ -237,7 +237,7 @@ describe('components/MoreChannels', () => { test('should handle a failed search', (done) => { const wrapper = shallow( - + , ); const instance = wrapper.instance(); @@ -266,7 +266,7 @@ describe('components/MoreChannels', () => { test('should perform search and set the correct state', (done) => { const wrapper = shallow( - + , ); const instance = wrapper.instance(); @@ -293,7 +293,7 @@ describe('components/MoreChannels', () => { test('should perform search on archived channels and set the correct state', (done) => { const wrapper = shallow( - + , ); const instance = wrapper.instance(); diff --git a/components/more_direct_channels/group_message_option.test.jsx b/components/more_direct_channels/group_message_option.test.jsx index d570a7122126..79440d0efb8b 100644 --- a/components/more_direct_channels/group_message_option.test.jsx +++ b/components/more_direct_channels/group_message_option.test.jsx @@ -21,7 +21,7 @@ describe('components/more_direct_channels/GroupMessageOption', () => { channel={channel} isSelected={false} onAdd={onAdd} - /> + />, ); } diff --git a/components/more_direct_channels/more_direct_channels.tsx b/components/more_direct_channels/more_direct_channels.tsx index 2b62adb79afc..31f0843e7897 100644 --- a/components/more_direct_channels/more_direct_channels.tsx +++ b/components/more_direct_channels/more_direct_channels.tsx @@ -150,7 +150,7 @@ export default class MoreDirectChannels extends React.Component { this.resetPaging(); this.setUsersLoadingState(false); }, - Constants.SEARCH_TIMEOUT_MILLISECONDS + Constants.SEARCH_TIMEOUT_MILLISECONDS, ); } } diff --git a/components/multiselect/multiselect.test.tsx b/components/multiselect/multiselect.test.tsx index 3bfd5efdeab3..61b4c8a70cfb 100644 --- a/components/multiselect/multiselect.test.tsx +++ b/components/multiselect/multiselect.test.tsx @@ -38,7 +38,7 @@ describe('components/multiselect/multiselect', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -46,7 +46,7 @@ describe('components/multiselect/multiselect', () => { test('should match snapshot for page 2', () => { const wrapper = shallow( - + , ); wrapper.find('.filter-control__next').simulate('click'); @@ -78,7 +78,7 @@ describe('components/multiselect/multiselect', () => { {...baseProps} optionRenderer={renderOption} valueRenderer={renderValue} - /> + />, ); expect(wrapper.find(MultiSelectList).state('selected')).toEqual(-1); diff --git a/components/multiselect/multiselect.tsx b/components/multiselect/multiselect.tsx index e3bf0652782d..fd7305fc2d07 100644 --- a/components/multiselect/multiselect.tsx +++ b/components/multiselect/multiselect.tsx @@ -159,7 +159,7 @@ export default class MultiSelect extends React.Component + {currentTarget: {value: ''}} as React.KeyboardEvent, ); this.onInput(''); this.reactSelectRef.current.focus(); diff --git a/components/needs_team/needs_team.test.tsx b/components/needs_team/needs_team.test.tsx index 284eb1ad0bf3..08d59bd6f072 100644 --- a/components/needs_team/needs_team.test.tsx +++ b/components/needs_team/needs_team.test.tsx @@ -119,7 +119,7 @@ describe('components/needs_team', () => { const props = {...baseProps, actions: newActions, match: existingTeamMatch}; const wrapper: ShallowWrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); fetchMyChannelsAndMembers().then(() => { @@ -134,7 +134,7 @@ describe('components/needs_team', () => { const props = {...baseProps, actions: newActions}; const wrapper: ShallowWrapper = shallow( - + , ); expect(wrapper.state().team).toEqual(null); await wrapper.instance().joinTeam(props); @@ -147,7 +147,7 @@ describe('components/needs_team', () => { const props = {...baseProps, actions: newActions}; const wrapper: ShallowWrapper = shallow( - + , ); expect(wrapper.state().team).toEqual(null); @@ -166,7 +166,7 @@ describe('components/needs_team', () => { const props = {...baseProps, actions: newActions}; const wrapper: ShallowWrapper = shallow( - + , ); expect(wrapper.state().team).toEqual(null); diff --git a/components/needs_team/needs_team.tsx b/components/needs_team/needs_team.tsx index 5d8ce589feea..20fe2ed24b5b 100644 --- a/components/needs_team/needs_team.tsx +++ b/components/needs_team/needs_team.tsx @@ -109,7 +109,7 @@ export default class NeedsTeam extends React.PureComponent { team, finishedFetchingChannels: false, prevTeam: this.props.match.params.team, - teamsList: this.props.teamsList + teamsList: this.props.teamsList, }; if (!team) { @@ -124,7 +124,7 @@ export default class NeedsTeam extends React.PureComponent { teamObj.name === nextProps.match.params.team) : null; return { prevTeam: nextProps.match.params.team, - team: (team || null) + team: (team || null), }; } return {prevTeam: nextProps.match.params.team}; @@ -227,7 +227,7 @@ export default class NeedsTeam extends React.PureComponent { this.setState({ finishedFetchingChannels: true, }); - } + }, ); this.props.actions.loadStatusesForChannelAndSidebar(); diff --git a/components/new_channel_flow/new_channel_flow.test.tsx b/components/new_channel_flow/new_channel_flow.test.tsx index afc9758f9417..dd6b6078014a 100644 --- a/components/new_channel_flow/new_channel_flow.test.tsx +++ b/components/new_channel_flow/new_channel_flow.test.tsx @@ -39,14 +39,14 @@ describe('components/NewChannelFlow', () => { test('should match snapshot, with base props', () => { const wrapper: ShallowWrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); test('should match state when channelDataChanged is called', () => { const wrapper: ShallowWrapper = shallow( - + , ); const data = {displayName: 'name', purpose: 'purpose', header: 'header'}; wrapper.instance().channelDataChanged(data); @@ -58,7 +58,7 @@ describe('components/NewChannelFlow', () => { test('should match state when urlChangeDismissed is called', () => { const wrapper: ShallowWrapper = shallow( - + , ); wrapper.instance().urlChangeDismissed(); @@ -67,7 +67,7 @@ describe('components/NewChannelFlow', () => { test('should match state when urlChangeSubmitted is called', () => { const wrapper: ShallowWrapper = shallow( - + , ); const newUrl = 'example.com'; wrapper.instance().urlChangeSubmitted(newUrl); @@ -80,7 +80,7 @@ describe('components/NewChannelFlow', () => { test('should match state when urlChangeRequested is called', () => { const wrapper: ShallowWrapper = shallow( - + , ); wrapper.instance().urlChangeRequested({preventDefault: jest.fn()} as unknown as React.MouseEvent); @@ -89,7 +89,7 @@ describe('components/NewChannelFlow', () => { test('should match state when typeSwitched is called, with state switched from OPEN_CHANNEL', () => { const wrapper: ShallowWrapper = shallow( - + , ); wrapper.setState({channelType: Constants.OPEN_CHANNEL, serverError: 'server error'}); @@ -105,7 +105,7 @@ describe('components/NewChannelFlow', () => { test('should match state when typeSwitched is called, with state switched from PRIVATE_CHANNEL', () => { const wrapper: ShallowWrapper = shallow( - + , ); wrapper.setState({channelType: Constants.PRIVATE_CHANNEL}); @@ -115,7 +115,7 @@ describe('components/NewChannelFlow', () => { test('should match state when onModalExited is called', () => { const wrapper: ShallowWrapper = shallow( - + , ); wrapper.instance().typeSwitched(Constants.PRIVATE_CHANNEL as ChannelType); @@ -124,7 +124,7 @@ describe('components/NewChannelFlow', () => { test('should match state when onSubmit is called with invalid channelDisplayName', () => { const wrapper: ShallowWrapper = shallow( - + , ); wrapper.instance().onSubmit(); @@ -133,7 +133,7 @@ describe('components/NewChannelFlow', () => { test('should call createChannel when onSubmit is called with valid channelDisplayName and valid channelName', () => { const wrapper: ShallowWrapper = shallow( - + , ); wrapper.setState({ @@ -146,7 +146,7 @@ describe('components/NewChannelFlow', () => { test('call onModalDismissed after successfully creating channel', (done) => { const wrapper: ShallowWrapper = shallow( - + , ); wrapper.instance().channelDataChanged({ @@ -165,7 +165,7 @@ describe('components/NewChannelFlow', () => { test('don\'t call onModalDismissed after failing to create channel', () => { const wrapper: ShallowWrapper = shallow( - + , ); wrapper.instance().channelDataChanged({ @@ -194,7 +194,7 @@ describe('components/NewChannelFlow', () => { test('show URL modal when trying to submit non-Latin display name', () => { const wrapper: ShallowWrapper = shallow( - + , ); wrapper.instance().channelDataChanged({ @@ -212,7 +212,7 @@ describe('components/NewChannelFlow', () => { test('call onModalDismissed after successfully creating channel from URL modal', (done) => { const wrapper: ShallowWrapper = shallow( - + , ); wrapper.instance().channelDataChanged({ @@ -244,7 +244,7 @@ describe('components/NewChannelFlow', () => { show: false, channelType: Constants.OPEN_CHANNEL as ChannelType, canCreatePublicChannel: true, - canCreatePrivateChannel: true + canCreatePrivateChannel: true, }; assert.equal(getChannelTypeFromProps(props), Constants.OPEN_CHANNEL); @@ -274,7 +274,7 @@ describe('components/NewChannelFlow', () => { + />, ); wrapper.setState({ diff --git a/components/new_channel_modal/new_channel_modal.test.jsx b/components/new_channel_modal/new_channel_modal.test.jsx index 7e07daae219c..e1e3b3f377dc 100644 --- a/components/new_channel_modal/new_channel_modal.test.jsx +++ b/components/new_channel_modal/new_channel_modal.test.jsx @@ -32,7 +32,7 @@ describe('components/NewChannelModal', () => { test('should match snapshot, modal not showing', () => { const props = {...baseProps, show: false}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); expect(wrapper.find(Modal).props().show).toEqual(false); @@ -40,7 +40,7 @@ describe('components/NewChannelModal', () => { test('should match snapshot, modal showing', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); expect(wrapper.find(Modal).props().show).toEqual(true); @@ -49,7 +49,7 @@ describe('components/NewChannelModal', () => { test('should match snapshot, display only public channel option', () => { const props = {...baseProps, canCreatePrivateChannel: false}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); expect(wrapper.find(Modal).props().show).toEqual(true); @@ -58,7 +58,7 @@ describe('components/NewChannelModal', () => { test('should match snapshot, display only private channel option', () => { const props = {...baseProps, canCreatePublicChannel: false}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); expect(wrapper.find(Modal).props().show).toEqual(true); @@ -69,14 +69,14 @@ describe('components/NewChannelModal', () => { const props = {...baseProps, channelData: newChannelData, channelType: Constants.PRIVATE_CHANNEL}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); test('should match snapshot, on displayNameError', () => { const wrapper = shallow( - + , ); wrapper.setState({displayNameError: true}); expect(wrapper).toMatchSnapshot(); @@ -85,7 +85,7 @@ describe('components/NewChannelModal', () => { test('should match snapshot, on serverError', () => { const props = {...baseProps, serverError: 'server error'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -125,7 +125,7 @@ describe('components/NewChannelModal', () => { const wrapper = mountWithIntl( - + , ); const modal = wrapper.find(NewChannelModal).instance(); @@ -168,7 +168,7 @@ describe('components/NewChannelModal', () => { const wrapper = mountWithIntl( - + , ); const modal = wrapper.find(NewChannelModal).instance(); modal.handleSubmit({preventDefault: jest.fn()}); @@ -179,7 +179,7 @@ describe('components/NewChannelModal', () => { test('should have called handleSubmit on onEnterKeyDown', () => { const wrapper = shallow( - + , ); wrapper.instance().handleSubmit = jest.fn(); @@ -199,7 +199,7 @@ describe('components/NewChannelModal', () => { + />, ); wrapper.setState({displayNameError: 'an error'}); diff --git a/components/no_results_indicator/no_results_indicator.tsx b/components/no_results_indicator/no_results_indicator.tsx index 6a11d9f6535c..b4c9cd4f2845 100644 --- a/components/no_results_indicator/no_results_indicator.tsx +++ b/components/no_results_indicator/no_results_indicator.tsx @@ -26,7 +26,7 @@ const iconMap: {[key in NoResultsVariant]: string } = { const titleMap: {[key in NoResultsVariant]: MessageDescriptor } = { [NoResultsVariant.ChannelSearch]: { - id: t('no_results.channel_search.title') + id: t('no_results.channel_search.title'), }, // this will be changed soon in the PRs following the other no results indicators @@ -37,7 +37,7 @@ const titleMap: {[key in NoResultsVariant]: MessageDescriptor } = { const subtitleMap: {[key in NoResultsVariant]: MessageDescriptor } = { [NoResultsVariant.ChannelSearch]: { - id: t('no_results.channel_search.subtitle') + id: t('no_results.channel_search.subtitle'), }, // this will be changed soon in the PRs following the other no results indicators @@ -61,7 +61,7 @@ const NoResultsIndicator = (props: Props) => { diff --git a/components/overlay_trigger.test.tsx b/components/overlay_trigger.test.tsx index 87477210c2c1..5947f4b5889d 100644 --- a/components/overlay_trigger.test.tsx +++ b/components/overlay_trigger.test.tsx @@ -47,7 +47,7 @@ describe('OverlayTrigger', () => { - + , ); const overlay = mount(wrapper.find(BaseOverlayTrigger).prop('overlay')); @@ -64,7 +64,7 @@ describe('OverlayTrigger', () => { - + , ); const overlay = mount(wrapper.find(BaseOverlayTrigger).prop('overlay')); @@ -85,7 +85,7 @@ describe('OverlayTrigger', () => { - + , ); expect(ref.current).toBe(wrapper.find(BaseOverlayTrigger).instance()); @@ -110,7 +110,7 @@ describe('OverlayTrigger', () => { - + , ); // Dive into the react-bootstrap internals to find our overlay diff --git a/components/overlay_trigger.tsx b/components/overlay_trigger.tsx index df1a7a9c9282..9b98b73b484a 100644 --- a/components/overlay_trigger.tsx +++ b/components/overlay_trigger.tsx @@ -40,7 +40,7 @@ const OverlayTrigger = React.forwardRef((props: Props, ref?: React.Ref { const wrapper = mountWithIntl( - + , ).children().children(); wrapper.instance().emailInput.current.value = 'test@example.com'; diff --git a/components/pdf_preview.jsx b/components/pdf_preview.jsx index 9f88964e6aea..c83b85e41bf2 100644 --- a/components/pdf_preview.jsx +++ b/components/pdf_preview.jsx @@ -145,7 +145,7 @@ export default class PDFPreview extends React.PureComponent { + />, ); if (i < this.state.numPages - 1 && this.state.numPages > 1) { @@ -153,7 +153,7 @@ export default class PDFPreview extends React.PureComponent {
+ />, ); } } @@ -171,7 +171,7 @@ export default class PDFPreview extends React.PureComponent { id='pdf_preview.max_pages' defaultMessage='Download to read more pages' /> - + , ); } diff --git a/components/pdf_preview.test.jsx b/components/pdf_preview.test.jsx index 3e8c7bbd056c..acf688728d35 100644 --- a/components/pdf_preview.test.jsx +++ b/components/pdf_preview.test.jsx @@ -24,14 +24,14 @@ describe('component/PDFPreview', () => { test('should match snapshot, loading', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); test('should match snapshot, not successful', () => { const wrapper = shallow( - + , ); wrapper.setState({loading: false}); expect(wrapper).toMatchSnapshot(); @@ -39,7 +39,7 @@ describe('component/PDFPreview', () => { test('should return correct state when updateStateFromProps is called', () => { const wrapper = shallow( - + , ); wrapper.instance().updateStateFromProps(requiredProps); @@ -53,7 +53,7 @@ describe('component/PDFPreview', () => { test('should return correct state when onDocumentLoad is called', () => { const wrapper = shallow( - + , ); let pdf = {numPages: 0}; diff --git a/components/permalink_redirector/permalink_redirector.test.jsx b/components/permalink_redirector/permalink_redirector.test.jsx index 1273fbc3531a..2ff95dfaebb7 100644 --- a/components/permalink_redirector/permalink_redirector.test.jsx +++ b/components/permalink_redirector/permalink_redirector.test.jsx @@ -51,7 +51,7 @@ describe('components/PermalinkRedirector', () => { url: 'pl/post_id', }; shallow( - + , ); expect(baseProps.actions.redirect).toHaveBeenCalledWith(props.url, props.params); @@ -64,7 +64,7 @@ describe('components/PermalinkRedirector', () => { url: '/_redirect/integrations', }; shallow( - + , ); expect(baseProps.actions.redirect).toHaveBeenCalledWith(props.url, props.params); @@ -77,7 +77,7 @@ describe('components/PermalinkRedirector', () => { url: '/_redirect/integrations/bots', }; shallow( - + , ); expect(baseProps.actions.redirect).toHaveBeenCalledWith(props.url, props.params); diff --git a/components/permalink_view/permalink_view.test.jsx b/components/permalink_view/permalink_view.test.jsx index cfb40e3845d1..12cd85b9bb69 100644 --- a/components/permalink_view/permalink_view.test.jsx +++ b/components/permalink_view/permalink_view.test.jsx @@ -88,7 +88,7 @@ describe('components/PermalinkView', () => { test('should call baseProps.actions.focusPost on doPermalinkEvent', async () => { const wrapper = shallow( - + , ); expect(baseProps.actions.focusPost).toHaveBeenCalledTimes(1); @@ -101,7 +101,7 @@ describe('components/PermalinkView', () => { test('should call baseProps.actions.focusPost when postid changes', async () => { const wrapper = shallow( - + , ); const newPostid = `${baseProps.match.params.postid}_new`; await wrapper.setProps({...baseProps, match: {params: {postid: newPostid}}}); @@ -114,7 +114,7 @@ describe('components/PermalinkView', () => { const props = {...baseProps, channelIsArchived: true}; const wrapper = shallow( - + , ); wrapper.setState({valid: true}); @@ -129,9 +129,9 @@ describe('components/PermalinkView', () => { profiles: { dmchannel: { id: 'dmchannel', - username: 'otherUser' - } - } + username: 'otherUser', + }, + }, }, channels: { channels: { @@ -148,8 +148,8 @@ describe('components/PermalinkView', () => { id: 'current_team_id', display_name: 'currentteam', name: 'currentteam', - } - } + }, + }, }, }, }; diff --git a/components/permissions_gates/any_team_permission_gate/any_team_permission_gate.test.jsx b/components/permissions_gates/any_team_permission_gate/any_team_permission_gate.test.jsx index afc3fdaf5075..6256bb7d252d 100644 --- a/components/permissions_gates/any_team_permission_gate/any_team_permission_gate.test.jsx +++ b/components/permissions_gates/any_team_permission_gate/any_team_permission_gate.test.jsx @@ -55,7 +55,7 @@ describe('components/permissions_gates', () => {

{'Valid permission (shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -66,7 +66,7 @@ describe('components/permissions_gates', () => {

{'Valid permission (shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -77,7 +77,7 @@ describe('components/permissions_gates', () => {

{'Valid permission (shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -91,7 +91,7 @@ describe('components/permissions_gates', () => { >

{'Valid permission but inverted (not shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -105,7 +105,7 @@ describe('components/permissions_gates', () => { >

{'Invalid permission but inverted (shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -119,7 +119,7 @@ describe('components/permissions_gates', () => { >

{'Valid permission but inverted (not shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -132,7 +132,7 @@ describe('components/permissions_gates', () => { >

{'Invalid permission (not shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -145,7 +145,7 @@ describe('components/permissions_gates', () => { >

{'Valid permission (shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/permissions_gates/channel_permission_gate/channel_permission_gate.test.jsx b/components/permissions_gates/channel_permission_gate/channel_permission_gate.test.jsx index 7b955e1de993..7c81ba239be9 100644 --- a/components/permissions_gates/channel_permission_gate/channel_permission_gate.test.jsx +++ b/components/permissions_gates/channel_permission_gate/channel_permission_gate.test.jsx @@ -54,7 +54,7 @@ describe('components/permissions_gates', () => { >

{'Valid permission (shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -68,7 +68,7 @@ describe('components/permissions_gates', () => { >

{'Valid permission (shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -84,7 +84,7 @@ describe('components/permissions_gates', () => { >

{'Valid permission but inverted (not shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -100,7 +100,7 @@ describe('components/permissions_gates', () => { >

{'Invalid permission but inverted (shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -115,7 +115,7 @@ describe('components/permissions_gates', () => { >

{'Invalid permission (not shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -130,7 +130,7 @@ describe('components/permissions_gates', () => { >

{'Valid permission invalid channel (not shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -145,7 +145,7 @@ describe('components/permissions_gates', () => { >

{'Valid permission (shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -160,7 +160,7 @@ describe('components/permissions_gates', () => { >

{'Valid permission (shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -176,7 +176,7 @@ describe('components/permissions_gates', () => { >

{'Valid permission (shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -192,7 +192,7 @@ describe('components/permissions_gates', () => { >

{'Invalid permission (not shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/permissions_gates/system_permission_gate/system_permission_gate.test.jsx b/components/permissions_gates/system_permission_gate/system_permission_gate.test.jsx index b61850d26a83..0a9e3664efb7 100644 --- a/components/permissions_gates/system_permission_gate/system_permission_gate.test.jsx +++ b/components/permissions_gates/system_permission_gate/system_permission_gate.test.jsx @@ -49,7 +49,7 @@ describe('components/permissions_gates', () => {

{'Valid permission (shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -60,7 +60,7 @@ describe('components/permissions_gates', () => {

{'Valid permission (shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -74,7 +74,7 @@ describe('components/permissions_gates', () => { >

{'Valid permission but inverted (not shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -88,7 +88,7 @@ describe('components/permissions_gates', () => { >

{'Invalid permission but inverted (shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -99,7 +99,7 @@ describe('components/permissions_gates', () => {

{'Invalid permission (not shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/permissions_gates/team_permission_gate/team_permission_gate.test.tsx b/components/permissions_gates/team_permission_gate/team_permission_gate.test.tsx index 3043bda0f473..3467a08db4be 100644 --- a/components/permissions_gates/team_permission_gate/team_permission_gate.test.tsx +++ b/components/permissions_gates/team_permission_gate/team_permission_gate.test.tsx @@ -52,7 +52,7 @@ describe('components/permissions_gates', () => { >

{'Valid permission (shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -66,7 +66,7 @@ describe('components/permissions_gates', () => { >

{'Valid permission (shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -81,7 +81,7 @@ describe('components/permissions_gates', () => { >

{'Valid permission but inverted (not shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -96,7 +96,7 @@ describe('components/permissions_gates', () => { >

{'Invalid permission but inverted (shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -110,7 +110,7 @@ describe('components/permissions_gates', () => { >

{'Invalid permission (not shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -124,7 +124,7 @@ describe('components/permissions_gates', () => { >

{'Valid permission invalid team (not shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); @@ -138,7 +138,7 @@ describe('components/permissions_gates', () => { >

{'Valid permission (shown)'}

- + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/plugin_marketplace/marketplace_item/marketplace_item.js b/components/plugin_marketplace/marketplace_item/marketplace_item.js index cce1853c2cc3..3bfed541255e 100644 --- a/components/plugin_marketplace/marketplace_item/marketplace_item.js +++ b/components/plugin_marketplace/marketplace_item/marketplace_item.js @@ -180,7 +180,7 @@ export const UpdateConfirmationModal = ({show, name, version, installedVersion, defaultMessage={`You currently have ${installedVersion} installed. View the release notes to learn about the changes included in this update.`} values={{installedVersion, releaseNotesUrl}} /> -

+

, ); } else { messages.push( @@ -190,7 +190,7 @@ export const UpdateConfirmationModal = ({show, name, version, installedVersion, defaultMessage={`You currently have ${installedVersion} installed.`} values={{installedVersion}} /> -

+

, ); } @@ -214,7 +214,7 @@ export const UpdateConfirmationModal = ({show, name, version, installedVersion, defaultMessage={`This update may contain breaking changes. Consult the release notes before upgrading.`} values={{releaseNotesUrl}} /> -

+

, ); } else { messages.push( @@ -226,7 +226,7 @@ export const UpdateConfirmationModal = ({show, name, version, installedVersion, id='marketplace_modal.list.update_confirmation.message.warning_major_version' defaultMessage={'This update may contain breaking changes.'} /> -

+

, ); } } @@ -412,7 +412,7 @@ export default class MarketplaceItem extends React.Component { url={label.url} color={label.color} /> - ) + ), ); } diff --git a/components/plugin_marketplace/marketplace_item/marketplace_item.test.js b/components/plugin_marketplace/marketplace_item/marketplace_item.test.js index 32822fc370db..1fe60658d6d9 100644 --- a/components/plugin_marketplace/marketplace_item/marketplace_item.test.js +++ b/components/plugin_marketplace/marketplace_item/marketplace_item.test.js @@ -27,7 +27,7 @@ describe('components/MarketplaceItem', () => { installedVersion: '', }; const wrapper = mount( - + , ); expect(wrapper.isEmptyRender()).toBe(true); @@ -39,7 +39,7 @@ describe('components/MarketplaceItem', () => { installedVersion: baseProps.availableVersion, }; const wrapper = mount( - + , ); expect(wrapper.isEmptyRender()).toBe(true); @@ -51,7 +51,7 @@ describe('components/MarketplaceItem', () => { installedVersion: '0.0.3', }; const wrapper = mount( - + , ); expect(wrapper.isEmptyRender()).toBe(true); @@ -63,7 +63,7 @@ describe('components/MarketplaceItem', () => { isInstalling: true, }; const wrapper = mount( - + , ); expect(wrapper.isEmptyRender()).toBe(true); @@ -77,7 +77,7 @@ describe('components/MarketplaceItem', () => { }; const wrapper = mount( - + , ); expect(wrapper).toMatchSnapshot(); @@ -85,7 +85,7 @@ describe('components/MarketplaceItem', () => { it('should render with release notes url', () => { const wrapper = mount( - + , ); expect(wrapper).toMatchSnapshot(); @@ -111,7 +111,7 @@ describe('components/MarketplaceItem', () => { delete props.installedVersion; const wrapper = shallow( - + , ); expect(wrapper.isEmptyRender()).toBe(true); }); @@ -123,7 +123,7 @@ describe('components/MarketplaceItem', () => { }; const wrapper = shallow( - + , ); expect(wrapper.isEmptyRender()).toBe(true); }); @@ -135,7 +135,7 @@ describe('components/MarketplaceItem', () => { show: false, }; const wrapper = shallow( - + , ); const modal = wrapper.find(ConfirmModal); @@ -150,7 +150,7 @@ describe('components/MarketplaceItem', () => { delete props.releaseNotesUrl; const wrapper = shallow( - + , ); expect(wrapper.find(ConfirmModal)).toMatchSnapshot(); @@ -163,7 +163,7 @@ describe('components/MarketplaceItem', () => { }; const wrapper = shallow( - + , ); expect(wrapper.find(ConfirmModal)).toMatchSnapshot(); }); @@ -176,7 +176,7 @@ describe('components/MarketplaceItem', () => { delete props.releaseNotesUrl; const wrapper = shallow( - + , ); expect(wrapper.find(ConfirmModal)).toMatchSnapshot(); }); @@ -188,7 +188,7 @@ describe('components/MarketplaceItem', () => { }; const wrapper = shallow( - + , ); expect(wrapper.find(ConfirmModal)).toMatchSnapshot(); }); @@ -217,7 +217,7 @@ describe('components/MarketplaceItem', () => { test('should render', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -228,7 +228,7 @@ describe('components/MarketplaceItem', () => { delete props.iconData; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -239,7 +239,7 @@ describe('components/MarketplaceItem', () => { delete props.homepageUrl; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -252,7 +252,7 @@ describe('components/MarketplaceItem', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -265,7 +265,7 @@ describe('components/MarketplaceItem', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -278,7 +278,7 @@ describe('components/MarketplaceItem', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -292,7 +292,7 @@ describe('components/MarketplaceItem', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -305,7 +305,7 @@ describe('components/MarketplaceItem', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -319,12 +319,12 @@ describe('components/MarketplaceItem', () => { name: 'someName', description: 'some description', url: 'http://example.com/info', - } + }, ], }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -342,12 +342,12 @@ describe('components/MarketplaceItem', () => { name: 'someName2', description: 'some description2', url: 'http://example.com/info2', - } + }, ], }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -360,7 +360,7 @@ describe('components/MarketplaceItem', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -374,7 +374,7 @@ describe('components/MarketplaceItem', () => { }; const wrapper = shallow( - + , ); wrapper.instance().onInstall(); @@ -394,7 +394,7 @@ describe('components/MarketplaceItem', () => { }; const wrapper = shallow( - + , ); wrapper.instance().onUpdate(); @@ -414,7 +414,7 @@ describe('components/MarketplaceItem', () => { }; const wrapper = shallow( - + , ); wrapper.instance().onConfigure(); @@ -430,7 +430,7 @@ describe('components/MarketplaceItem', () => { }; const wrapper = shallow( - + , ); wrapper.instance().onInstall(); @@ -446,7 +446,7 @@ describe('components/MarketplaceItem', () => { }; const wrapper = shallow( - + , ); wrapper.instance().onUpdate(); @@ -462,7 +462,7 @@ describe('components/MarketplaceItem', () => { }; const wrapper = shallow( - + , ); wrapper.instance().onConfigure(); diff --git a/components/plugin_marketplace/marketplace_list/marketplace_list.jsx b/components/plugin_marketplace/marketplace_list/marketplace_list.jsx index 5e739a83912c..4ff5d4d8d379 100644 --- a/components/plugin_marketplace/marketplace_list/marketplace_list.jsx +++ b/components/plugin_marketplace/marketplace_list/marketplace_list.jsx @@ -33,13 +33,13 @@ export default class MarketplaceList extends React.PureComponent { nextPage = () => { this.setState((state) => ({ - page: state.page + 1 + page: state.page + 1, })); }; previousPage = () => { this.setState((state) => ({ - page: state.page - 1 + page: state.page - 1, })); }; diff --git a/components/plugin_marketplace/marketplace_list/marketplace_list.test.jsx b/components/plugin_marketplace/marketplace_list/marketplace_list.test.jsx index 168e75ebfa48..ada52ff8a908 100644 --- a/components/plugin_marketplace/marketplace_list/marketplace_list.test.jsx +++ b/components/plugin_marketplace/marketplace_list/marketplace_list.test.jsx @@ -28,9 +28,9 @@ describe('components/marketplace/marketplace_list', () => { samplePlugin, samplePlugin, samplePlugin, samplePlugin, samplePlugin, samplePlugin, samplePlugin, samplePlugin, samplePlugin, samplePlugin, samplePlugin, samplePlugin, samplePlugin, samplePlugin, samplePlugin, - samplePlugin, samplePlugin + samplePlugin, samplePlugin, ]} - /> + />, ); expect(wrapper).toMatchSnapshot(); @@ -47,7 +47,7 @@ describe('components/marketplace/marketplace_list', () => { + />, ); wrapper.setState({page: 10}); diff --git a/components/plugin_marketplace/marketplace_list/navigation_row/navigation_row.test.jsx b/components/plugin_marketplace/marketplace_list/navigation_row/navigation_row.test.jsx index c357878591aa..a6da4e526a09 100644 --- a/components/plugin_marketplace/marketplace_list/navigation_row/navigation_row.test.jsx +++ b/components/plugin_marketplace/marketplace_list/navigation_row/navigation_row.test.jsx @@ -22,7 +22,7 @@ describe('components/marketplace/navigation_row', () => { it('should render only next button', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -37,7 +37,7 @@ describe('components/marketplace/navigation_row', () => { it('should render next and previous buttons', () => { const props = {...baseProps, page: 1}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -53,7 +53,7 @@ describe('components/marketplace/navigation_row', () => { it('should render only previous button', () => { const props = {...baseProps, page: 2}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); expect(wrapper.find('NavigationButton')).toHaveLength(1); @@ -67,7 +67,7 @@ describe('components/marketplace/navigation_row', () => { it('should not render any buttons', () => { const props = {...baseProps, page: 0, total: 15}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); expect(wrapper.find('NavigationButton')).toHaveLength(0); diff --git a/components/plugin_marketplace/marketplace_modal.test.js b/components/plugin_marketplace/marketplace_modal.test.js index dda2a3fdc398..d6a213651dd7 100644 --- a/components/plugin_marketplace/marketplace_modal.test.js +++ b/components/plugin_marketplace/marketplace_modal.test.js @@ -36,21 +36,21 @@ describe('components/marketplace/', () => { describe('AllPlugins', () => { it('should render with no plugins', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); it('should render with one plugin', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); it('should render with plugins', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -59,21 +59,21 @@ describe('components/marketplace/', () => { describe('InstalledPlugins', () => { it('should render with no plugins', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); it('should render with one plugin', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); it('should render with multiple plugins', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -95,7 +95,7 @@ describe('components/marketplace/', () => { test('should render with no plugins installed', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -113,7 +113,7 @@ describe('components/marketplace/', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -133,7 +133,7 @@ describe('components/marketplace/', () => { test('should render with error banner', () => { const wrapper = shallow( - + , ); wrapper.setState({serverError: {message: 'Error test'}}); diff --git a/components/popover_list_members/index.js b/components/popover_list_members/index.js index ec54eee63309..bc261772a180 100644 --- a/components/popover_list_members/index.js +++ b/components/popover_list_members/index.js @@ -22,7 +22,7 @@ const makeSortUsersByStatusAndDisplayName = (doGetProfilesInChannel) => { (state, channelId) => doGetProfilesInChannel(state, channelId, true), getUserStatuses, getTeammateNameDisplaySetting, - (users, statuses, teammateNameDisplay) => sortUsersByStatusAndDisplayName(users, statuses, teammateNameDisplay) + (users, statuses, teammateNameDisplay) => sortUsersByStatusAndDisplayName(users, statuses, teammateNameDisplay), ); }; diff --git a/components/popover_list_members/popover_list_members.jsx b/components/popover_list_members/popover_list_members.jsx index 643dcdfb0a18..6fd237241d88 100644 --- a/components/popover_list_members/popover_list_members.jsx +++ b/components/popover_list_members/popover_list_members.jsx @@ -80,7 +80,7 @@ export default class PopoverListMembers extends React.Component { const modalData = { modalId: ModalIdentifiers.CHANNEL_MEMBERS, dialogProps: this.props, - dialogType: ChannelMembersModal + dialogType: ChannelMembersModal, }; this.props.actions.openModal(modalData); diff --git a/components/popover_list_members/popover_list_members.test.jsx b/components/popover_list_members/popover_list_members.test.jsx index f71a5f0bc308..6eb9f25bb76b 100644 --- a/components/popover_list_members/popover_list_members.test.jsx +++ b/components/popover_list_members/popover_list_members.test.jsx @@ -52,7 +52,7 @@ describe('components/PopoverListMembers', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -61,7 +61,7 @@ describe('components/PopoverListMembers', () => { test('should have called openDirectChannelToUserId when handleShowDirectChannel is called', (done) => { const browserHistory = require('utils/browser_history').browserHistory; //eslint-disable-line global-require const wrapper = shallow( - + , ); wrapper.instance().closePopover = jest.fn(); @@ -80,7 +80,7 @@ describe('components/PopoverListMembers', () => { test('should match state when closePopover is called', () => { const wrapper = shallow( - + , ); wrapper.instance().componentDidUpdate = jest.fn(); @@ -94,7 +94,7 @@ describe('components/PopoverListMembers', () => { const props = {...baseProps, channel: {...channel, delete_at: 1234}}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -104,7 +104,7 @@ describe('components/PopoverListMembers', () => { const props = {...baseProps, channel: {...channel, group_constrained: true}}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/post_deleted_modal.test.tsx b/components/post_deleted_modal.test.tsx index 5729ec93a0f5..91f9377f98fd 100644 --- a/components/post_deleted_modal.test.tsx +++ b/components/post_deleted_modal.test.tsx @@ -16,7 +16,7 @@ describe('components/ChannelInfoModal', () => { + />, ); expect(wrapper).toMatchSnapshot(); @@ -29,7 +29,7 @@ describe('components/ChannelInfoModal', () => { + />, ); expect(wrapper).toMatchSnapshot(); @@ -44,7 +44,7 @@ describe('components/ChannelInfoModal', () => { + />, ); wrapper.find(Modal).first().props().onHide(); @@ -57,7 +57,7 @@ describe('components/ChannelInfoModal', () => { + />, ); const shouldUpdate = wrapper.instance().shouldComponentUpdate!({show: true}, {}, null); expect(shouldUpdate).toBe(true); diff --git a/components/post_markdown/index.js b/components/post_markdown/index.js index 83aeed62e473..1f9c759cf807 100644 --- a/components/post_markdown/index.js +++ b/components/post_markdown/index.js @@ -26,7 +26,7 @@ export function makeGetMentionKeysForPost() { } return mentionKeys; - } + }, ); } diff --git a/components/post_markdown/index.test.js b/components/post_markdown/index.test.js index 140f82070e9d..f524f41c03fd 100644 --- a/components/post_markdown/index.test.js +++ b/components/post_markdown/index.test.js @@ -11,7 +11,7 @@ describe('makeGetMentionKeysForPost', () => { props: { disable_group_highlight: false, mentionHighlightDisabled: false, - } + }, }; const state = { entities: { @@ -49,7 +49,7 @@ describe('makeGetMentionKeysForPost', () => { props: { disable_group_highlight: true, mentionHighlightDisabled: false, - } + }, }; const state = { entities: { @@ -86,7 +86,7 @@ describe('makeGetMentionKeysForPost', () => { props: { disable_group_highlight: false, mentionHighlightDisabled: true, - } + }, }; const state = { entities: { @@ -123,7 +123,7 @@ describe('makeGetMentionKeysForPost', () => { props: { disable_group_highlight: true, mentionHighlightDisabled: true, - } + }, }; const state = { entities: { diff --git a/components/post_markdown/post_markdown.test.jsx b/components/post_markdown/post_markdown.test.jsx index 0bb5f825e1a5..7a9a13bea73c 100644 --- a/components/post_markdown/post_markdown.test.jsx +++ b/components/post_markdown/post_markdown.test.jsx @@ -26,7 +26,7 @@ describe('components/PostMarkdown', () => { test('should render properly with an empty post', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -46,7 +46,7 @@ describe('components/PostMarkdown', () => { }, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -61,7 +61,7 @@ describe('components/PostMarkdown', () => { post: {}, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -78,7 +78,7 @@ describe('components/PostMarkdown', () => { }, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -91,7 +91,7 @@ describe('components/PostMarkdown', () => { }, }; const wrapper = shallow( - + , ); expect(wrapper.find(Markdown).prop('postId')).toEqual(props.post.id); expect(wrapper).toMatchSnapshot(); @@ -116,7 +116,7 @@ describe('components/PostMarkdown', () => { }, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -149,7 +149,7 @@ describe('components/PostMarkdown', () => { ], }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -182,7 +182,7 @@ describe('components/PostMarkdown', () => { ], }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/post_view/combined_system_message/combined_system_message.test.jsx b/components/post_view/combined_system_message/combined_system_message.test.jsx index ac6535dcc8ae..7202554f81c0 100644 --- a/components/post_view/combined_system_message/combined_system_message.test.jsx +++ b/components/post_view/combined_system_message/combined_system_message.test.jsx @@ -51,7 +51,7 @@ describe('components/post_view/CombinedSystemMessage', () => { test('should match snapshot', () => { const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -70,7 +70,7 @@ describe('components/post_view/CombinedSystemMessage', () => { }]; const props = {...baseProps, messageData, allUserIds}; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -81,7 +81,7 @@ describe('components/post_view/CombinedSystemMessage', () => { + />, ); expect(wrapper).toMatchSnapshot(); @@ -100,7 +100,7 @@ describe('components/post_view/CombinedSystemMessage', () => { }]; const props = {...baseProps, messageData, allUserIds, showJoinLeave: false}; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -122,7 +122,7 @@ describe('components/post_view/CombinedSystemMessage', () => { }]; const props = {...baseProps, messageData, allUserIds}; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -139,7 +139,7 @@ describe('components/post_view/CombinedSystemMessage', () => { }; const wrapper = shallowWithIntl( - + , ); wrapper.instance().loadUserProfiles([], []); diff --git a/components/post_view/combined_system_message/last_users.jsx b/components/post_view/combined_system_message/last_users.jsx index 5c009ba6f8f6..b97c19f6ebed 100644 --- a/components/post_view/combined_system_message/last_users.jsx +++ b/components/post_view/combined_system_message/last_users.jsx @@ -106,17 +106,17 @@ class LastUsers extends React.PureComponent { const firstUserMessage = formatMessage( {id: 'last_users_message.first', defaultMessage: '{firstUser} and '}, - {firstUser} + {firstUser}, ); const otherUsersMessage = formatMessage( {id: 'last_users_message.others', defaultMessage: '{numOthers} others '}, - {numOthers: lastIndex} + {numOthers: lastIndex}, ); const actorMessage = formatMessage( {id: typeMessage[postType].id, defaultMessage: typeMessage[postType].defaultMessage}, - {actor} + {actor}, ); return ( diff --git a/components/post_view/combined_system_message/last_users.test.jsx b/components/post_view/combined_system_message/last_users.test.jsx index 52e737e7e984..98e3796c7340 100644 --- a/components/post_view/combined_system_message/last_users.test.jsx +++ b/components/post_view/combined_system_message/last_users.test.jsx @@ -28,7 +28,7 @@ describe('components/post_view/combined_system_message/LastUsers', () => { test('should match snapshot', () => { const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -36,7 +36,7 @@ describe('components/post_view/combined_system_message/LastUsers', () => { test('should match snapshot, expanded', () => { const wrapper = shallowWithIntl( - + , ); wrapper.setState({expand: true}); @@ -45,7 +45,7 @@ describe('components/post_view/combined_system_message/LastUsers', () => { test('should match state on handleOnClick', () => { const wrapper = shallowWithIntl( - + , ); wrapper.setState({expand: false}); diff --git a/components/post_view/commented_on_files_message/commented_on_files_message.test.jsx b/components/post_view/commented_on_files_message/commented_on_files_message.test.jsx index e8bb0ad00c4e..8eb8343d00a7 100644 --- a/components/post_view/commented_on_files_message/commented_on_files_message.test.jsx +++ b/components/post_view/commented_on_files_message/commented_on_files_message.test.jsx @@ -13,7 +13,7 @@ describe('components/CommentedOnFilesMessage', () => { test('Snapshot when no files', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -26,7 +26,7 @@ describe('components/CommentedOnFilesMessage', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -45,7 +45,7 @@ describe('components/CommentedOnFilesMessage', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/post_view/date_separator/date_separator.test.jsx b/components/post_view/date_separator/date_separator.test.jsx index 4e0bdeaf1d62..c879e59005f9 100644 --- a/components/post_view/date_separator/date_separator.test.jsx +++ b/components/post_view/date_separator/date_separator.test.jsx @@ -12,7 +12,7 @@ describe('components/post_view/DateSeparator', () => { const wrapper = mountWithIntl( + />, ); expect(wrapper).toMatchSnapshot(); @@ -25,7 +25,7 @@ describe('components/post_view/DateSeparator', () => { date={new Date('Fri Jan 12 2018 20:15:13 GMT+1200 (+12)')} enableTimezone={false} timeZone={'New Zealand/Auckland'} - /> + />, ); expect(wrapper).toMatchSnapshot(); @@ -38,7 +38,7 @@ describe('components/post_view/DateSeparator', () => { date={new Date('Fri Jan 12 2018 20:15:13 GMT+0000 (+00)')} enableTimezone={true} timeZone={'Australia/Sydney'} - /> + />, ); expect(wrapper).toMatchSnapshot(); diff --git a/components/post_view/message_attachments/action_button/action_button.jsx b/components/post_view/message_attachments/action_button/action_button.jsx index e6b4b2713b97..191a8ca5e69b 100644 --- a/components/post_view/message_attachments/action_button/action_button.jsx +++ b/components/post_view/message_attachments/action_button/action_button.jsx @@ -42,7 +42,7 @@ export default class ActionButton extends React.PureComponent { borderColor: changeOpacity(hexColor, 0.25), backgroundColor: '#ffffff', color: hexColor, - borderWidth: 2 + borderWidth: 2, }; } } diff --git a/components/post_view/message_attachments/message_attachment/message_attachment.jsx b/components/post_view/message_attachments/message_attachment/message_attachment.jsx index bd54ef7b1db6..9a67773fa0b0 100644 --- a/components/post_view/message_attachments/message_attachment/message_attachment.jsx +++ b/components/post_view/message_attachments/message_attachment/message_attachment.jsx @@ -118,7 +118,7 @@ export default class MessageAttachment extends React.PureComponent { postId={this.props.postId} action={action} disabled={action.disabled} - /> + />, ); break; case 'button': @@ -129,7 +129,7 @@ export default class MessageAttachment extends React.PureComponent { action={action} disabled={action.disabled} handleAction={this.handleAction} - /> + />, ); break; } @@ -184,7 +184,7 @@ export default class MessageAttachment extends React.PureComponent { {bodyCols} - + , ); headerCols = []; bodyCols = []; @@ -202,7 +202,7 @@ export default class MessageAttachment extends React.PureComponent { message={field.title} options={markdown} /> - + , ); bodyCols.push( @@ -211,7 +211,7 @@ export default class MessageAttachment extends React.PureComponent { key={'attachment__field-' + i + '__' + nrTables} > - + , ); rowPos += 1; lastWasLong = !(field.short === true); @@ -232,7 +232,7 @@ export default class MessageAttachment extends React.PureComponent { {bodyCols} - + , ); } return ( @@ -276,7 +276,7 @@ export default class MessageAttachment extends React.PureComponent { width='14' /> )} - + , ); } if (attachment.author_name) { @@ -286,7 +286,7 @@ export default class MessageAttachment extends React.PureComponent { key={'attachment__author-name'} > {attachment.author_name} - + , ); } } diff --git a/components/post_view/message_attachments/message_attachment_list.jsx b/components/post_view/message_attachments/message_attachment_list.jsx index 97f1ca70475d..314330504728 100644 --- a/components/post_view/message_attachments/message_attachment_list.jsx +++ b/components/post_view/message_attachments/message_attachment_list.jsx @@ -44,7 +44,7 @@ export default class MessageAttachmentList extends React.PureComponent { key={'att_' + i} options={this.props.options} imagesMetadata={this.props.imagesMetadata} - /> + />, ); }); diff --git a/components/post_view/new_message_separator/new_message_separator.test.jsx b/components/post_view/new_message_separator/new_message_separator.test.jsx index 432871dfab2e..f1907f474e0c 100644 --- a/components/post_view/new_message_separator/new_message_separator.test.jsx +++ b/components/post_view/new_message_separator/new_message_separator.test.jsx @@ -9,7 +9,7 @@ import NewMessageSeparator from './new_message_separator.jsx'; describe('components/post_view/new_message_separator', () => { test('should render new_message_separator', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/post_view/post_add_channel_member/post_add_channel_member.test.jsx b/components/post_view/post_add_channel_member/post_add_channel_member.test.jsx index b3b09374a424..76ff7ec2440f 100644 --- a/components/post_view/post_add_channel_member/post_add_channel_member.test.jsx +++ b/components/post_view/post_add_channel_member/post_add_channel_member.test.jsx @@ -75,7 +75,7 @@ describe('components/post_view/PostAddChannelMember', () => { }; const props = {...requiredProps, actions}; const wrapper = shallow( - + , ); wrapper.find('a').simulate('click'); @@ -97,7 +97,7 @@ describe('components/post_view/PostAddChannelMember', () => { }; const props = {...requiredProps, userIds, usernames, actions}; const wrapper = shallow( - + , ); wrapper.find('a').simulate('click'); diff --git a/components/post_view/post_body/post_body.jsx b/components/post_view/post_body/post_body.jsx index a5ff5bf99e62..9f7d56e1c6a6 100644 --- a/components/post_view/post_body/post_body.jsx +++ b/components/post_view/post_body/post_body.jsx @@ -92,7 +92,7 @@ export default class PostBody extends React.PureComponent { if (post && post.id === post.pending_post_id) { this.setState({sending: true}); } - } + }, ); this.state = {sending: false}; diff --git a/components/post_view/post_info/index.js b/components/post_view/post_info/index.js index 18b2f7bbb94d..9bf1914e11d3 100644 --- a/components/post_view/post_info/index.js +++ b/components/post_view/post_info/index.js @@ -34,7 +34,7 @@ function mapStateToProps(state, ownProps) { enableEmojiPicker, isReadOnly: isCurrentChannelReadOnly(state) || channelIsArchived, shouldShowDotMenu: PostUtils.shouldShowDotMenu(state, ownProps.post, channel), - shortcutReactToLastPostEmittedFrom + shortcutReactToLastPostEmittedFrom, }; } diff --git a/components/post_view/post_info/post_info.jsx b/components/post_view/post_info/post_info.jsx index 1bdb6f51ce12..2d3bd7460a03 100644 --- a/components/post_view/post_info/post_info.jsx +++ b/components/post_view/post_info/post_info.jsx @@ -118,7 +118,7 @@ export default class PostInfo extends React.PureComponent { /** * Function to set or unset emoji picker for last message */ - emitShortcutReactToLastPostFrom: PropTypes.func + emitShortcutReactToLastPostFrom: PropTypes.func, }).isRequired, shouldShowDotMenu: PropTypes.bool.isRequired, @@ -129,7 +129,7 @@ export default class PostInfo extends React.PureComponent { this.state = { showEmojiPicker: false, - showOptionsMenuWithoutHover: false + showOptionsMenuWithoutHover: false, }; this.postHeaderRef = React.createRef(); @@ -140,7 +140,7 @@ export default class PostInfo extends React.PureComponent { this.setState({ showEmojiPicker, - showOptionsMenuWithoutHover: false + showOptionsMenuWithoutHover: false, }); this.props.handleDropdownOpened(showEmojiPicker || this.state.showDotMenu); }; @@ -262,7 +262,7 @@ export default class PostInfo extends React.PureComponent { if (isPostHeaderVisibleToUser && !isEphemeralPost && !isSystemMessage && !isAutoRespondersPost && !isFailedPost && !isDeletedPost && !isReadOnly && !isMobile && enableEmojiPicker) { this.setState({ - showOptionsMenuWithoutHover: true + showOptionsMenuWithoutHover: true, }, () => { this.toggleEmojiPicker(); }); diff --git a/components/post_view/post_info/post_info.test.jsx b/components/post_view/post_info/post_info.test.jsx index de02075fbadc..ed4946b26c64 100644 --- a/components/post_view/post_info/post_info.test.jsx +++ b/components/post_view/post_info/post_info.test.jsx @@ -110,7 +110,7 @@ describe('components/post_view/PostInfo', () => { + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/post_view/post_list/post_list.test.jsx b/components/post_view/post_list/post_list.test.jsx index 322116c2c1bf..e8b73b838438 100644 --- a/components/post_view/post_list/post_list.test.jsx +++ b/components/post_view/post_list/post_list.test.jsx @@ -49,7 +49,7 @@ const baseProps = { describe('components/post_view/post_list', () => { it('snapshot for loading when there are no posts', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -57,7 +57,7 @@ describe('components/post_view/post_list', () => { it('snapshot with couple of posts', () => { const postIds = createFakePosIds(2); const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -66,7 +66,7 @@ describe('components/post_view/post_list', () => { const emptyPostList = []; const wrapper = shallow( - + , ); expect(actionsProp.loadUnreads).toHaveBeenCalledWith(baseProps.channelId); @@ -78,7 +78,7 @@ describe('components/post_view/post_list', () => { it('Should call for before and afterPosts', async () => { const postIds = createFakePosIds(2); const wrapper = shallow( - + , ); wrapper.find(VirtPostList).prop('actions').loadOlderPosts(); @@ -97,7 +97,7 @@ describe('components/post_view/post_list', () => { it('VirtPostList Should have formattedPostIds as prop', async () => { const postIds = createFakePosIds(2); const wrapper = shallow( - + , ); const formattedPostIds = wrapper.find(VirtPostList).prop('postListIds'); @@ -108,7 +108,7 @@ describe('components/post_view/post_list', () => { const postIds = createFakePosIds(10); const formattedPostIds = ['1', '2']; const wrapper = shallow( - + , ); const instance = wrapper.instance(); @@ -119,7 +119,7 @@ describe('components/post_view/post_list', () => { it('Should call for permalink posts', async () => { const focusedPostId = 'new'; const wrapper = shallow( - + , ); expect(actionsProp.loadPostsAround).toHaveBeenCalledWith(baseProps.channelId, focusedPostId); @@ -130,7 +130,7 @@ describe('components/post_view/post_list', () => { it('Should call for loadLatestPosts', async () => { const wrapper = shallow( - + , ); expect(actionsProp.loadLatestPosts).toHaveBeenCalledWith(baseProps.channelId); @@ -214,7 +214,7 @@ describe('components/post_view/post_list', () => { }; const wrapper = shallow( - + , ); wrapper.find(VirtPostList).prop('actions').loadOlderPosts(); @@ -232,7 +232,7 @@ describe('components/post_view/post_list', () => { const emptyPostList = []; const wrapper = shallow( - + , ); await wrapper.instance().postsOnLoad(); @@ -243,7 +243,7 @@ describe('components/post_view/post_list', () => { const emptyPostList = []; const focusedPostId = 'new'; shallow( - + , ); await actionsProp.loadPostsAround(); diff --git a/components/post_view/post_list_row/index.js b/components/post_view/post_list_row/index.js index 771100ea16ac..4596f5b5530b 100644 --- a/components/post_view/post_list_row/index.js +++ b/components/post_view/post_list_row/index.js @@ -15,7 +15,7 @@ function mapStateToProps(state, ownProps) { return { post: ownProps.post, channel: ownProps.channel, - shortcutReactToLastPostEmittedFrom + shortcutReactToLastPostEmittedFrom, }; } diff --git a/components/post_view/post_list_row/post_list_row.jsx b/components/post_view/post_list_row/post_list_row.jsx index 35fce73e1f05..2ac9390e0ae0 100644 --- a/components/post_view/post_list_row/post_list_row.jsx +++ b/components/post_view/post_list_row/post_list_row.jsx @@ -40,7 +40,7 @@ export default class PostListRow extends React.PureComponent { /** * Function to set or unset emoji picker for last message */ - emitShortcutReactToLastPostFrom: PropTypes.func + emitShortcutReactToLastPostFrom: PropTypes.func, }), } @@ -123,7 +123,7 @@ export default class PostListRow extends React.PureComponent { previousPostId: previousListId, shouldHighlight: this.props.shouldHighlight, togglePostMenu: this.props.togglePostMenu, - isLastPost: this.props.isLastPost + isLastPost: this.props.isLastPost, }; if (PostListUtils.isCombinedUserActivityPost(listId)) { diff --git a/components/post_view/post_list_row/post_list_row.test.jsx b/components/post_view/post_list_row/post_list_row.test.jsx index 66c3f3a9b24a..cd5e3a215e70 100644 --- a/components/post_view/post_list_row/post_list_row.test.jsx +++ b/components/post_view/post_list_row/post_list_row.test.jsx @@ -23,7 +23,7 @@ describe('components/post_view/post_list_row', () => { listId, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -36,7 +36,7 @@ describe('components/post_view/post_list_row', () => { loadOlderPosts, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); wrapper.prop('onClick')(); @@ -54,7 +54,7 @@ describe('components/post_view/post_list_row', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); expect(wrapper.find(ChannelIntroMessage).exists()).toBe(true); @@ -66,7 +66,7 @@ describe('components/post_view/post_list_row', () => { listId, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); expect(wrapper.find(NewMessageSeparator).exists()).toBe(true); @@ -78,7 +78,7 @@ describe('components/post_view/post_list_row', () => { listId, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); expect(wrapper.find(DateSeparator).exists()).toBe(true); @@ -91,7 +91,7 @@ describe('components/post_view/post_list_row', () => { previousListId: 'abcd', }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); expect(wrapper.find(CombinedUserActivityPost).exists()).toBe(true); @@ -104,7 +104,7 @@ describe('components/post_view/post_list_row', () => { previousListId: 'abcd', }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); expect(wrapper.find(Post).exists()).toBe(true); diff --git a/components/post_view/post_list_virtualized/post_list_virtualized.jsx b/components/post_view/post_list_virtualized/post_list_virtualized.jsx index 197873e78ae3..a0c7e670a611 100644 --- a/components/post_view/post_list_virtualized/post_list_virtualized.jsx +++ b/components/post_view/post_list_virtualized/post_list_virtualized.jsx @@ -241,7 +241,7 @@ class PostList extends React.PureComponent { getNewMessagesSeparatorIndex = (postListIds) => { return postListIds.findIndex( - (item) => item.indexOf(PostListRowListIds.START_OF_NEW_MESSAGES) === 0 + (item) => item.indexOf(PostListRowListIds.START_OF_NEW_MESSAGES) === 0, ); } @@ -441,7 +441,7 @@ class PostList extends React.PureComponent { initScrollToIndex = () => { if (this.props.focusedPostId) { const index = this.state.postListIds.findIndex( - (item) => item === this.props.focusedPostId + (item) => item === this.props.focusedPostId, ); return { index, diff --git a/components/post_view/post_message_view/index.js b/components/post_view/post_message_view/index.js index 71b7fc8d62c0..f53148144bd2 100644 --- a/components/post_view/post_message_view/index.js +++ b/components/post_view/post_message_view/index.js @@ -17,7 +17,7 @@ function mapStateToProps(state) { isRHSOpen: getIsRhsOpen(state), pluginPostTypes: state.plugins.postTypes, theme: getTheme(state), - currentRelativeTeamUrl: getCurrentRelativeTeamUrl(state) + currentRelativeTeamUrl: getCurrentRelativeTeamUrl(state), }; } diff --git a/components/post_view/reaction/reaction.test.jsx b/components/post_view/reaction/reaction.test.jsx index 38900d161a9f..96a6396546db 100644 --- a/components/post_view/reaction/reaction.test.jsx +++ b/components/post_view/reaction/reaction.test.jsx @@ -35,7 +35,7 @@ describe('components/post_view/Reaction', () => { reactions, currentUserId, profiles, - 'username' + 'username', ), }; @@ -56,7 +56,7 @@ describe('components/post_view/Reaction', () => { newReactions, currentUserId, newProfiles, - 'username' + 'username', ), }; const wrapper = shallow(); @@ -85,7 +85,7 @@ describe('components/post_view/Reaction', () => { reactions, newCurrentUserId, profiles, - 'username' + 'username', ), }; const wrapper = shallow(); diff --git a/components/post_view/reaction_list/reactions_list.test.jsx b/components/post_view/reaction_list/reactions_list.test.jsx index 769bdc795960..6fc2d5499936 100644 --- a/components/post_view/reaction_list/reactions_list.test.jsx +++ b/components/post_view/reaction_list/reactions_list.test.jsx @@ -41,7 +41,7 @@ describe('components/ReactionList', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -49,7 +49,7 @@ describe('components/ReactionList', () => { test('should render when there are reactions', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/post_view/show_more/show_more.test.jsx b/components/post_view/show_more/show_more.test.jsx index d1abed0b4655..f12f62dc7ef1 100644 --- a/components/post_view/show_more/show_more.test.jsx +++ b/components/post_view/show_more/show_more.test.jsx @@ -40,7 +40,7 @@ describe('components/post_view/ShowMore', () => { + />, ); wrapper.setState({isOverflow: true, isCollapsed: true}); expect(wrapper).toMatchSnapshot(); @@ -51,7 +51,7 @@ describe('components/post_view/ShowMore', () => { + />, ); wrapper.setState({isOverflow: true, isCollapsed: false}); expect(wrapper).toMatchSnapshot(); @@ -62,7 +62,7 @@ describe('components/post_view/ShowMore', () => { + />, ); wrapper.setState({isOverflow: true, isCollapsed: false}); expect(wrapper).toMatchSnapshot(); diff --git a/components/profile_picture.test.tsx b/components/profile_picture.test.tsx index acaad37075e5..cce4a966fbb5 100644 --- a/components/profile_picture.test.tsx +++ b/components/profile_picture.test.tsx @@ -16,7 +16,7 @@ describe('components/ProfilePicture', () => { test('should match snapshot, no user specified, default props', () => { const props = baseProps; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -30,7 +30,7 @@ describe('components/ProfilePicture', () => { src: 'http://example.com/emoji.png', }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -44,7 +44,7 @@ describe('components/ProfilePicture', () => { hasMention: true, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -58,7 +58,7 @@ describe('components/ProfilePicture', () => { }, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -75,7 +75,7 @@ describe('components/ProfilePicture', () => { hasMention: true, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/profile_popover/index.js b/components/profile_popover/index.js index 33aa2866b803..22a2e805fc20 100644 --- a/components/profile_popover/index.js +++ b/components/profile_popover/index.js @@ -63,7 +63,7 @@ function mapStateToProps(state, ownProps) { status: getStatusForUserId(state, userId), teamUrl: getCurrentRelativeTeamUrl(state), user: getUser(state, userId), - modals: state.views.modals.modalState + modals: state.views.modals.modalState, }; } diff --git a/components/profile_popover/profile_popover.test.jsx b/components/profile_popover/profile_popover.test.jsx index 2fc927fd81c6..26023ece8142 100644 --- a/components/profile_popover/profile_popover.test.jsx +++ b/components/profile_popover/profile_popover.test.jsx @@ -35,7 +35,7 @@ describe('components/ProfilePopover', () => { const props = {...baseProps}; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -50,14 +50,14 @@ describe('components/ProfilePopover', () => { }; const wrapper = shallowWithIntl( - + , ); expect(wrapper.containsMatchingElement(
{'bot description'} -
+
, )).toEqual(true); }); @@ -66,7 +66,7 @@ describe('components/ProfilePopover', () => { props.isInCurrentTeam = false; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -77,7 +77,7 @@ describe('components/ProfilePopover', () => { const props = {...baseProps, hide, status}; const wrapper = shallowWithIntl( - + , ); const pluggableProps = { diff --git a/components/quick_input.jsx b/components/quick_input.jsx index 94ea0a6f6c14..d3e3282ef27d 100644 --- a/components/quick_input.jsx +++ b/components/quick_input.jsx @@ -133,7 +133,7 @@ export default class QuickInput extends React.PureComponent { ...props, ref: this.setInput, defaultValue: value, // Only set the defaultValue since the real one will be updated using componentDidUpdate - } + }, ); return (
diff --git a/components/quick_input.test.jsx b/components/quick_input.test.jsx index b66823b1dec7..eca9a2a77f3a 100644 --- a/components/quick_input.test.jsx +++ b/components/quick_input.test.jsx @@ -17,7 +17,7 @@ describe('components/QuickInput', () => { ].forEach(([description, props]) => { it(description, () => { const wrapper = mount( - + , ); expect(wrapper.find('.input-clear').exists()).toBe(false); @@ -32,7 +32,7 @@ describe('components/QuickInput', () => { value='mock' clearable={true} onClear={() => {}} - /> + />, ); expect(wrapper.find('.input-clear')).toMatchSnapshot(); @@ -45,7 +45,7 @@ describe('components/QuickInput', () => { clearable={true} clearableTooltipText='Custom' onClear={() => {}} - /> + />, ); expect(wrapper.find('.input-clear')).toMatchSnapshot(); @@ -60,7 +60,7 @@ describe('components/QuickInput', () => { {'Custom'} } onClear={() => {}} - /> + />, ); expect(wrapper.find('.input-clear')).toMatchSnapshot(); @@ -81,7 +81,7 @@ describe('components/QuickInput', () => { clearable={true} onClear={() => {}} inputComponent={MockComp} - /> + />, ); wrapper.setProps({onClear: () => wrapper.setProps({value: ''})}); diff --git a/components/quick_switch_modal/quick_switch_modal.test.jsx b/components/quick_switch_modal/quick_switch_modal.test.jsx index a181fe1afd83..cfb4c055e062 100644 --- a/components/quick_switch_modal/quick_switch_modal.test.jsx +++ b/components/quick_switch_modal/quick_switch_modal.test.jsx @@ -25,7 +25,7 @@ describe('components/QuickSwitchModal', () => { it('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -36,7 +36,7 @@ describe('components/QuickSwitchModal', () => { const props = {...baseProps}; const wrapper = shallow( - + , ); wrapper.instance().handleSubmit(); @@ -46,7 +46,7 @@ describe('components/QuickSwitchModal', () => { it('should fail to switch to a channel', (done) => { const wrapper = shallow( - + , ); const channel = {id: 'channel_id', userId: 'user_id', type: Constants.DM_CHANNEL}; @@ -71,7 +71,7 @@ describe('components/QuickSwitchModal', () => { }; const wrapper = shallow( - + , ); const channel = {id: 'channel_id', userId: 'user_id', type: Constants.DM_CHANNEL}; @@ -96,7 +96,7 @@ describe('components/QuickSwitchModal', () => { }; const wrapper = shallow( - + , ); const channel = {id: 'channel_id', name: 'test', type: Constants.OPEN_CHANNEL}; @@ -125,7 +125,7 @@ describe('components/QuickSwitchModal', () => { }; const wrapper = shallow( - + , ); const channel = {id: 'channel_id', name: 'test', type: Constants.DM_CHANNEL}; diff --git a/components/recent_date.tsx b/components/recent_date.tsx index 70bcc7df38ca..72b28712ebc8 100644 --- a/components/recent_date.tsx +++ b/components/recent_date.tsx @@ -42,7 +42,7 @@ class RecentDate extends React.PureComponent { weekday: 'short', month: 'short', day: '2-digit', - year: 'numeric' + year: 'numeric', }; const formattedDate = this.props.intl.formatDate(value, options); diff --git a/components/removed_from_channel_modal/removed_from_channel_modal.test.tsx b/components/removed_from_channel_modal/removed_from_channel_modal.test.tsx index 09eb1c8e842e..2465d6ac4ae3 100644 --- a/components/removed_from_channel_modal/removed_from_channel_modal.test.tsx +++ b/components/removed_from_channel_modal/removed_from_channel_modal.test.tsx @@ -19,7 +19,7 @@ describe('components/RemoveFromChannelModal', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -27,7 +27,7 @@ describe('components/RemoveFromChannelModal', () => { test('should have state "show" equals true on mount', () => { const wrapper = shallow( - + , ); expect(wrapper.state('show')).toBe(true); @@ -35,7 +35,7 @@ describe('components/RemoveFromChannelModal', () => { test('should display correct props on Modal.Title and Modal.Body', () => { const wrapper = mountWithIntl( - + , ); expect(wrapper.find('.modal-title').text()).toBe('Removed from test-channel'); @@ -47,7 +47,7 @@ describe('components/RemoveFromChannelModal', () => { baseProps.remover = ''; const wrapper = mountWithIntl( - + , ); expect(wrapper.find('.modal-title').text()).toBe('Removed from the channel'); diff --git a/components/rename_channel_modal/index.js b/components/rename_channel_modal/index.js index 77b605223f04..dee3f5c0b009 100644 --- a/components/rename_channel_modal/index.js +++ b/components/rename_channel_modal/index.js @@ -21,7 +21,7 @@ const mapStateToProps = createSelector( team, }; }, - (teamInfo) => ({...teamInfo}) + (teamInfo) => ({...teamInfo}), ); function mapDispatchToProps(dispatch) { diff --git a/components/rename_channel_modal/rename_channel_modal.test.jsx b/components/rename_channel_modal/rename_channel_modal.test.jsx index 8efe46a0eb13..049ce9994f99 100644 --- a/components/rename_channel_modal/rename_channel_modal.test.jsx +++ b/components/rename_channel_modal/rename_channel_modal.test.jsx @@ -30,7 +30,7 @@ describe('components/RenameChannelModal', () => { test('should match snapshot', () => { const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -40,11 +40,11 @@ describe('components/RenameChannelModal', () => { const {actions: {patchChannel}} = baseProps; const props = {...baseProps, requestStatus: RequestStatus.STARTED}; const wrapper = shallowWithIntl( - + , ); wrapper.find('#display_name').simulate( - 'change', {preventDefault: jest.fn(), target: {value: 'valid name'}} + 'change', {preventDefault: jest.fn(), target: {value: 'valid name'}}, ); wrapper.find('#save-button').simulate('click'); @@ -66,7 +66,7 @@ describe('components/RenameChannelModal', () => { it(testCaseProps.name, () => { const {actions: {patchChannel}} = baseProps; const wrapper = shallowWithIntl( - + , ); wrapper.setState({channelName: testCaseProps.value}); @@ -84,11 +84,11 @@ describe('components/RenameChannelModal', () => { test('should not call patchChannel as channel.name.length > Constants.MAX_CHANNELNAME_LENGTH (64)', () => { const {actions: {patchChannel}} = baseProps; const wrapper = shallowWithIntl( - + , ); wrapper.find('#display_name').simulate( - 'change', {preventDefault: jest.fn(), target: {value: 'string-above-sixtyfour-characters-to-test-the-channel-maxlength-limit-properly-in-the-component'}} + 'change', {preventDefault: jest.fn(), target: {value: 'string-above-sixtyfour-characters-to-test-the-channel-maxlength-limit-properly-in-the-component'}}, ); wrapper.find('#save-button').simulate('click'); @@ -98,11 +98,11 @@ describe('components/RenameChannelModal', () => { test('should change state when display_name is edited', () => { const wrapper = shallowWithIntl( - + , ); wrapper.find('#display_name').simulate( - 'change', {preventDefault: jest.fn(), target: {value: 'New Fake Channel'}} + 'change', {preventDefault: jest.fn(), target: {value: 'New Fake Channel'}}, ); expect(wrapper.state('displayName')).toBe('New Fake Channel'); @@ -110,7 +110,7 @@ describe('components/RenameChannelModal', () => { test('should call setError function', () => { const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); @@ -122,7 +122,7 @@ describe('components/RenameChannelModal', () => { test('should call unsetError function', () => { const props = {...baseProps, serverError: {message: 'This is an error message'}}; const wrapper = shallowWithIntl( - + , ); wrapper.setState({serverError: props.serverError.message}); @@ -141,7 +141,7 @@ describe('components/RenameChannelModal', () => { + />, ); wrapper.setState({displayName: 'Changed Name', channelName: 'changed-name'}); @@ -168,7 +168,7 @@ describe('components/RenameChannelModal', () => { test('should call handleCancel', () => { const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); @@ -179,7 +179,7 @@ describe('components/RenameChannelModal', () => { test('should call handleHide function', () => { const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); @@ -191,7 +191,7 @@ describe('components/RenameChannelModal', () => { test('should call onNameChange function', () => { const changedName = {target: {value: 'changed-name'}}; const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); diff --git a/components/reset_status_modal/reset_status_modal.jsx b/components/reset_status_modal/reset_status_modal.jsx index 08647868fc6d..4e63e1925134 100644 --- a/components/reset_status_modal/reset_status_modal.jsx +++ b/components/reset_status_modal/reset_status_modal.jsx @@ -72,7 +72,7 @@ export default class ResetStatusModal extends React.PureComponent { currentUserStatus: status, // Set in state until status refactor where we store 'manual' field in redux show: Boolean(status.status === UserStatuses.OUT_OF_OFFICE || (statusIsManual && autoResetPrefNotSet)), }); - } + }, ); } diff --git a/components/reset_status_modal/reset_status_modal.test.jsx b/components/reset_status_modal/reset_status_modal.test.jsx index ade141b25300..147fa0fd28b1 100644 --- a/components/reset_status_modal/reset_status_modal.test.jsx +++ b/components/reset_status_modal/reset_status_modal.test.jsx @@ -12,7 +12,7 @@ describe('components/ResetStatusModal', () => { return new Promise((resolve) => { process.nextTick(() => resolve({status: 'away'})); }); - } + }, ); const baseProps = { autoResetPref: '', @@ -25,7 +25,7 @@ describe('components/ResetStatusModal', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -42,7 +42,7 @@ describe('components/ResetStatusModal', () => { }, }; const wrapper = shallow( - + , ); const currentUserStatus = { status: 'away', @@ -74,7 +74,7 @@ describe('components/ResetStatusModal', () => { expect(newSavePreferences).toHaveBeenCalledTimes(1); expect(newSavePreferences).toHaveBeenCalledWith( 'user_id_1', - [{category: 'auto_reset_manual_status', name: 'user_id_1', user_id: 'user_id_1', value: 'true'}] + [{category: 'auto_reset_manual_status', name: 'user_id_1', user_id: 'user_id_1', value: 'true'}], ); }); @@ -89,7 +89,7 @@ describe('components/ResetStatusModal', () => { }, }; const wrapper = shallow( - + , ); const currentUserStatus = { status: 'away', @@ -113,14 +113,14 @@ describe('components/ResetStatusModal', () => { expect(newSavePreferences).toHaveBeenCalledTimes(1); expect(newSavePreferences).toHaveBeenCalledWith( 'user_id_1', - [{category: 'auto_reset_manual_status', name: 'user_id_1', user_id: 'user_id_1', value: 'false'}] + [{category: 'auto_reset_manual_status', name: 'user_id_1', user_id: 'user_id_1', value: 'false'}], ); }); test('should match snapshot, render modal for OOF status', () => { const props = {...baseProps, currentUserStatus: 'ooo'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/rhs_comment/index.js b/components/rhs_comment/index.js index ba04a407fa2e..e97f10e59279 100644 --- a/components/rhs_comment/index.js +++ b/components/rhs_comment/index.js @@ -79,7 +79,7 @@ function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ markPostAsUnread, - emitShortcutReactToLastPostFrom + emitShortcutReactToLastPostFrom, }, dispatch), }; } diff --git a/components/rhs_comment/rhs_comment.jsx b/components/rhs_comment/rhs_comment.jsx index acec9902f0ac..259fa95481d3 100644 --- a/components/rhs_comment/rhs_comment.jsx +++ b/components/rhs_comment/rhs_comment.jsx @@ -9,7 +9,7 @@ import {Posts} from 'mattermost-redux/constants/index'; import { isPostEphemeral, isPostPendingOrFailed, - isMeMessage as checkIsMeMessage + isMeMessage as checkIsMeMessage, } from 'mattermost-redux/utils/post_utils'; import Constants, {Locations, A11yCustomEventTypes} from 'utils/constants'; @@ -71,7 +71,7 @@ class RhsComment extends React.PureComponent { /** * Function to set or unset emoji picker for last message */ - emitShortcutReactToLastPostFrom: PropTypes.func + emitShortcutReactToLastPostFrom: PropTypes.func, }), emojiMap: PropTypes.object.isRequired, }; diff --git a/components/rhs_comment/rhs_comment.test.jsx b/components/rhs_comment/rhs_comment.test.jsx index 1f51a078ba8e..cb92f261e151 100644 --- a/components/rhs_comment/rhs_comment.test.jsx +++ b/components/rhs_comment/rhs_comment.test.jsx @@ -63,12 +63,12 @@ describe('components/RhsComment', () => { actions: { markPostAsUnread: jest.fn(), }, - emojiMap: new EmojiMap(new Map()) + emojiMap: new EmojiMap(new Map()), }; test('should match snapshot', () => { const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -76,7 +76,7 @@ describe('components/RhsComment', () => { test('should match snapshot hovered', () => { const wrapper = shallowWithIntl( - + , ); wrapper.setState({hover: true}); @@ -87,7 +87,7 @@ describe('components/RhsComment', () => { test('should match snapshot mobile', () => { isMobile.mockImplementation(() => true); const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -102,7 +102,7 @@ describe('components/RhsComment', () => { }, }; const wrapper = shallowWithIntl( - + , ); wrapper.setState({hover: true}); @@ -111,7 +111,7 @@ describe('components/RhsComment', () => { test('should show pointer when alt is held down', () => { const wrapper = shallowWithIntl( - + , ); expect(wrapper.find('.post.cursor--pointer').exists()).toBe(false); @@ -124,11 +124,11 @@ describe('components/RhsComment', () => { test('should not show pointer when alt is held down, but channel is archived', () => { const props = { ...baseProps, - channelIsArchived: true + channelIsArchived: true, }; const wrapper = shallowWithIntl( - + , ); expect(wrapper.find('.post.cursor--pointer').exists()).toBe(false); @@ -140,7 +140,7 @@ describe('components/RhsComment', () => { test('should call markPostAsUnread when post is alt+clicked on', () => { const wrapper = shallowWithIntl( - + , ); wrapper.simulate('click', {altKey: false}); @@ -155,11 +155,11 @@ describe('components/RhsComment', () => { test('should not call markPostAsUnread when post is alt+clicked on when channel is archived', () => { const props = { ...baseProps, - channelIsArchived: true + channelIsArchived: true, }; const wrapper = shallowWithIntl( - + , ); wrapper.simulate('click', {altKey: false}); diff --git a/components/rhs_header_post/rhs_header_post.jsx b/components/rhs_header_post/rhs_header_post.jsx index f17eb1662779..74f7cbbee96d 100644 --- a/components/rhs_header_post/rhs_header_post.jsx +++ b/components/rhs_header_post/rhs_header_post.jsx @@ -17,7 +17,7 @@ export default class RhsHeaderPost extends React.Component { rootPostId: PropTypes.string.isRequired, channel: PropTypes.object.isRequired, previousRhsState: PropTypes.oneOf( - Object.values(RHSStates) + Object.values(RHSStates), ), relativeTeamUrl: PropTypes.string.isRequired, actions: PropTypes.shape({ diff --git a/components/rhs_root_post/index.js b/components/rhs_root_post/index.js index 670eb0201b70..34d1888ea076 100644 --- a/components/rhs_root_post/index.js +++ b/components/rhs_root_post/index.js @@ -54,7 +54,7 @@ function mapDispatchToProps(dispatch) { return { actions: bindActionCreators({ markPostAsUnread, - emitShortcutReactToLastPostFrom + emitShortcutReactToLastPostFrom, }, dispatch), }; } diff --git a/components/rhs_root_post/rhs_root_post.jsx b/components/rhs_root_post/rhs_root_post.jsx index d43d1427fa5f..390c20cfb819 100644 --- a/components/rhs_root_post/rhs_root_post.jsx +++ b/components/rhs_root_post/rhs_root_post.jsx @@ -63,7 +63,7 @@ class RhsRootPost extends React.PureComponent { /** * Function to set or unset emoji picker for last message */ - emitShortcutReactToLastPostFrom: PropTypes.func + emitShortcutReactToLastPostFrom: PropTypes.func, }), emojiMap: PropTypes.object.isRequired, }; diff --git a/components/rhs_root_post/rhs_root_post.test.jsx b/components/rhs_root_post/rhs_root_post.test.jsx index 5de7b77cf93b..e883198c6d9b 100644 --- a/components/rhs_root_post/rhs_root_post.test.jsx +++ b/components/rhs_root_post/rhs_root_post.test.jsx @@ -58,12 +58,12 @@ describe('components/RhsRootPost', () => { actions: { markPostAsUnread: jest.fn(), }, - emojiMap: new EmojiMap(new Map()) + emojiMap: new EmojiMap(new Map()), }; test('should match snapshot', () => { const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -75,7 +75,7 @@ describe('components/RhsRootPost', () => { isFlagged: true, }; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -90,7 +90,7 @@ describe('components/RhsRootPost', () => { }, }; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -106,7 +106,7 @@ describe('components/RhsRootPost', () => { }, }; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -114,7 +114,7 @@ describe('components/RhsRootPost', () => { test('should show pointer when alt is held down', () => { const wrapper = shallowWithIntl( - + , ); expect(wrapper.find('.post.cursor--pointer').exists()).toBe(false); @@ -131,7 +131,7 @@ describe('components/RhsRootPost', () => { }; const wrapper = shallowWithIntl( - + , ); expect(wrapper.find('.post.cursor--pointer').exists()).toBe(false); @@ -143,7 +143,7 @@ describe('components/RhsRootPost', () => { test('should call markPostAsUnread when post is alt+clicked on', () => { const wrapper = shallowWithIntl( - + , ); wrapper.simulate('click', {altKey: false}); @@ -158,11 +158,11 @@ describe('components/RhsRootPost', () => { test('should not call markPostAsUnread when post is alt+clicked on when channel is archived', () => { const props = { ...baseProps, - channelIsArchived: true + channelIsArchived: true, }; const wrapper = shallowWithIntl( - + , ); wrapper.simulate('click', {altKey: false}); diff --git a/components/rhs_thread/rhs_thread.test.tsx b/components/rhs_thread/rhs_thread.test.tsx index d32f3cb43590..6eeb3fb5fa8a 100644 --- a/components/rhs_thread/rhs_thread.test.tsx +++ b/components/rhs_thread/rhs_thread.test.tsx @@ -22,7 +22,7 @@ describe('components/RhsThread', () => { emojis: [], files: [], images: {}, - reactions: [] + reactions: [], }, channel_id: 'channel_id', create_at: 1502715365009, @@ -58,7 +58,7 @@ describe('components/RhsThread', () => { teammate_id: '', status: '', fake: false, - group_constrained: false + group_constrained: false, }; const actions = { @@ -115,7 +115,7 @@ describe('components/RhsThread', () => { previewEnabled: true, socketConnectionStatus: true, actions, - directTeammate + directTeammate, }; test('should match snapshot', () => { diff --git a/components/rhs_thread/rhs_thread.tsx b/components/rhs_thread/rhs_thread.tsx index 0894b32a216c..06ca688164de 100644 --- a/components/rhs_thread/rhs_thread.tsx +++ b/components/rhs_thread/rhs_thread.tsx @@ -316,7 +316,7 @@ export default class RhsThread extends React.Component { handleCardClick={this.handleCardClickPost} a11yIndex={a11yIndex++} isLastPost={comPost.id === lastRhsCommentPost.id} - /> + />, ); } diff --git a/components/root/root.jsx b/components/root/root.jsx index 1d384d023926..81b03e433d00 100644 --- a/components/root/root.jsx +++ b/components/root/root.jsx @@ -251,9 +251,9 @@ export default class Root extends React.Component { }, { context: { - ip: '0.0.0.0' + ip: '0.0.0.0', }, - anonymousId: '00000000000000000000000000' + anonymousId: '00000000000000000000000000', }); } } diff --git a/components/save_button.test.tsx b/components/save_button.test.tsx index 011a813922be..557109aeab35 100644 --- a/components/save_button.test.tsx +++ b/components/save_button.test.tsx @@ -13,7 +13,7 @@ describe('components/SaveButton', () => { test('should match snapshot, on defaultMessage', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -26,7 +26,7 @@ describe('components/SaveButton', () => { test('should match snapshot, on savingMessage', () => { const props = {...baseProps, saving: true, disabled: true}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -39,7 +39,7 @@ describe('components/SaveButton', () => { test('should match snapshot, extraClasses', () => { const props = {...baseProps, extraClasses: 'some-class'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/search_bar/search_bar.test.jsx b/components/search_bar/search_bar.test.jsx index 639da2fdc135..68b57c7b4395 100644 --- a/components/search_bar/search_bar.test.jsx +++ b/components/search_bar/search_bar.test.jsx @@ -35,14 +35,14 @@ describe('components/search_bar/SearchBar', () => { it('should match snapshot without search', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); it('should match snapshot without search on focus', () => { const wrapper = shallow( - + , ); wrapper.setState({focused: true}); expect(wrapper).toMatchSnapshot(); @@ -53,7 +53,7 @@ describe('components/search_bar/SearchBar', () => { utils.isMobile.mockReturnValue(true); const wrapper = shallow( - + , ); wrapper.setState({focused: true}); expect(wrapper).toMatchSnapshot(); @@ -67,7 +67,7 @@ describe('components/search_bar/SearchBar', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/search_hint/data_retention_hint.test.jsx b/components/search_hint/data_retention_hint.test.jsx index e206907b2380..9dcff440aad2 100644 --- a/components/search_hint/data_retention_hint.test.jsx +++ b/components/search_hint/data_retention_hint.test.jsx @@ -9,7 +9,7 @@ import DataRetentionHint from 'components/search_hint/data_retention_hint'; describe('components/DataRetentionHint', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/search_hint/flag_post_search_hint.test.jsx b/components/search_hint/flag_post_search_hint.test.jsx index 81f247804957..70af41526719 100644 --- a/components/search_hint/flag_post_search_hint.test.jsx +++ b/components/search_hint/flag_post_search_hint.test.jsx @@ -12,14 +12,14 @@ describe('components/FlagPostSearchHint', () => { + />, ); expect(wrapper).toMatchSnapshot(); }); test('should match snapshot, without data retention', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/search_hint/no_result_search_hint.test.jsx b/components/search_hint/no_result_search_hint.test.jsx index a886f005448f..6f8765d8ca44 100644 --- a/components/search_hint/no_result_search_hint.test.jsx +++ b/components/search_hint/no_result_search_hint.test.jsx @@ -12,14 +12,14 @@ describe('components/NoResultSearchHint', () => { + />, ); expect(wrapper).toMatchSnapshot(); }); test('should match snapshot, without data retention', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/search_hint/pin_post_search_hint.test.jsx b/components/search_hint/pin_post_search_hint.test.jsx index 14e1d3198104..c677950f2087 100644 --- a/components/search_hint/pin_post_search_hint.test.jsx +++ b/components/search_hint/pin_post_search_hint.test.jsx @@ -12,14 +12,14 @@ describe('components/PinPostSearchHint', () => { + />, ); expect(wrapper).toMatchSnapshot(); }); test('should match snapshot, without data retention', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/search_hint/search_hint.test.tsx b/components/search_hint/search_hint.test.tsx index 67a27e17f5d9..7655f7b66ab7 100644 --- a/components/search_hint/search_hint.test.tsx +++ b/components/search_hint/search_hint.test.tsx @@ -21,14 +21,14 @@ describe('components/SearchHint', () => { withTitle: true, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); test('should match snapshot, without title', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/search_results_item/search_results_item.test.jsx b/components/search_results_item/search_results_item.test.jsx index c59aea83dcc7..5ea120ffd3f4 100644 --- a/components/search_results_item/search_results_item.test.jsx +++ b/components/search_results_item/search_results_item.test.jsx @@ -86,7 +86,7 @@ describe('components/SearchResultsItem', () => { test('should match snapshot for channel', () => { const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -108,7 +108,7 @@ describe('components/SearchResultsItem', () => { }; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -129,7 +129,7 @@ describe('components/SearchResultsItem', () => { }; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -145,7 +145,7 @@ describe('components/SearchResultsItem', () => { }; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -153,7 +153,7 @@ describe('components/SearchResultsItem', () => { test('Check for dotmenu dropdownOpened state', () => { const wrapper = shallowWithIntl( - + , ); const instance = wrapper.instance(); @@ -174,7 +174,7 @@ describe('components/SearchResultsItem', () => { }; const wrapper = shallowWithIntl( - + , ); wrapper.find('CommentIcon').prop('handleCommentClick')({preventDefault: jest.fn()}); @@ -193,7 +193,7 @@ describe('components/SearchResultsItem', () => { }; const wrapper = shallowWithIntl( - + , ); wrapper.find('.search-item__jump').simulate('click', {preventDefault: jest.fn()}); @@ -209,7 +209,7 @@ describe('components/SearchResultsItem', () => { }; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/searchable_channel_list.jsx b/components/searchable_channel_list.jsx index 7662fd706feb..35aa93f8f08d 100644 --- a/components/searchable_channel_list.jsx +++ b/components/searchable_channel_list.jsx @@ -53,7 +53,7 @@ export default class SearchableChannelList extends React.Component { channel, () => { this.setState({joiningChannel: ''}); - } + }, ); } diff --git a/components/searchable_channel_list.test.jsx b/components/searchable_channel_list.test.jsx index d3b4ea47e531..9ba5ddd4f803 100644 --- a/components/searchable_channel_list.test.jsx +++ b/components/searchable_channel_list.test.jsx @@ -22,14 +22,14 @@ describe('components/SearchableChannelList', () => { test('should match init snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); test('should set page to 0 when starting search', () => { const wrapper = shallow( - + , ); wrapper.setState({page: 10}); diff --git a/components/setting_item_max.test.jsx b/components/setting_item_max.test.jsx index 0a1955b009b2..db6c50cf6f58 100644 --- a/components/setting_item_max.test.jsx +++ b/components/setting_item_max.test.jsx @@ -24,7 +24,7 @@ describe('components/SettingItemMax', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -33,7 +33,7 @@ describe('components/SettingItemMax', () => { test('should match snapshot, without submit', () => { const props = {...baseProps, submit: null}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -42,7 +42,7 @@ describe('components/SettingItemMax', () => { test('should match snapshot, on clientError', () => { const props = {...baseProps, clientError: 'clientError'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -51,7 +51,7 @@ describe('components/SettingItemMax', () => { test('should match snapshot, on serverError', () => { const props = {...baseProps, serverError: 'serverError'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -61,7 +61,7 @@ describe('components/SettingItemMax', () => { const updateSection = jest.fn(); const props = {...baseProps, updateSection}; const wrapper = shallow( - + , ); wrapper.instance().handleUpdateSection({preventDefault: jest.fn()}); @@ -73,7 +73,7 @@ describe('components/SettingItemMax', () => { const updateSection = jest.fn(); const props = {...baseProps, updateSection, section: ''}; const wrapper = shallow( - + , ); wrapper.instance().handleUpdateSection({preventDefault: jest.fn()}); @@ -85,7 +85,7 @@ describe('components/SettingItemMax', () => { const submit = jest.fn(); const props = {...baseProps, submit}; const wrapper = shallow( - + , ); wrapper.instance().handleSubmit({preventDefault: jest.fn()}); @@ -97,7 +97,7 @@ describe('components/SettingItemMax', () => { const submit = jest.fn(); const props = {...baseProps, submit, setting: ''}; const wrapper = shallow( - + , ); wrapper.instance().handleSubmit({preventDefault: jest.fn()}); @@ -109,7 +109,7 @@ describe('components/SettingItemMax', () => { const submit = jest.fn(); const props = {...baseProps, submit}; const wrapper = shallow( - + , ); const instance = wrapper.instance(); @@ -125,7 +125,7 @@ describe('components/SettingItemMax', () => { test('should match snapshot, with new saveTextButton', () => { const props = {...baseProps, saveButtonText: 'CustomText'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/setting_item_min/setting_item_min.test.tsx b/components/setting_item_min/setting_item_min.test.tsx index 2f7942166130..ad9a56b14890 100644 --- a/components/setting_item_min/setting_item_min.test.tsx +++ b/components/setting_item_min/setting_item_min.test.tsx @@ -20,7 +20,7 @@ describe('components/SettingItemMin', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -29,7 +29,7 @@ describe('components/SettingItemMin', () => { test('should match snapshot, on disableOpen to true', () => { const props = {...baseProps, disableOpen: true}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -39,7 +39,7 @@ describe('components/SettingItemMin', () => { const updateSection = jest.fn(); const props = {...baseProps, updateSection}; const wrapper = shallow( - + , ); wrapper.instance().handleUpdateSection({preventDefault: jest.fn()} as any); @@ -51,7 +51,7 @@ describe('components/SettingItemMin', () => { const updateSection = jest.fn(); const props = {...baseProps, updateSection, section: ''}; const wrapper = shallow( - + , ); wrapper.instance().handleUpdateSection({preventDefault: jest.fn()} as any); diff --git a/components/setting_picture.test.jsx b/components/setting_picture.test.jsx index 0e8ee7733ce3..fa1a849ee61f 100644 --- a/components/setting_picture.test.jsx +++ b/components/setting_picture.test.jsx @@ -27,12 +27,12 @@ describe('components/SettingItemMin', () => { onFileChange: () => {}, // eslint-disable-line no-empty-function updateSection: () => {}, // eslint-disable-line no-empty-function maxFileSize: 209715200, - helpText: {helpText} + helpText: {helpText}, }; test('should match snapshot, profile picture on source', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -41,7 +41,7 @@ describe('components/SettingItemMin', () => { test('should match snapshot, profile picture on file', () => { const props = {...baseProps, file: {file: {}}, src: ''}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -50,7 +50,7 @@ describe('components/SettingItemMin', () => { test('should match snapshot, user icon on source', () => { const props = {...baseProps, onSetDefault: jest.fn()}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -59,7 +59,7 @@ describe('components/SettingItemMin', () => { test('should match snapshot, team icon on source', () => { const props = {...baseProps, onRemove: jest.fn(), imageContext: 'team'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -68,7 +68,7 @@ describe('components/SettingItemMin', () => { test('should match snapshot, team icon on file', () => { const props = {...baseProps, onRemove: jest.fn(), imageContext: 'team', file: {file: {}}, src: ''}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -77,7 +77,7 @@ describe('components/SettingItemMin', () => { test('should match snapshot, on loading picture', () => { const props = {...baseProps, loadingPicture: true}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -86,7 +86,7 @@ describe('components/SettingItemMin', () => { test('should match snapshot with active Save button', () => { const props = {...baseProps, submitActive: true}; const wrapper = shallow( - + , ); wrapper.setState({removeSrc: false}); @@ -101,7 +101,7 @@ describe('components/SettingItemMin', () => { test('should match state and call props.updateSection on handleCancel', () => { const props = {...baseProps, updateSection: jest.fn()}; const wrapper = shallow( - + , ); wrapper.setState({removeSrc: true}); const evt = {preventDefault: jest.fn()}; @@ -117,7 +117,7 @@ describe('components/SettingItemMin', () => { test('should call props.onRemove on handleSave', () => { const props = {...baseProps, onRemove: jest.fn()}; const wrapper = shallow( - + , ); wrapper.setState({removeSrc: true}); const evt = {preventDefault: jest.fn()}; @@ -129,7 +129,7 @@ describe('components/SettingItemMin', () => { test('should call props.onSetDefault on handleSave', () => { const props = {...baseProps, onSetDefault: jest.fn()}; const wrapper = shallow( - + , ); wrapper.setState({setDefaultSrc: true}); const evt = {preventDefault: jest.fn()}; @@ -141,7 +141,7 @@ describe('components/SettingItemMin', () => { test('should match state and call props.onSubmit on handleSave', () => { const props = {...baseProps, onSubmit: jest.fn()}; const wrapper = shallow( - + , ); wrapper.setState({removeSrc: false}); const evt = {preventDefault: jest.fn()}; @@ -156,7 +156,7 @@ describe('components/SettingItemMin', () => { test('should match state on handleRemoveSrc', () => { const props = {...baseProps, onSubmit: jest.fn()}; const wrapper = shallow( - + , ); wrapper.setState({removeSrc: false}); const evt = {preventDefault: jest.fn()}; @@ -168,7 +168,7 @@ describe('components/SettingItemMin', () => { test('should match state and call props.onFileChange on handleFileChange', () => { const props = {...baseProps, onFileChange: jest.fn()}; const wrapper = shallow( - + , ); wrapper.setState({removeSrc: true}); const evt = {preventDefault: jest.fn()}; diff --git a/components/shortcuts_modal.jsx b/components/shortcuts_modal.jsx index ee5547c60e5f..7343fddd2454 100644 --- a/components/shortcuts_modal.jsx +++ b/components/shortcuts_modal.jsx @@ -155,7 +155,7 @@ const allShortcuts = defineMessages({ mac: { id: t('shortcuts.nav.open_close_sidebar.mac'), defaultMessage: 'Open or close the right sidebar\t⌘|.', - } + }, }, msgHeader: { id: t('shortcuts.msgs.header'), diff --git a/components/shortcuts_modal.test.jsx b/components/shortcuts_modal.test.jsx index 3f39e688fea5..954c58387754 100644 --- a/components/shortcuts_modal.test.jsx +++ b/components/shortcuts_modal.test.jsx @@ -9,7 +9,7 @@ import ShortcutsModal from 'components/shortcuts_modal.jsx'; describe('components/ShortcutsModal', () => { test('should match snapshot modal for Mac', () => { const wrapper = mountWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -17,7 +17,7 @@ describe('components/ShortcutsModal', () => { test('should match snapshot modal for non-Mac like Windows/Linux', () => { const wrapper = mountWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/sidebar/channel_filter/channel_filter.test.tsx b/components/sidebar/channel_filter/channel_filter.test.tsx index 5c6598b92d82..6b2ae35533de 100644 --- a/components/sidebar/channel_filter/channel_filter.test.tsx +++ b/components/sidebar/channel_filter/channel_filter.test.tsx @@ -16,7 +16,7 @@ describe('components/sidebar/channel_filter', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -29,7 +29,7 @@ describe('components/sidebar/channel_filter', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -37,7 +37,7 @@ describe('components/sidebar/channel_filter', () => { test('should enable the unread filter on toggle when it is disabled', () => { const wrapper = shallow( - + , ); wrapper.instance().toggleUnreadFilter(); @@ -51,7 +51,7 @@ describe('components/sidebar/channel_filter', () => { }; const wrapper = shallow( - + , ); wrapper.instance().toggleUnreadFilter(); diff --git a/components/sidebar/sidebar.test.tsx b/components/sidebar/sidebar.test.tsx index 17a5e9231dd0..b23c3432f380 100644 --- a/components/sidebar/sidebar.test.tsx +++ b/components/sidebar/sidebar.test.tsx @@ -16,7 +16,7 @@ describe('components/sidebar', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -24,7 +24,7 @@ describe('components/sidebar', () => { test('should match snapshot when direct channels modal is open', () => { const wrapper = shallow( - + , ); wrapper.instance().setState({showDirectChannelsModal: true}); @@ -33,7 +33,7 @@ describe('components/sidebar', () => { test('should match snapshot when more channels modal is open', () => { const wrapper = shallow( - + , ); wrapper.instance().setState({showMoreChannelsModal: true}); @@ -42,7 +42,7 @@ describe('components/sidebar', () => { test('should toggle direct messages modal correctly', () => { const wrapper = shallow( - + , ); const instance = wrapper.instance(); const mockEvent: Partial = {preventDefault: jest.fn()}; diff --git a/components/sidebar/sidebar_category/sidebar_category.test.tsx b/components/sidebar/sidebar_category/sidebar_category.test.tsx index 949d5786bff4..111296b4ada2 100644 --- a/components/sidebar/sidebar_category/sidebar_category.test.tsx +++ b/components/sidebar/sidebar_category/sidebar_category.test.tsx @@ -48,7 +48,7 @@ describe('components/sidebar/sidebar_category', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -61,7 +61,7 @@ describe('components/sidebar/sidebar_category', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -78,7 +78,7 @@ describe('components/sidebar/sidebar_category', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -91,7 +91,7 @@ describe('components/sidebar/sidebar_category', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -99,7 +99,7 @@ describe('components/sidebar/sidebar_category', () => { test('should collapse the channel on toggle when it is not collapsed', () => { const wrapper = shallow( - + , ); wrapper.instance().handleCollapse(); @@ -113,7 +113,7 @@ describe('components/sidebar/sidebar_category', () => { }; const wrapper = shallow( - + , ); wrapper.instance().handleCollapse(); diff --git a/components/sidebar/sidebar_category_list/sidebar_category_list.test.tsx b/components/sidebar/sidebar_category_list/sidebar_category_list.test.tsx index cedb04a9a631..c71156b354a5 100644 --- a/components/sidebar/sidebar_category_list/sidebar_category_list.test.tsx +++ b/components/sidebar/sidebar_category_list/sidebar_category_list.test.tsx @@ -88,7 +88,7 @@ describe('components/sidebar/sidebar_category_list', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -101,7 +101,7 @@ describe('components/sidebar/sidebar_category_list', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -109,7 +109,7 @@ describe('components/sidebar/sidebar_category_list', () => { test('should close sidebar on mobile when channel is selected (ie. changed)', () => { const wrapper = shallow( - + , ); const newCurrentChannel = { @@ -123,7 +123,7 @@ describe('components/sidebar/sidebar_category_list', () => { test('should scroll to top when team changes', () => { const wrapper = shallow( - + , ); wrapper.instance().scrollbar = { @@ -143,7 +143,7 @@ describe('components/sidebar/sidebar_category_list', () => { test('should display unread scroll indicator when channels appear outside visible area', () => { const wrapper = shallow( - + , ); const instance = wrapper.instance(); @@ -173,7 +173,7 @@ describe('components/sidebar/sidebar_category_list', () => { test('should scroll to correct position when scrolling to channel', () => { const wrapper = shallow( - + , ); const instance = wrapper.instance(); diff --git a/components/sidebar/sidebar_category_list/sidebar_category_list.tsx b/components/sidebar/sidebar_category_list/sidebar_category_list.tsx index 3c50e9ce1287..659e258aea7a 100644 --- a/components/sidebar/sidebar_category_list/sidebar_category_list.tsx +++ b/components/sidebar/sidebar_category_list/sidebar_category_list.tsx @@ -299,7 +299,7 @@ export default class SidebarCategoryList extends React.PureComponent { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -52,7 +52,7 @@ describe('components/sidebar/sidebar_channel/sidebar_base_channel', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -65,7 +65,7 @@ describe('components/sidebar/sidebar_channel/sidebar_base_channel', () => { }; const wrapper = shallow( - + , ); expect(wrapper.instance().getCloseHandler()).toBe(wrapper.instance().handleLeavePublicChannel); diff --git a/components/sidebar/sidebar_channel/sidebar_channel.test.tsx b/components/sidebar/sidebar_channel/sidebar_channel.test.tsx index 611e657bbd1f..2697bca267d9 100644 --- a/components/sidebar/sidebar_channel/sidebar_channel.test.tsx +++ b/components/sidebar/sidebar_channel/sidebar_channel.test.tsx @@ -40,7 +40,7 @@ describe('components/sidebar/sidebar_channel', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -53,7 +53,7 @@ describe('components/sidebar/sidebar_channel', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -66,7 +66,7 @@ describe('components/sidebar/sidebar_channel', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -79,7 +79,7 @@ describe('components/sidebar/sidebar_channel', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -91,11 +91,11 @@ describe('components/sidebar/sidebar_channel', () => { channel: { ...baseProps.channel, type: 'D' as ChannelType, - } + }, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -107,11 +107,11 @@ describe('components/sidebar/sidebar_channel', () => { channel: { ...baseProps.channel, type: 'G' as ChannelType, - } + }, }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -124,7 +124,7 @@ describe('components/sidebar/sidebar_channel', () => { }; const wrapper = shallow( - + , ); wrapper.instance().isUnread = jest.fn(() => true); @@ -139,7 +139,7 @@ describe('components/sidebar/sidebar_channel', () => { }; const wrapper = shallow( - + , ); expect(wrapper.instance().isCollapsed(wrapper.instance().props)).toBe(false); diff --git a/components/sidebar/sidebar_channel/sidebar_channel_link/sidebar_channel_link.test.tsx b/components/sidebar/sidebar_channel/sidebar_channel_link/sidebar_channel_link.test.tsx index b01f940e4898..b8dc66e9b910 100644 --- a/components/sidebar/sidebar_channel/sidebar_channel_link/sidebar_channel_link.test.tsx +++ b/components/sidebar/sidebar_channel/sidebar_channel_link/sidebar_channel_link.test.tsx @@ -39,7 +39,7 @@ describe('components/sidebar/sidebar_channel/sidebar_channel_link', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -50,7 +50,7 @@ describe('components/sidebar/sidebar_channel/sidebar_channel_link', () => { userAgentMock.isDesktopApp.mockImplementation(() => false); const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -58,7 +58,7 @@ describe('components/sidebar/sidebar_channel/sidebar_channel_link', () => { test('should match snapshot when tooltip is enabled', () => { const wrapper = shallow( - + , ); wrapper.setState({showTooltip: true}); @@ -73,7 +73,7 @@ describe('components/sidebar/sidebar_channel/sidebar_channel_link', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -81,7 +81,7 @@ describe('components/sidebar/sidebar_channel/sidebar_channel_link', () => { test('should enable tooltip when needed', () => { const wrapper = shallow( - + , ); const instance = wrapper.instance(); @@ -89,7 +89,7 @@ describe('components/sidebar/sidebar_channel/sidebar_channel_link', () => { current: { offsetWidth: 50, scrollWidth: 60, - } + }, } as any; instance.enableToolTipIfNeeded(); diff --git a/components/sidebar/sidebar_channel/sidebar_direct_channel/sidebar_direct_channel.test.tsx b/components/sidebar/sidebar_channel/sidebar_direct_channel/sidebar_direct_channel.test.tsx index ad8b4abb383d..bec1fc703b40 100644 --- a/components/sidebar/sidebar_channel/sidebar_direct_channel/sidebar_direct_channel.test.tsx +++ b/components/sidebar/sidebar_channel/sidebar_direct_channel/sidebar_direct_channel.test.tsx @@ -63,7 +63,7 @@ describe('components/sidebar/sidebar_channel/sidebar_direct_channel', () => { test('should match snapshot', () => { const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -76,7 +76,7 @@ describe('components/sidebar/sidebar_channel/sidebar_direct_channel', () => { }; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -92,7 +92,7 @@ describe('components/sidebar/sidebar_channel/sidebar_direct_channel', () => { }; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); @@ -109,7 +109,7 @@ describe('components/sidebar/sidebar_channel/sidebar_direct_channel', () => { }; const wrapper = shallowWithIntl( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/signup/signup_controller/signup_controller.jsx b/components/signup/signup_controller/signup_controller.jsx index f7d22580c47e..e13f424b3e38 100644 --- a/components/signup/signup_controller/signup_controller.jsx +++ b/components/signup/signup_controller/signup_controller.jsx @@ -168,7 +168,7 @@ export default class SignupController extends React.Component { defaultMessage='Email and Password' /> - + , ); } @@ -188,7 +188,7 @@ export default class SignupController extends React.Component { /> - + , ); } @@ -208,7 +208,7 @@ export default class SignupController extends React.Component { /> - + , ); } @@ -228,7 +228,7 @@ export default class SignupController extends React.Component { /> - + , ); } @@ -262,7 +262,7 @@ export default class SignupController extends React.Component { {LDAPText} - + , ); } @@ -290,7 +290,7 @@ export default class SignupController extends React.Component { {this.props.samlLoginButtonText} - + , ); } diff --git a/components/signup/signup_controller/signup_controller.test.jsx b/components/signup/signup_controller/signup_controller.test.jsx index 71e3f41fe1c0..9d21c34a887a 100644 --- a/components/signup/signup_controller/signup_controller.test.jsx +++ b/components/signup/signup_controller/signup_controller.test.jsx @@ -48,7 +48,7 @@ describe('components/SignupController', () => { test('should match snapshot for all signup options enabled with isLicensed enabled', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -60,7 +60,7 @@ describe('components/SignupController', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -84,7 +84,7 @@ describe('components/SignupController', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -111,7 +111,7 @@ describe('components/SignupController', () => { }; const wrapper = shallow( - + , ); expect(addUserToTeamFromInvite).toHaveBeenCalled(); diff --git a/components/signup/signup_email/signup_email.test.jsx b/components/signup/signup_email/signup_email.test.jsx index 57da32797bd4..4e3e6d4067a7 100644 --- a/components/signup/signup_email/signup_email.test.jsx +++ b/components/signup/signup_email/signup_email.test.jsx @@ -33,7 +33,7 @@ describe('components/SignupEmail', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -60,7 +60,7 @@ describe('components/SignupEmail', () => { + />, ); await wrapper.instance().handleSignupSuccess({email: 'test@example.com', password: 'bar'}, {id: 'foo'}); @@ -87,7 +87,7 @@ describe('components/SignupEmail', () => { + />, ); wrapper.setState({teamName: 'sample'}); diff --git a/components/single_image_view/single_image_view.jsx b/components/single_image_view/single_image_view.jsx index bfc76a32c35e..3e5f6377a6fa 100644 --- a/components/single_image_view/single_image_view.jsx +++ b/components/single_image_view/single_image_view.jsx @@ -30,7 +30,7 @@ export default class SingleImageView extends React.PureComponent { static defaultProps = { fileInfo: {}, - compactDisplay: false + compactDisplay: false, }; constructor(props) { diff --git a/components/single_image_view/single_image_view.test.jsx b/components/single_image_view/single_image_view.test.jsx index 29d73a75ae5b..4f59947a84cd 100644 --- a/components/single_image_view/single_image_view.test.jsx +++ b/components/single_image_view/single_image_view.test.jsx @@ -28,7 +28,7 @@ describe('components/SingleImageView', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -46,7 +46,7 @@ describe('components/SingleImageView', () => { }; const props = {...baseProps, fileInfo}; const wrapper = shallow( - + , ); wrapper.setState({viewPortWidth: 300}); @@ -58,7 +58,7 @@ describe('components/SingleImageView', () => { test('should match state on handleImageClick', () => { const wrapper = shallow( - + , ); wrapper.setState({showPreviewModal: false}); @@ -68,7 +68,7 @@ describe('components/SingleImageView', () => { test('should match state on showPreviewModal', () => { const wrapper = shallow( - + , ); wrapper.setState({showPreviewModal: true}); @@ -86,7 +86,7 @@ describe('components/SingleImageView', () => { }; const wrapper = shallow( - + , ); wrapper.instance().toggleEmbedVisibility(); @@ -96,7 +96,7 @@ describe('components/SingleImageView', () => { test('should set loaded state on callback of onImageLoaded on SizeAwareImage component', () => { const wrapper = shallow( - + , ); expect(wrapper.state('loaded')).toEqual(false); wrapper.find(SizeAwareImage).prop('onImageLoaded')(); @@ -106,7 +106,7 @@ describe('components/SingleImageView', () => { test('should correctly pass prop down to surround small images with a container', () => { const wrapper = shallow( - + , ); expect(wrapper.find(SizeAwareImage).prop('handleSmallImageContainer')). diff --git a/components/size_aware_image.test.jsx b/components/size_aware_image.test.jsx index 85634a42e85f..f5731f130d73 100644 --- a/components/size_aware_image.test.jsx +++ b/components/size_aware_image.test.jsx @@ -20,7 +20,7 @@ describe('components/SizeAwareImage', () => { onImageLoaded: jest.fn(), onImageLoadFail: jest.fn(), src: 'https://example.com/image.png', - className: 'class' + className: 'class', }; loadImage.mockReturnValue(() => ({})); diff --git a/components/spinner_button.test.tsx b/components/spinner_button.test.tsx index cce37e69247c..75e9514f7bcd 100644 --- a/components/spinner_button.test.tsx +++ b/components/spinner_button.test.tsx @@ -12,7 +12,7 @@ describe('components/SpinnerButton', () => { + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -22,7 +22,7 @@ describe('components/SpinnerButton', () => { + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -35,7 +35,7 @@ describe('components/SpinnerButton', () => { > - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -48,7 +48,7 @@ describe('components/SpinnerButton', () => { spinning={false} onClick={onClick} spinningText='Test' - /> + />, ); wrapper.find('.btn-primary').simulate('click'); diff --git a/components/suggestion/at_mention_provider/at_mention_provider.jsx b/components/suggestion/at_mention_provider/at_mention_provider.jsx index 99b72b36acde..7901596b3ec8 100644 --- a/components/suggestion/at_mention_provider/at_mention_provider.jsx +++ b/components/suggestion/at_mention_provider/at_mention_provider.jsx @@ -44,7 +44,7 @@ export default class AtMentionProvider extends Provider { } return ['here', 'channel', 'all'].filter((item) => - item.startsWith(this.latestPrefix) + item.startsWith(this.latestPrefix), ).map((name) => ({ username: name, type: Constants.MENTION_SPECIAL, diff --git a/components/suggestion/command_provider.jsx b/components/suggestion/command_provider.jsx index 6e35ffd3cac8..716aaa687f83 100644 --- a/components/suggestion/command_provider.jsx +++ b/components/suggestion/command_provider.jsx @@ -105,9 +105,9 @@ export default class CommandProvider extends Provider { items: matches, component: CommandSuggestion, }); - } + }, ).catch( - () => {} //eslint-disable-line no-empty-function + () => {}, //eslint-disable-line no-empty-function ); return true; @@ -137,9 +137,9 @@ export default class CommandProvider extends Provider { items: matches, component: CommandSuggestion, }); - } + }, ).catch( - () => {} //eslint-disable-line no-empty-function + () => {}, //eslint-disable-line no-empty-function ); return true; diff --git a/components/suggestion/command_provider.test.js b/components/suggestion/command_provider.test.js index f9095bec8216..ff6dd046f527 100644 --- a/components/suggestion/command_provider.test.js +++ b/components/suggestion/command_provider.test.js @@ -21,7 +21,7 @@ describe('CommandSuggestion', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/suggestion/generic_channel_provider.jsx b/components/suggestion/generic_channel_provider.jsx index fbcbf09b80d5..caa458060472 100644 --- a/components/suggestion/generic_channel_provider.jsx +++ b/components/suggestion/generic_channel_provider.jsx @@ -71,7 +71,7 @@ export default class ChannelProvider extends Provider { items: channels, component: ChannelSuggestion, }); - } + }, ); return true; diff --git a/components/suggestion/search_suggestion_list.test.jsx b/components/suggestion/search_suggestion_list.test.jsx index 64a1aad8e3d5..de170fb191df 100644 --- a/components/suggestion/search_suggestion_list.test.jsx +++ b/components/suggestion/search_suggestion_list.test.jsx @@ -25,7 +25,7 @@ describe('components/SearchSuggestionList', () => { + />, ); const instance = wrapper.instance(); diff --git a/components/suggestion/suggestion_box.test.jsx b/components/suggestion/suggestion_box.test.jsx index 69d19ed0bc33..61c800a2c45f 100644 --- a/components/suggestion/suggestion_box.test.jsx +++ b/components/suggestion/suggestion_box.test.jsx @@ -36,7 +36,7 @@ describe('components/SuggestionBox', () => { test('should avoid ref access on unmount race', (done) => { const wrapper = mount( - + , ); wrapper.instance().handleFocusIn({}); wrapper.unmount(); @@ -49,7 +49,7 @@ describe('components/SuggestionBox', () => { + />, ); wrapper.setState({focused: true}); const instance = wrapper.instance(); @@ -79,7 +79,7 @@ describe('components/SuggestionBox', () => { const wrapper = shallow( + />, ); const instance = wrapper.instance(); instance.handlePretextChanged = jest.fn(); @@ -99,7 +99,7 @@ describe('components/SuggestionBox', () => { const wrapper = shallow( + />, ); const instance = wrapper.instance(); instance.handlePretextChanged = jest.fn(); @@ -116,7 +116,7 @@ describe('components/SuggestionBox', () => { const wrapper = shallow( + />, ); const instance = wrapper.instance(); instance.handlePretextChanged = jest.fn(); @@ -154,7 +154,7 @@ describe('components/SuggestionBox', () => { const wrapper = shallow( + />, ); const instance = wrapper.instance(); @@ -175,7 +175,7 @@ describe('components/SuggestionBox', () => { test('should call setState for clear based on present cleared state', () => { const wrapper = mount( - + , ); const instance = wrapper.instance(); diff --git a/components/suggestion/suggestion_list.jsx b/components/suggestion/suggestion_list.jsx index c0a7bd790b9e..a18446ee06ac 100644 --- a/components/suggestion/suggestion_list.jsx +++ b/components/suggestion/suggestion_list.jsx @@ -210,7 +210,7 @@ export default class SuggestionList extends React.PureComponent { isSelection={isSelection} onClick={this.props.onCompleteWord} onMouseMove={this.props.onItemHover} - /> + />, ); } const mainClass = 'suggestion-list suggestion-list--' + this.props.location; @@ -219,7 +219,7 @@ export default class SuggestionList extends React.PureComponent { if (this.props.wrapperHeight) { maxHeight = Math.min( windowHeight() - (this.props.wrapperHeight + Constants.SUGGESTION_LIST_MAXHEIGHT), - Constants.SUGGESTION_LIST_MAXHEIGHT + Constants.SUGGESTION_LIST_MAXHEIGHT, ); } diff --git a/components/suggestion/suggestion_list.test.jsx b/components/suggestion/suggestion_list.test.jsx index dd999d2655bf..3b4adf7ab8f0 100644 --- a/components/suggestion/suggestion_list.test.jsx +++ b/components/suggestion/suggestion_list.test.jsx @@ -25,7 +25,7 @@ describe('components/SuggestionList', () => { + />, ); const instance = wrapper.instance(); diff --git a/components/suggestion/switch_channel_provider.jsx b/components/suggestion/switch_channel_provider.jsx index 47536154602b..3b4f045eeb6a 100644 --- a/components/suggestion/switch_channel_provider.jsx +++ b/components/suggestion/switch_channel_provider.jsx @@ -416,7 +416,7 @@ export default class SwitchChannelProvider extends Provider { completedChannels[user.id] = true; wrappedChannel = this.userWrappedChannel( user, - newChannel + newChannel, ); const isDMVisible = isDirectChannelVisible(user.id, config, getMyPreferences(state), channel, getLastPostPerChannel(state)[channel.id], isUnreadChannel(getMyChannelMemberships(state), channel)); if (isDMVisible) { @@ -508,7 +508,7 @@ export default class SwitchChannelProvider extends Provider { wrappedChannel = this.userWrappedChannel( user, - channel + channel, ); } wrappedChannel.type = Constants.MENTION_UNREAD_CHANNELS; diff --git a/components/suggestion/switch_channel_provider.test.jsx b/components/suggestion/switch_channel_provider.test.jsx index 104adeb6f538..ab91c93af443 100644 --- a/components/suggestion/switch_channel_provider.test.jsx +++ b/components/suggestion/switch_channel_provider.test.jsx @@ -88,8 +88,8 @@ describe('components/SwitchChannelProvider', () => { { id: 'other_user', display_name: 'other_user', - username: 'other_user' - } + username: 'other_user', + }, ]; const channels = [{ id: 'channel_other_user', @@ -125,7 +125,7 @@ describe('components/SwitchChannelProvider', () => { const users = [{ id: 'other_user', display_name: 'other_user', - username: 'other_user' + username: 'other_user', }, ]; const channels = [{ diff --git a/components/system_notice/index.js b/components/system_notice/index.js index 381eaa8db1c0..6ee893e8c12c 100644 --- a/components/system_notice/index.js +++ b/components/system_notice/index.js @@ -29,7 +29,7 @@ function makeMapStateToProps() { nameMap[p.name] = p; }); return nameMap; - } + }, ); return function mapStateToProps(state) { diff --git a/components/team_general_tab/team_general_tab.jsx b/components/team_general_tab/team_general_tab.jsx index a034eaf4b5e9..cbbfa4985b35 100644 --- a/components/team_general_tab/team_general_tab.jsx +++ b/components/team_general_tab/team_general_tab.jsx @@ -489,7 +489,7 @@ export default class GeneralTab extends React.Component { }} />
- + , ); inviteSection = ( @@ -547,7 +547,7 @@ export default class GeneralTab extends React.Component { onFocus={Utils.moveCursorToEnd} /> - + , ); const nameExtraInfo = {Utils.localizeMessage('general_tab.teamNameInfo', 'Set the name of the team as it appears on your sign-in screen and at the top of the left-hand sidebar.')}; @@ -609,7 +609,7 @@ export default class GeneralTab extends React.Component { onFocus={Utils.moveCursorToEnd} /> - + , ); const descriptionExtraInfo = {Utils.localizeMessage('general_tab.teamDescriptionInfo', 'Team description provides additional information to help users select the right team. Maximum of 50 characters.')}; @@ -734,7 +734,7 @@ export default class GeneralTab extends React.Component { aria-label={Utils.localizeMessage('general_tab.allowedDomains.ariaLabel', 'Allowed Domains')} /> - + , ); const allowedDomainsInfo = {Utils.localizeMessage('general_tab.AllowedDomainsInfo', 'Users can only join the team if their email matches a specific domain (e.g. "mattermost.org") or list of comma-separated domains (e.g. "corp.mattermost.com, mattermost.org").')}; diff --git a/components/team_general_tab/team_general_tab.test.jsx b/components/team_general_tab/team_general_tab.test.jsx index a21ac705f154..aff15eb2cd36 100644 --- a/components/team_general_tab/team_general_tab.test.jsx +++ b/components/team_general_tab/team_general_tab.test.jsx @@ -35,7 +35,7 @@ describe('components/TeamSettings', () => { collapseModal: jest.fn(), actions: baseActions, canInviteTeamMembers: true, - helpText: {helpText} + helpText: {helpText}, }; test('should handle bad updateTeamIcon function call', () => { diff --git a/components/team_members_dropdown/team_members_dropdown.test.jsx b/components/team_members_dropdown/team_members_dropdown.test.jsx index 9f1cd99e5cf6..61f14c10d5d5 100644 --- a/components/team_members_dropdown/team_members_dropdown.test.jsx +++ b/components/team_members_dropdown/team_members_dropdown.test.jsx @@ -71,7 +71,7 @@ describe('components/team_members_dropdown', () => { test('should match snapshot for team_members_dropdown', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -82,7 +82,7 @@ describe('components/team_members_dropdown', () => { {...baseProps} index={4} totalUsers={5} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -90,7 +90,7 @@ describe('components/team_members_dropdown', () => { test('should match snapshot with group-constrained team', () => { baseProps.currentTeam.group_constrained = true; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -99,7 +99,7 @@ describe('components/team_members_dropdown', () => { baseProps.currentTeam.group_constrained = true; baseProps.user = bot; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/team_members_modal/team_members_modal.test.tsx b/components/team_members_modal/team_members_modal.test.tsx index 7e2bb6c1d4d3..da6aec0f93e9 100644 --- a/components/team_members_modal/team_members_modal.test.tsx +++ b/components/team_members_modal/team_members_modal.test.tsx @@ -15,12 +15,12 @@ describe('components/TeamMembersModal', () => { + />, ); expect(wrapper).toMatchSnapshot(); @@ -34,12 +34,12 @@ describe('components/TeamMembersModal', () => { + />, ); const modalProps = wrapper.find(Modal).first().props(); diff --git a/components/team_selector_modal/team_selector_modal.jsx b/components/team_selector_modal/team_selector_modal.jsx index 65a3a57fe2d6..208264c1d83b 100644 --- a/components/team_selector_modal/team_selector_modal.jsx +++ b/components/team_selector_modal/team_selector_modal.jsx @@ -70,7 +70,7 @@ export default class TeamSelectorModal extends React.Component { await this.props.actions.searchTeams(searchTerm); this.setTeamsLoadingState(false); }, - Constants.SEARCH_TIMEOUT_MILLISECONDS + Constants.SEARCH_TIMEOUT_MILLISECONDS, ); } } diff --git a/components/team_settings_modal/team_settings_modal.test.jsx b/components/team_settings_modal/team_settings_modal.test.jsx index 863b85f7ec3a..90a6e9e4204b 100644 --- a/components/team_settings_modal/team_settings_modal.test.jsx +++ b/components/team_settings_modal/team_settings_modal.test.jsx @@ -19,7 +19,7 @@ describe('components/team_settings_modal', () => { const wrapper = shallow( + />, ); wrapper.instance().handleHidden(); diff --git a/components/terms_of_service/index.js b/components/terms_of_service/index.js index 82876ece5518..e29d28ceb32e 100644 --- a/components/terms_of_service/index.js +++ b/components/terms_of_service/index.js @@ -15,7 +15,7 @@ function mapStateToProps(state) { const config = getConfig(state); return { termsEnabled: config.EnableCustomTermsOfService === 'true', - emojiMap: getEmojiMap(state) + emojiMap: getEmojiMap(state), }; } diff --git a/components/terms_of_service/terms_of_service.jsx b/components/terms_of_service/terms_of_service.jsx index a2d3a70f9dfd..12211c2375a4 100644 --- a/components/terms_of_service/terms_of_service.jsx +++ b/components/terms_of_service/terms_of_service.jsx @@ -92,7 +92,7 @@ export default class TermsOfService extends React.PureComponent { } else { GlobalActions.redirectUserToDefaultTeam(); } - } + }, ); }; @@ -105,7 +105,7 @@ export default class TermsOfService extends React.PureComponent { false, () => { GlobalActions.emitUserLoggedOutEvent(`/login?extra=${Constants.TERMS_REJECTED}`); - } + }, ); }; diff --git a/components/textbox.test.jsx b/components/textbox.test.jsx index f43c07aff397..2b6ddae155ad 100644 --- a/components/textbox.test.jsx +++ b/components/textbox.test.jsx @@ -44,7 +44,7 @@ describe('components/TextBox', () => { createMessage='placeholder text' supportsCommands={false} {...baseProps} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -69,7 +69,7 @@ describe('components/TextBox', () => { supportsCommands={false} handlePostError={handlePostError} {...baseProps} - /> + />, ); expect(gotError).toEqual(true); @@ -96,7 +96,7 @@ describe('components/TextBox', () => { supportsCommands={false} handlePostError={handlePostError} {...baseProps} - /> + />, ); wrapper.setProps({value: 'some test text that exceeds char limit'}); diff --git a/components/toast_wrapper/index.jsx b/components/toast_wrapper/index.jsx index c4d8cab9a5fb..059ec53bc107 100644 --- a/components/toast_wrapper/index.jsx +++ b/components/toast_wrapper/index.jsx @@ -33,7 +33,7 @@ export function makeCountUnreadsBelow() { post.state !== Posts.POST_DELETED && post.create_at > lastViewedBottom; }).length; - } + }, ); } diff --git a/components/toast_wrapper/toast_wrapper.jsx b/components/toast_wrapper/toast_wrapper.jsx index e136300fa4e0..3035de89c1c7 100644 --- a/components/toast_wrapper/toast_wrapper.jsx +++ b/components/toast_wrapper/toast_wrapper.jsx @@ -138,7 +138,7 @@ class ToastWrapper extends React.PureComponent { postListIds, lastViewedBottom, updateNewMessagesAtInChannel, - actions + actions, } = this.props; if (!prevProps.atBottom && atBottom && atLatestPost) { @@ -231,7 +231,7 @@ class ToastWrapper extends React.PureComponent { - ) + ), }} /> ); diff --git a/components/toast_wrapper/toast_wrapper.test.jsx b/components/toast_wrapper/toast_wrapper.test.jsx index a5fc6fd6192a..40866915a4fa 100644 --- a/components/toast_wrapper/toast_wrapper.test.jsx +++ b/components/toast_wrapper/toast_wrapper.test.jsx @@ -39,8 +39,8 @@ describe('components/ToastWrapper', () => { match: { params: { team: 'team', - } - } + }, + }, }; describe('unread count logic', () => { @@ -48,7 +48,7 @@ describe('components/ToastWrapper', () => { const props = { ...baseProps, unreadCountInChannel: 10, - newRecentMessagesCount: 5 + newRecentMessagesCount: 5, }; const wrapper = shallowWithIntl(); @@ -92,7 +92,7 @@ describe('components/ToastWrapper', () => { const props = { ...baseProps, unreadCountInChannel: 10, - newRecentMessagesCount: 5 + newRecentMessagesCount: 5, }; const wrapper = shallowWithIntl(); @@ -170,7 +170,7 @@ describe('components/ToastWrapper', () => { ...baseProps, focusedPostId: 'asdasd', atLatestPost: false, - atBottom: null + atBottom: null, }; const wrapper = shallowWithIntl(); expect(wrapper.state('showMessageHistoryToast')).toBe(undefined); @@ -404,7 +404,7 @@ describe('components/ToastWrapper', () => { const props = { ...baseProps, unreadCountInChannel: 10, - newRecentMessagesCount: 5 + newRecentMessagesCount: 5, }; const updateToastStatus = baseProps.actions.updateToastStatus; @@ -443,7 +443,7 @@ describe('components/ToastWrapper', () => { DATE_LINE + 1551711600000, 'post4', 'post5', - ] + ], }); //should not call if atBottom is null @@ -472,7 +472,7 @@ describe('components/ToastWrapper', () => { ...baseProps, focusedPostId: 'asdasd', atLatestPost: false, - atBottom: false + atBottom: false, }; const wrapper = shallowWithIntl(); expect(wrapper.state('showMessageHistoryToast')).toBe(true); @@ -488,7 +488,7 @@ describe('components/ToastWrapper', () => { ...baseProps, focusedPostId: 'asdasd', atLatestPost: false, - atBottom: false + atBottom: false, }; const wrapper = shallowWithIntl(); expect(wrapper.state('showMessageHistoryToast')).toBe(true); diff --git a/components/toggle_modal_button_redux/toggle_modal_button_redux.test.jsx b/components/toggle_modal_button_redux/toggle_modal_button_redux.test.jsx index c4d8abd40f3b..90911a9ca7b4 100644 --- a/components/toggle_modal_button_redux/toggle_modal_button_redux.test.jsx +++ b/components/toggle_modal_button_redux/toggle_modal_button_redux.test.jsx @@ -37,7 +37,7 @@ describe('components/ToggleModalButtonRedux', () => { id='channel_header.delete' defaultMessage='Delete Channel' /> - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/components/tutorial/menu_tutorial_tip.jsx b/components/tutorial/menu_tutorial_tip.jsx index dd1d0ec513aa..b2a347cd502d 100644 --- a/components/tutorial/menu_tutorial_tip.jsx +++ b/components/tutorial/menu_tutorial_tip.jsx @@ -37,7 +37,7 @@ const MenuTutorialTip = ({toggleFunc, onBottom}) => { defaultMessage='System administrators will find a **System Console** option to administrate the entire system.' />

- + , ); let placement = 'right'; diff --git a/components/tutorial/tutorial_intro_screens/tutorial_intro_screens.jsx b/components/tutorial/tutorial_intro_screens/tutorial_intro_screens.jsx index c2a95f06a38a..7423adc47383 100644 --- a/components/tutorial/tutorial_intro_screens/tutorial_intro_screens.jsx +++ b/components/tutorial/tutorial_intro_screens/tutorial_intro_screens.jsx @@ -304,7 +304,7 @@ export default class TutorialIntroScreens extends React.Component { className={className} data-screen={i} onClick={(e) => this.handleCircleClick(e, i)} - /> + />, ); } diff --git a/components/tutorial/tutorial_tip/tutorial_tip.test.tsx b/components/tutorial/tutorial_tip/tutorial_tip.test.tsx index ad8eb38a48aa..c393eaa5b4ac 100644 --- a/components/tutorial/tutorial_tip/tutorial_tip.test.tsx +++ b/components/tutorial/tutorial_tip/tutorial_tip.test.tsx @@ -33,7 +33,7 @@ describe('components/tutorial/tutorial_tip/tutorial_tip', () => { const props = {...requiredProps, actions: {closeRhsMenu, savePreferences}}; const wrapper: ShallowWrapper = shallow( - + , ); wrapper.instance().handleNext(); @@ -51,7 +51,7 @@ describe('components/tutorial/tutorial_tip/tutorial_tip', () => { const props = {...requiredProps, actions: {closeRhsMenu, savePreferences}}; const wrapper: ShallowWrapper = shallow( - + , ); wrapper.instance().handleNext(); @@ -72,12 +72,12 @@ describe('components/tutorial/tutorial_tip/tutorial_tip', () => { test('should have called mockEvent.preventDefault when skipTutorial', () => { const mockEvent = { - preventDefault: jest.fn() + preventDefault: jest.fn(), } as unknown as React.MouseEvent; const props = {...requiredProps}; const wrapper: ShallowWrapper = shallow( - + , ); wrapper.instance().skipTutorial(mockEvent); @@ -88,12 +88,12 @@ describe('components/tutorial/tutorial_tip/tutorial_tip', () => { const savePreferences = jest.fn(); const closeRhsMenu = jest.fn(); const mockEvent = { - preventDefault: jest.fn() + preventDefault: jest.fn(), } as unknown as React.MouseEvent; const props = {...requiredProps, actions: {closeRhsMenu, savePreferences}}; const wrapper: ShallowWrapper = shallow( - + , ); wrapper.instance().skipTutorial(mockEvent); diff --git a/components/tutorial/tutorial_tip/tutorial_tip.tsx b/components/tutorial/tutorial_tip/tutorial_tip.tsx index f0e88561a417..5ed0202621ca 100644 --- a/components/tutorial/tutorial_tip/tutorial_tip.tsx +++ b/components/tutorial/tutorial_tip/tutorial_tip.tsx @@ -50,7 +50,7 @@ export default class TutorialTip extends React.Component { this.state = { currentScreen: 0, - show: false + show: false, }; this.targetRef = React.createRef(); @@ -164,7 +164,7 @@ export default class TutorialTip extends React.Component { className={className} data-screen={i} onClick={(e) => this.handleCircleClick(e, i)} - /> + />, ); } } diff --git a/components/unarchive_channel_modal/unarchive_channel_modal.test.jsx b/components/unarchive_channel_modal/unarchive_channel_modal.test.jsx index daa61fe43a68..7d40ea31f231 100644 --- a/components/unarchive_channel_modal/unarchive_channel_modal.test.jsx +++ b/components/unarchive_channel_modal/unarchive_channel_modal.test.jsx @@ -43,14 +43,14 @@ describe('components/unarchive_channel_modal', () => { test('should match snapshot for unarchive_channel_modal', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); test('should match state when onHide is called', () => { const wrapper = shallow( - + , ); wrapper.setState({show: true}); @@ -63,7 +63,7 @@ describe('components/unarchive_channel_modal', () => { const actions = {unarchiveChannel: jest.fn()}; const props = {...baseProps, actions}; const wrapper = shallow( - + , ); wrapper.setState({show: true}); @@ -77,7 +77,7 @@ describe('components/unarchive_channel_modal', () => { const onHide = jest.fn(); const props = {...baseProps, onHide}; const wrapper = shallow( - + , ); wrapper.find(Modal).props().onExited(); diff --git a/components/unread_channel_indicator.test.tsx b/components/unread_channel_indicator.test.tsx index 8e3e6263c72e..48f2431232a1 100644 --- a/components/unread_channel_indicator.test.tsx +++ b/components/unread_channel_indicator.test.tsx @@ -13,7 +13,7 @@ describe('components/UnreadChannelIndicator', () => { const wrapper = shallow( + />, ); expect(wrapper).toMatchSnapshot(); @@ -26,7 +26,7 @@ describe('components/UnreadChannelIndicator', () => { + />, ); expect(wrapper).toMatchSnapshot(); @@ -40,7 +40,7 @@ describe('components/UnreadChannelIndicator', () => { onClick={emptyFunction} show={true} content='foo' - /> + />, ); expect(wrapper).toMatchSnapshot(); @@ -54,7 +54,7 @@ describe('components/UnreadChannelIndicator', () => { onClick={emptyFunction} show={true} content={
{'foo'}
} - /> + />, ); expect(wrapper).toMatchSnapshot(); @@ -70,7 +70,7 @@ describe('components/UnreadChannelIndicator', () => { show={true} content={
{'foo'}
} name={name} - /> + />, ); wrapper.find('#unreadIndicator' + name).simulate('click'); diff --git a/components/user_profile/user_profile.test.jsx b/components/user_profile/user_profile.test.jsx index 3de4840e1670..195193fc3142 100644 --- a/components/user_profile/user_profile.test.jsx +++ b/components/user_profile/user_profile.test.jsx @@ -24,7 +24,7 @@ describe('components/UserProfile', () => { + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -34,7 +34,7 @@ describe('components/UserProfile', () => { + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/user_settings/advanced/join_leave_section/index.js b/components/user_settings/advanced/join_leave_section/index.js index 1bb2e759e90e..cf748e87f3d4 100644 --- a/components/user_settings/advanced/join_leave_section/index.js +++ b/components/user_settings/advanced/join_leave_section/index.js @@ -16,7 +16,7 @@ function mapStateToProps(state) { state, Preferences.CATEGORY_ADVANCED_SETTINGS, Preferences.ADVANCED_FILTER_JOIN_LEAVE, - 'true' + 'true', ); return { diff --git a/components/user_settings/advanced/join_leave_section/join_leave_section.test.jsx b/components/user_settings/advanced/join_leave_section/join_leave_section.test.jsx index 069000638f6b..db83e9133e40 100644 --- a/components/user_settings/advanced/join_leave_section/join_leave_section.test.jsx +++ b/components/user_settings/advanced/join_leave_section/join_leave_section.test.jsx @@ -29,7 +29,7 @@ describe('components/user_settings/advanced/JoinLeaveSection', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -44,7 +44,7 @@ describe('components/user_settings/advanced/JoinLeaveSection', () => { test('should match state on handleOnChange', () => { const wrapper = shallow( - + , ); let value = 'false'; @@ -67,7 +67,7 @@ describe('components/user_settings/advanced/JoinLeaveSection', () => { {...defaultProps} actions={actions} onUpdateSection={onUpdateSection} - /> + />, ); const joinLeavePreference = { @@ -95,7 +95,7 @@ describe('components/user_settings/advanced/JoinLeaveSection', () => { + />, ); wrapper.setState({joinLeaveState: 'false'}); diff --git a/components/user_settings/advanced/user_settings_advanced.jsx b/components/user_settings/advanced/user_settings_advanced.jsx index a4add6d73dc4..93bb2a364b32 100644 --- a/components/user_settings/advanced/user_settings_advanced.jsx +++ b/components/user_settings/advanced/user_settings_advanced.jsx @@ -490,7 +490,7 @@ export default class AdvancedSettingsDisplay extends React.PureComponent { {this.renderFeatureLabel(key)} - + , ); }); @@ -501,7 +501,7 @@ export default class AdvancedSettingsDisplay extends React.PureComponent { id='user.settings.advance.preReleaseDesc' defaultMessage="Check any pre-released features you'd like to preview. You may also need to refresh the page before the setting will take effect." /> - + , ); previewFeaturesSection = ( { options.push( - {value: lang.value, label: lang.name} + {value: lang.value, label: lang.name}, ); }); diff --git a/components/user_settings/display/manage_timezones/manage_timezones.jsx b/components/user_settings/display/manage_timezones/manage_timezones.jsx index 13bde74d2db1..258d2eea8afd 100644 --- a/components/user_settings/display/manage_timezones/manage_timezones.jsx +++ b/components/user_settings/display/manage_timezones/manage_timezones.jsx @@ -222,7 +222,7 @@ export default class ManageTimezones extends React.PureComponent { id='user.settings.timezones.promote' defaultMessage='Select the time zone used for timestamps in the user interface and email notifications.' /> - + , ); return ( diff --git a/components/user_settings/display/user_settings_display.jsx b/components/user_settings/display/user_settings_display.jsx index 08e0a5ec2d5f..fab79a48dc6c 100644 --- a/components/user_settings/display/user_settings_display.jsx +++ b/components/user_settings/display/user_settings_display.jsx @@ -545,7 +545,7 @@ export default class UserSettingsDisplay extends React.Component { id: t('user.settings.display.teammateNameDisplayDescription'), message: 'Set how to display other user\'s names in posts and the Direct Messages list.', }, - disabled: this.props.lockTeammateNameDisplay + disabled: this.props.lockTeammateNameDisplay, }); let timezoneSelection; diff --git a/components/user_settings/display/user_settings_theme/color_chooser.test.jsx b/components/user_settings/display/user_settings_theme/color_chooser.test.jsx index 3388775087c3..8fa8056c6f7d 100644 --- a/components/user_settings/display/user_settings_theme/color_chooser.test.jsx +++ b/components/user_settings/display/user_settings_theme/color_chooser.test.jsx @@ -13,7 +13,7 @@ describe('components/user_settings/display/ColorChooser', () => { color='#ffeec0' label='Choose color' id='choose-color' - /> + />, ); expect(wrapper).toMatchSnapshot(); diff --git a/components/user_settings/display/user_settings_theme/custom_theme_chooser.test.jsx b/components/user_settings/display/user_settings_theme/custom_theme_chooser.test.jsx index 58fb55cc5261..df4a17b7f2d2 100644 --- a/components/user_settings/display/user_settings_theme/custom_theme_chooser.test.jsx +++ b/components/user_settings/display/user_settings_theme/custom_theme_chooser.test.jsx @@ -16,7 +16,7 @@ describe('components/user_settings/display/CustomThemeChooser', () => { it('should match, init', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -24,7 +24,7 @@ describe('components/user_settings/display/CustomThemeChooser', () => { it('should create a custom theme when the code theme changes', () => { const wrapper = shallow( - + , ); const event = { diff --git a/components/user_settings/display/user_settings_theme/premade_theme_chooser/premade_theme_chooser.jsx b/components/user_settings/display/user_settings_theme/premade_theme_chooser/premade_theme_chooser.jsx index c35c68a68ede..45015f113bd8 100644 --- a/components/user_settings/display/user_settings_theme/premade_theme_chooser/premade_theme_chooser.jsx +++ b/components/user_settings/display/user_settings_theme/premade_theme_chooser/premade_theme_chooser.jsx @@ -48,7 +48,7 @@ export default class PremadeThemeChooser extends React.Component {
{Utils.toTitleCase(premadeTheme.type)}
- + , ); } } diff --git a/components/user_settings/display/user_settings_theme/user_settings_theme.jsx b/components/user_settings/display/user_settings_theme/user_settings_theme.jsx index b7c133e62888..660248a98eb8 100644 --- a/components/user_settings/display/user_settings_theme/user_settings_theme.jsx +++ b/components/user_settings/display/user_settings_theme/user_settings_theme.jsx @@ -205,7 +205,7 @@ export default class ThemeSetting extends React.Component { />
- + , ); } @@ -230,7 +230,7 @@ export default class ThemeSetting extends React.Component { defaultMessage='Custom Theme' /> - + , ); inputs.push(custom); @@ -249,7 +249,7 @@ export default class ThemeSetting extends React.Component { defaultMessage='See other themes' /> - + , ); inputs.push( @@ -267,7 +267,7 @@ export default class ThemeSetting extends React.Component { defaultMessage='Import theme colors from Slack' /> - + , ); } diff --git a/components/user_settings/display/user_settings_theme/user_settings_theme.test.jsx b/components/user_settings/display/user_settings_theme/user_settings_theme.test.jsx index 225919534e17..f77b3cfeeb4e 100644 --- a/components/user_settings/display/user_settings_theme/user_settings_theme.test.jsx +++ b/components/user_settings/display/user_settings_theme/user_settings_theme.test.jsx @@ -26,7 +26,7 @@ describe('components/user_settings/display/user_settings_theme/user_settings_the it('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -34,7 +34,7 @@ describe('components/user_settings/display/user_settings_theme/user_settings_the it('should saveTheme', async () => { const wrapper = shallow( - + , ); await wrapper.instance().submitTheme(); @@ -58,7 +58,7 @@ describe('components/user_settings/display/user_settings_theme/user_settings_the }; const wrapper = shallow( - + , ); wrapper.instance().setState({applyToAllTeams: true}); diff --git a/components/user_settings/general/user_settings_general.jsx b/components/user_settings/general/user_settings_general.jsx index 867dcd3a1ea0..86d72abd355d 100644 --- a/components/user_settings/general/user_settings_general.jsx +++ b/components/user_settings/general/user_settings_general.jsx @@ -465,7 +465,7 @@ class UserSettingsGeneralTab extends React.Component { - + , ); inputs.push( @@ -490,7 +490,7 @@ class UserSettingsGeneralTab extends React.Component { /> - + , ); inputs.push( @@ -514,7 +514,7 @@ class UserSettingsGeneralTab extends React.Component { /> - + , ); inputs.push( @@ -538,7 +538,7 @@ class UserSettingsGeneralTab extends React.Component { {helpText} - + , ); submit = this.submitEmail; @@ -558,7 +558,7 @@ class UserSettingsGeneralTab extends React.Component { /> {helpText} - + , ); } else if (this.props.user.auth_service === Constants.GOOGLE_SERVICE) { inputs.push( @@ -576,7 +576,7 @@ class UserSettingsGeneralTab extends React.Component { /> {helpText} - + , ); } else if (this.props.user.auth_service === Constants.OFFICE365_SERVICE) { inputs.push( @@ -594,7 +594,7 @@ class UserSettingsGeneralTab extends React.Component { /> {helpText} - + , ); } else if (this.props.user.auth_service === Constants.LDAP_SERVICE) { inputs.push( @@ -611,7 +611,7 @@ class UserSettingsGeneralTab extends React.Component { }} /> - + , ); } else if (this.props.user.auth_service === Constants.SAML_SERVICE) { inputs.push( @@ -629,7 +629,7 @@ class UserSettingsGeneralTab extends React.Component { /> {helpText} - + , ); } @@ -781,7 +781,7 @@ class UserSettingsGeneralTab extends React.Component { aria-label={formatMessage({id: 'user.settings.general.firstName', defaultMessage: 'First Name'})} /> - + , ); inputs.push( @@ -806,7 +806,7 @@ class UserSettingsGeneralTab extends React.Component { aria-label={formatMessage({id: 'user.settings.general.lastName', defaultMessage: 'Last Name'})} /> - + , ); function notifClick(e) { @@ -933,7 +933,7 @@ class UserSettingsGeneralTab extends React.Component { aria-label={formatMessage({id: 'user.settings.general.nickname', defaultMessage: 'Nickname'})} /> - + , ); extraInfo = ( @@ -1026,7 +1026,7 @@ class UserSettingsGeneralTab extends React.Component { aria-label={formatMessage({id: 'user.settings.general.username', defaultMessage: 'Username'})} /> - + , ); extraInfo = ( @@ -1117,7 +1117,7 @@ class UserSettingsGeneralTab extends React.Component { aria-label={formatMessage({id: 'user.settings.general.position', defaultMessage: 'Position'})} /> - + , ); extraInfo = ( diff --git a/components/user_settings/general/user_settings_general.test.js b/components/user_settings/general/user_settings_general.test.js index 3ea0c2e809d4..70f19404ba12 100644 --- a/components/user_settings/general/user_settings_general.test.js +++ b/components/user_settings/general/user_settings_general.test.js @@ -109,7 +109,7 @@ describe('components/user_settings/general/UserSettingsGeneral', () => { let wrapper = mountWithIntl( - + , ); expect(wrapper.find('#position').length).toBe(1); expect(wrapper.find('#position').is('input')).toBeTruthy(); @@ -120,7 +120,7 @@ describe('components/user_settings/general/UserSettingsGeneral', () => { wrapper = mountWithIntl( - + , ); expect(wrapper.find('#position').length).toBe(0); @@ -131,7 +131,7 @@ describe('components/user_settings/general/UserSettingsGeneral', () => { wrapper = mountWithIntl( - + , ); expect(wrapper.find('#position').length).toBe(0); }); @@ -147,7 +147,7 @@ describe('components/user_settings/general/UserSettingsGeneral', () => { let wrapper = mountWithIntl( - + , ); expect(wrapper.find('.profile-img').exists()).toBeTruthy(); @@ -155,7 +155,7 @@ describe('components/user_settings/general/UserSettingsGeneral', () => { wrapper = mountWithIntl( - + , ); expect(wrapper.find('.profile-img').exists()).toBeFalsy(); }); diff --git a/components/user_settings/modal/user_settings_modal.tsx b/components/user_settings/modal/user_settings_modal.tsx index b58315b6ee13..a9397421d8b5 100644 --- a/components/user_settings/modal/user_settings_modal.tsx +++ b/components/user_settings/modal/user_settings_modal.tsx @@ -8,7 +8,7 @@ import { defineMessages, FormattedMessage, injectIntl, - IntlShape + IntlShape, } from 'react-intl'; import {UserProfile} from 'mattermost-redux/types/users'; @@ -102,7 +102,7 @@ class UserSettingsModal extends React.Component { showConfirmModal: false, enforceFocus: true, show: true, - resendStatus: '' + resendStatus: '', }; this.requireConfirm = false; diff --git a/components/user_settings/notifications/desktop_notification_settings.jsx b/components/user_settings/notifications/desktop_notification_settings.jsx index 1817d18cbf16..33c1f9729801 100644 --- a/components/user_settings/notifications/desktop_notification_settings.jsx +++ b/components/user_settings/notifications/desktop_notification_settings.jsx @@ -192,7 +192,7 @@ export default class DesktopNotificationSettings extends React.Component {
{soundSection} - + , ); return ( diff --git a/components/user_settings/notifications/desktop_notification_settings.test.jsx b/components/user_settings/notifications/desktop_notification_settings.test.jsx index 85214e029ec0..ebc1afcd22aa 100644 --- a/components/user_settings/notifications/desktop_notification_settings.test.jsx +++ b/components/user_settings/notifications/desktop_notification_settings.test.jsx @@ -34,7 +34,7 @@ describe('components/user_settings/notifications/DesktopNotificationSettings', ( test('should match snapshot, on max setting', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -43,7 +43,7 @@ describe('components/user_settings/notifications/DesktopNotificationSettings', ( test('should match snapshot, on min setting', () => { const props = {...baseProps, active: false}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -52,7 +52,7 @@ describe('components/user_settings/notifications/DesktopNotificationSettings', ( test('should call props.updateSection and props.cancel on handleMinUpdateSection', () => { const props = {...baseProps, updateSection: jest.fn(), cancel: jest.fn()}; const wrapper = shallow( - + , ); wrapper.instance().handleMinUpdateSection(''); @@ -71,7 +71,7 @@ describe('components/user_settings/notifications/DesktopNotificationSettings', ( test('should call props.updateSection on handleMaxUpdateSection', () => { const props = {...baseProps, updateSection: jest.fn()}; const wrapper = shallow( - + , ); wrapper.instance().handleMaxUpdateSection(''); @@ -86,7 +86,7 @@ describe('components/user_settings/notifications/DesktopNotificationSettings', ( test('should call props.setParentState on handleOnChange', () => { const props = {...baseProps, setParentState: jest.fn()}; const wrapper = shallow( - + , ); wrapper.instance().handleOnChange({ @@ -101,7 +101,7 @@ describe('components/user_settings/notifications/DesktopNotificationSettings', ( test('should match snapshot, on buildMaximizedSetting', () => { const wrapper = shallow( - + , ); expect(wrapper.instance().buildMaximizedSetting()).toMatchSnapshot(); @@ -112,7 +112,7 @@ describe('components/user_settings/notifications/DesktopNotificationSettings', ( test('should match snapshot, on buildMinimizedSetting', () => { const wrapper = shallow( - + , ); expect(wrapper.instance().buildMinimizedSetting()).toMatchSnapshot(); diff --git a/components/user_settings/notifications/manage_auto_responder.test.jsx b/components/user_settings/notifications/manage_auto_responder.test.jsx index 95096c9174a0..03e20e744a86 100644 --- a/components/user_settings/notifications/manage_auto_responder.test.jsx +++ b/components/user_settings/notifications/manage_auto_responder.test.jsx @@ -31,7 +31,7 @@ describe('components/user_settings/notifications/ManageAutoResponder', () => { + />, ); expect(wrapper).toMatchSnapshot(); @@ -47,7 +47,7 @@ describe('components/user_settings/notifications/ManageAutoResponder', () => { {...requiredProps} autoResponderActive={true} setParentState={setParentState} - /> + />, ); expect(wrapper.find('#autoResponderActive').exists()).toBe(true); diff --git a/components/user_settings/notifications/user_settings_notifications.jsx b/components/user_settings/notifications/user_settings_notifications.jsx index 2c37052dea07..593fe6075d0d 100644 --- a/components/user_settings/notifications/user_settings_notifications.jsx +++ b/components/user_settings/notifications/user_settings_notifications.jsx @@ -26,7 +26,7 @@ function getNotificationsStateFromProps(props) { let autoResponderActive = false; let autoResponderMessage = Utils.localizeMessage( 'user.settings.notifications.autoResponderDefault', - 'Hello, I am out of office and unable to respond to messages.' + 'Hello, I am out of office and unable to respond to messages.', ); if (user.notify_props) { @@ -147,7 +147,7 @@ export default class NotificationsTab extends React.PureComponent { if (!data.auto_responder_message || data.auto_responder_message === '') { data.auto_responder_message = Utils.localizeMessage( 'user.settings.notifications.autoResponderDefault', - 'Hello, I am out of office and unable to respond to messages.' + 'Hello, I am out of office and unable to respond to messages.', ); } @@ -403,7 +403,7 @@ export default class NotificationsTab extends React.PureComponent {
{pushStatusSettings} - + , ); submit = this.handleSubmit; @@ -417,7 +417,7 @@ export default class NotificationsTab extends React.PureComponent { id='user.settings.push_notification.disabled_long' defaultMessage='Push notifications have not been enabled by your System Administrator.' /> - + , ); } @@ -537,7 +537,7 @@ export default class NotificationsTab extends React.PureComponent { /> - + , ); } @@ -563,7 +563,7 @@ export default class NotificationsTab extends React.PureComponent { /> - + , ); const handleUpdateChannelKey = (e) => { @@ -585,7 +585,7 @@ export default class NotificationsTab extends React.PureComponent { /> - + , ); inputs.push( @@ -616,7 +616,7 @@ export default class NotificationsTab extends React.PureComponent { onFocus={Utils.moveCursorToEnd} aria-labelledby='notificationTriggerCustom' /> - + , ); const extraInfo = ( @@ -753,7 +753,7 @@ export default class NotificationsTab extends React.PureComponent { /> - + , ); const extraInfo = ( diff --git a/components/user_settings/security/mfa_section/mfa_section.test.tsx b/components/user_settings/security/mfa_section/mfa_section.test.tsx index aa28f681aee3..839120f84d07 100644 --- a/components/user_settings/security/mfa_section/mfa_section.test.tsx +++ b/components/user_settings/security/mfa_section/mfa_section.test.tsx @@ -104,7 +104,7 @@ describe('MfaSection', () => { const wrapper = mountWithIntl(); const mockEvent = { - preventDefault: jest.fn() + preventDefault: jest.fn(), } as unknown as React.MouseEvent; (wrapper.instance() as MfaSection).setupMfa(mockEvent); @@ -118,7 +118,7 @@ describe('MfaSection', () => { const wrapper = mountWithIntl(); const mockEvent = { - preventDefault: jest.fn() + preventDefault: jest.fn(), } as unknown as React.MouseEvent; wrapper.setState({serverError: 'An error has occurred'}); @@ -139,7 +139,7 @@ describe('MfaSection', () => { const wrapper = mountWithIntl(); const mockEvent = { - preventDefault: jest.fn() + preventDefault: jest.fn(), } as unknown as React.MouseEvent; await (wrapper.instance() as MfaSection).removeMfa(mockEvent); @@ -154,7 +154,7 @@ describe('MfaSection', () => { const wrapper = mountWithIntl(); const mockEvent = { - preventDefault: jest.fn() + preventDefault: jest.fn(), } as unknown as React.MouseEvent; baseProps.actions.deactivateMfa.mockImplementation(() => Promise.resolve({error})); diff --git a/components/user_settings/security/user_access_token_section/user_access_token_section.jsx b/components/user_settings/security/user_access_token_section/user_access_token_section.jsx index 385683e7b3ac..e1f47d78168c 100644 --- a/components/user_settings/security/user_access_token_section/user_access_token_section.jsx +++ b/components/user_settings/security/user_access_token_section/user_access_token_section.jsx @@ -383,7 +383,7 @@ export default class UserAccessTokenSection extends React.Component {
- + , ); }); @@ -546,7 +546,7 @@ export default class UserAccessTokenSection extends React.Component { {newTokenSection} - + , ); return ( diff --git a/components/user_settings/security/user_settings_security.jsx b/components/user_settings/security/user_settings_security.jsx index 8fe5a0c29b72..fa83fc3b65e7 100644 --- a/components/user_settings/security/user_settings_security.jsx +++ b/components/user_settings/security/user_settings_security.jsx @@ -143,7 +143,7 @@ export default class SecurityTab extends React.PureComponent { const {data, error: err} = await this.props.actions.updateUserPassword( user.id, currentPassword, - newPassword + newPassword, ); if (data) { this.props.updateSection(''); @@ -248,7 +248,7 @@ export default class SecurityTab extends React.PureComponent { aria-label={Utils.localizeMessage('user.settings.security.currentPassword', 'Current Password')} /> - + , ); inputs.push(
- + , ); inputs.push(
- + , ); } else if (this.props.user.auth_service === Constants.GITLAB_SERVICE) { inputs.push( @@ -308,7 +308,7 @@ export default class SecurityTab extends React.PureComponent { defaultMessage='Login occurs through GitLab. Password cannot be updated.' /> - + , ); } else if (this.props.user.auth_service === Constants.LDAP_SERVICE) { inputs.push( @@ -322,7 +322,7 @@ export default class SecurityTab extends React.PureComponent { defaultMessage='Login occurs through AD/LDAP. Password cannot be updated.' /> - + , ); } else if (this.props.user.auth_service === Constants.SAML_SERVICE) { inputs.push( @@ -336,7 +336,7 @@ export default class SecurityTab extends React.PureComponent { defaultMessage='This field is handled through your login provider. If you want to change it, you need to do so through your login provider.' /> - + , ); } else if (this.props.user.auth_service === Constants.GOOGLE_SERVICE) { inputs.push( @@ -350,7 +350,7 @@ export default class SecurityTab extends React.PureComponent { defaultMessage='Login occurs through Google Apps. Password cannot be updated.' /> - + , ); } else if (this.props.user.auth_service === Constants.OFFICE365_SERVICE) { inputs.push( @@ -364,7 +364,7 @@ export default class SecurityTab extends React.PureComponent { defaultMessage='Login occurs through Office 365. Password cannot be updated.' /> - + , ); } @@ -597,7 +597,7 @@ export default class SecurityTab extends React.PureComponent { {office365Option} {ldapOption} {samlOption} - + , ); const extraInfo = ( @@ -759,7 +759,7 @@ export default class SecurityTab extends React.PureComponent { key='authorizedApps' > {apps} - + , ); const title = ( diff --git a/components/user_settings/sidebar/index.ts b/components/user_settings/sidebar/index.ts index a05f2dae08f1..092a0977f048 100644 --- a/components/user_settings/sidebar/index.ts +++ b/components/user_settings/sidebar/index.ts @@ -20,14 +20,14 @@ function mapStateToProps(state: GlobalState) { state, Preferences.CATEGORY_SIDEBAR_SETTINGS, 'close_unused_direct_messages', - 'after_seven_days' + 'after_seven_days', ); const channelSwitcherOption = getPreference( state, Preferences.CATEGORY_SIDEBAR_SETTINGS, 'channel_switcher_section', - 'true' + 'true', ); const channelSidebarOrganizationOption = getNewSidebarPreference(state); diff --git a/components/user_settings/sidebar/user_settings_sidebar.tsx b/components/user_settings/sidebar/user_settings_sidebar.tsx index 4e9083ddb859..da6a11b299d1 100644 --- a/components/user_settings/sidebar/user_settings_sidebar.tsx +++ b/components/user_settings/sidebar/user_settings_sidebar.tsx @@ -147,7 +147,7 @@ export default class UserSettingsSidebar extends React.Component + />, ); } else { messages.push( @@ -373,7 +373,7 @@ export default class UserSettingsSidebar extends React.Component + />, ); } @@ -388,7 +388,7 @@ export default class UserSettingsSidebar extends React.Component{', '} + {', '}, ); messages.push( @@ -396,7 +396,7 @@ export default class UserSettingsSidebar extends React.Component + />, ); let atTopId: string | null = null; @@ -414,7 +414,7 @@ export default class UserSettingsSidebar extends React.Component +
, ); messages.push( @@ -422,7 +422,7 @@ export default class UserSettingsSidebar extends React.Component + />, ); } @@ -602,7 +602,7 @@ export default class UserSettingsSidebar extends React.Component - + , ); inputs.push(
); @@ -651,7 +651,7 @@ export default class UserSettingsSidebar extends React.Component - + , ); inputs.push(
); @@ -678,7 +678,7 @@ export default class UserSettingsSidebar extends React.Component - + , ); inputs.push(
); @@ -706,7 +706,7 @@ export default class UserSettingsSidebar extends React.Component - + , ); contents = ( diff --git a/components/view_image/image_preview.test.jsx b/components/view_image/image_preview.test.jsx index 7c9b229d72e1..4838933a46f4 100644 --- a/components/view_image/image_preview.test.jsx +++ b/components/view_image/image_preview.test.jsx @@ -16,7 +16,7 @@ describe('components/view_image/ImagePreview', () => { test('should match snapshot, without preview', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -32,7 +32,7 @@ describe('components/view_image/ImagePreview', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -45,7 +45,7 @@ describe('components/view_image/ImagePreview', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -62,7 +62,7 @@ describe('components/view_image/ImagePreview', () => { }; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); @@ -70,7 +70,7 @@ describe('components/view_image/ImagePreview', () => { test('should download link for internal file', () => { const wrapper = shallow( - + , ); expect(wrapper.find('a').prop('download')).toBe(true); @@ -85,7 +85,7 @@ describe('components/view_image/ImagePreview', () => { }; const wrapper = shallow( - + , ); expect(wrapper.find('a').prop('download')).toBe(false); diff --git a/components/view_image/popover_bar/popover_bar.test.jsx b/components/view_image/popover_bar/popover_bar.test.jsx index de9e940f3595..f9f79c9115dd 100644 --- a/components/view_image/popover_bar/popover_bar.test.jsx +++ b/components/view_image/popover_bar/popover_bar.test.jsx @@ -59,7 +59,7 @@ describe('components/view_image/popover_bar/PopoverBar', () => { + />, ); expect(wrapper.find('a').prop('download')).toBeUndefined(); @@ -70,7 +70,7 @@ describe('components/view_image/popover_bar/PopoverBar', () => { + />, ); expect(wrapper.find('a').prop('download')).toBe(props.filename); diff --git a/components/view_image/view_image.jsx b/components/view_image/view_image.jsx index 6837f65082b1..d724a1f631ca 100644 --- a/components/view_image/view_image.jsx +++ b/components/view_image/view_image.jsx @@ -159,7 +159,7 @@ export default class ViewImageModal extends React.PureComponent { Utils.loadImage( previewUrl, () => this.handleImageLoaded(index), - (completedPercentage) => this.handleImageProgress(index, completedPercentage) + (completedPercentage) => this.handleImageProgress(index, completedPercentage), ); } else { // there's nothing to load for non-image files diff --git a/components/widgets/admin_console/admin_console.stories.js b/components/widgets/admin_console/admin_console.stories.js index 56e3b7743704..e9ba6ee37e2d 100644 --- a/components/widgets/admin_console/admin_console.stories.js +++ b/components/widgets/admin_console/admin_console.stories.js @@ -37,7 +37,7 @@ storiesOf('Admin Console', module). {content} ); - } + }, ). add( 'admin panel with button', @@ -64,7 +64,7 @@ storiesOf('Admin Console', module). {content} ); - } + }, ). add( 'admin panel with link', @@ -91,7 +91,7 @@ storiesOf('Admin Console', module). {content} ); - } + }, ). add( 'togglable admin panel', @@ -115,7 +115,7 @@ storiesOf('Admin Console', module). ); }; return ; - } + }, ). add( 'admin header', @@ -124,7 +124,7 @@ storiesOf('Admin Console', module). return ( {title} ); - } + }, ). add( 'formatted admin header', @@ -136,5 +136,5 @@ storiesOf('Admin Console', module). defaultMessage={markdown} /> ); - } + }, ); diff --git a/components/widgets/admin_console/admin_header.test.tsx b/components/widgets/admin_console/admin_header.test.tsx index 7823cb3c03d5..4487bb90e3da 100644 --- a/components/widgets/admin_console/admin_header.test.tsx +++ b/components/widgets/admin_console/admin_header.test.tsx @@ -17,7 +17,7 @@ describe('components/widgets/admin_console/AdminHeader', () => { > Test -` +`, ); }); }); \ No newline at end of file diff --git a/components/widgets/admin_console/admin_panel.test.tsx b/components/widgets/admin_console/admin_panel.test.tsx index 4eebd681a63d..39530fe9c9fc 100644 --- a/components/widgets/admin_console/admin_panel.test.tsx +++ b/components/widgets/admin_console/admin_panel.test.tsx @@ -52,7 +52,7 @@ describe('components/widgets/admin_console/AdminPanel', () => { Test -` +`, ); }); @@ -104,7 +104,7 @@ describe('components/widgets/admin_console/AdminPanel', () => { Test -` +`, ); }); @@ -150,7 +150,7 @@ describe('components/widgets/admin_console/AdminPanel', () => { Test -` +`, ); }); }); diff --git a/components/widgets/admin_console/admin_panel_togglable.test.tsx b/components/widgets/admin_console/admin_panel_togglable.test.tsx index 45832a9bda8f..9cda29de4bd6 100644 --- a/components/widgets/admin_console/admin_panel_togglable.test.tsx +++ b/components/widgets/admin_console/admin_panel_togglable.test.tsx @@ -33,7 +33,7 @@ describe('components/widgets/admin_console/AdminPanelTogglable', () => { > Test -` +`, ); }); @@ -58,7 +58,7 @@ describe('components/widgets/admin_console/AdminPanelTogglable', () => { > Test -` +`, ); }); }); diff --git a/components/widgets/admin_console/admin_panel_with_button.test.tsx b/components/widgets/admin_console/admin_panel_with_button.test.tsx index 691e4afd7eac..10f1ce7893d7 100644 --- a/components/widgets/admin_console/admin_panel_with_button.test.tsx +++ b/components/widgets/admin_console/admin_panel_with_button.test.tsx @@ -24,7 +24,7 @@ describe('components/widgets/admin_console/AdminPanelWithButton', () => { const wrapper = shallow( {'Test'} - + , ); expect(wrapper).toMatchInlineSnapshot(` { > Test -` +`, ); }); @@ -61,7 +61,7 @@ describe('components/widgets/admin_console/AdminPanelWithButton', () => { disabled={true} > {'Test'} - + , ); expect(wrapper).toMatchInlineSnapshot(` { > Test -` +`, ); }); }); diff --git a/components/widgets/admin_console/admin_panel_with_link.test.tsx b/components/widgets/admin_console/admin_panel_with_link.test.tsx index f634c21e6c06..317ddeb39de8 100644 --- a/components/widgets/admin_console/admin_panel_with_link.test.tsx +++ b/components/widgets/admin_console/admin_panel_with_link.test.tsx @@ -24,7 +24,7 @@ describe('components/widgets/admin_console/AdminPanelWithLink', () => { const wrapper = shallow( {'Test'} - + , ); expect(wrapper).toMatchInlineSnapshot(` { > Test -` +`, ); }); @@ -63,7 +63,7 @@ describe('components/widgets/admin_console/AdminPanelWithLink', () => { disabled={true} > {'Test'} - + , ); expect(wrapper).toMatchInlineSnapshot(` { > Test -` +`, ); }); }); diff --git a/components/widgets/admin_console/formatted_admin_header.test.tsx b/components/widgets/admin_console/formatted_admin_header.test.tsx index 1968c0edbfde..51f984ef610b 100644 --- a/components/widgets/admin_console/formatted_admin_header.test.tsx +++ b/components/widgets/admin_console/formatted_admin_header.test.tsx @@ -12,7 +12,7 @@ describe('components/widgets/admin_console/FormattedAdminHeader', () => { + />, ); expect(wrapper).toMatchInlineSnapshot(` @@ -22,7 +22,7 @@ describe('components/widgets/admin_console/FormattedAdminHeader', () => { values={Object {}} /> -` +`, ); }); @@ -34,7 +34,7 @@ describe('components/widgets/admin_console/FormattedAdminHeader', () => { values={{ a_key: 'a_value', }} - /> + />, ); expect(wrapper).toMatchInlineSnapshot(` @@ -48,7 +48,7 @@ describe('components/widgets/admin_console/FormattedAdminHeader', () => { } /> -` +`, ); }); }); diff --git a/components/widgets/badges/badge.test.tsx b/components/widgets/badges/badge.test.tsx index c70ae661b076..c6351dadca1b 100644 --- a/components/widgets/badges/badge.test.tsx +++ b/components/widgets/badges/badge.test.tsx @@ -9,7 +9,7 @@ import Badge from './badge'; describe('components/widgets/badges/Badge', () => { test('should match the snapshot on show', () => { const wrapper = shallow( - {'Test text'} + {'Test text'}, ); expect(wrapper).toMatchInlineSnapshot(`
{ test('should match the snapshot on hide', () => { const wrapper = shallow( - {'Test text'} + {'Test text'}, ); expect(wrapper).toMatchInlineSnapshot('""'); }); diff --git a/components/widgets/badges/badges.stories.js b/components/widgets/badges/badges.stories.js index 58b85cacc561..00ca5c71db6c 100644 --- a/components/widgets/badges/badges.stories.js +++ b/components/widgets/badges/badges.stories.js @@ -17,7 +17,7 @@ storiesOf('Badges', module). () => { const content = text('Text', 'BADGE'); return ({content}); - } + }, ). add( 'guest badge', diff --git a/components/widgets/badges/bot_badge.test.tsx b/components/widgets/badges/bot_badge.test.tsx index 43c6ac6472a3..89ad50050efa 100644 --- a/components/widgets/badges/bot_badge.test.tsx +++ b/components/widgets/badges/bot_badge.test.tsx @@ -9,7 +9,7 @@ import BotBadge from './bot_badge'; describe('components/widgets/badges/BotBadge', () => { test('should match the snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchInlineSnapshot(` { test('should match the snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchInlineSnapshot(` { {id: 'test-channel-1', type: 'O', display_name: 'test channel 1'}, {id: 'test-channel-2', type: 'P', display_name: 'test channel 2'}, ]} - /> + />, ); expect(wrapper).toMatchInlineSnapshot(` ); - } + }, ). add( 'users emails input', @@ -107,5 +107,5 @@ storiesOf('Inputs', module). return ( ); - } + }, ); diff --git a/components/widgets/inputs/users_emails_input.test.jsx b/components/widgets/inputs/users_emails_input.test.jsx index f1cd52f8f424..0bb20f6ef922 100644 --- a/components/widgets/inputs/users_emails_input.test.jsx +++ b/components/widgets/inputs/users_emails_input.test.jsx @@ -15,7 +15,7 @@ describe('components/widgets/inputs/UsersEmailsInput', () => { usersLoader={jest.fn()} onChange={jest.fn()} value={['test@email.com', {id: 'test-user-id', username: 'test-username', first_name: 'test', last_name: 'user'}]} - /> + />, ); expect(wrapper).toMatchInlineSnapshot(` (), ). add('LoadingSpinner with text', - () => + () => , ). add('loadingWrapper', () => { const LoadingExample = () => { diff --git a/components/widgets/loading/loading_wrapper.test.tsx b/components/widgets/loading/loading_wrapper.test.tsx index 4bf4d074972e..64c9ef0cfebb 100644 --- a/components/widgets/loading/loading_wrapper.test.tsx +++ b/components/widgets/loading/loading_wrapper.test.tsx @@ -49,7 +49,7 @@ describe('components/widgets/loading/LoadingWrapper', () => { text={testCase.text} > {testCase.children} - + , ); expect(wrapper).toMatchInlineSnapshot(testCase.snapshot, '""'); }); diff --git a/components/widgets/menu/menu.stories.tsx b/components/widgets/menu/menu.stories.tsx index 9d02a688fd99..5420470d4253 100644 --- a/components/widgets/menu/menu.stories.tsx +++ b/components/widgets/menu/menu.stories.tsx @@ -58,7 +58,7 @@ storiesOf('Menus', module).
); - } + }, ). add( 'menu with groups', @@ -107,7 +107,7 @@ storiesOf('Menus', module). ); - } + }, ). add( 'Content with a menu', @@ -159,5 +159,5 @@ storiesOf('Menus', module). ); - } + }, ); diff --git a/components/widgets/menu/menu.test.tsx b/components/widgets/menu/menu.test.tsx index d1adf18ce0f0..1589ce2ed5b0 100644 --- a/components/widgets/menu/menu.test.tsx +++ b/components/widgets/menu/menu.test.tsx @@ -47,7 +47,7 @@ describe('components/Menu', () => { ariaLabel='test-label' > {'text'} - + , ); expect(wrapper).toMatchInlineSnapshot(` @@ -79,7 +79,7 @@ describe('components/Menu', () => { ariaLabel='test-label' > {'text'} - + , ); expect(wrapper).toMatchInlineSnapshot(` @@ -110,7 +110,7 @@ describe('components/Menu', () => { ariaLabel='test-label' > {'text'} - + , ); expect(wrapper).toMatchInlineSnapshot(` diff --git a/components/widgets/menu/menu_items/menu_item.test.tsx b/components/widgets/menu/menu_items/menu_item.test.tsx index ee0a67aa6bcb..a293757ba242 100644 --- a/components/widgets/menu/menu_items/menu_item.test.tsx +++ b/components/widgets/menu/menu_items/menu_item.test.tsx @@ -19,7 +19,7 @@ describe('components/MenuItem', () => { test('should match snapshot not shown', () => { const props = {...defaultProps, show: false}; const wrapper = shallow( - + , ); expect(wrapper).toMatchInlineSnapshot('""'); @@ -28,7 +28,7 @@ describe('components/MenuItem', () => { test('should match snapshot shown with icon', () => { const props = {...defaultProps, icon: 'test-icon'}; const wrapper = shallow( - + , ); expect(wrapper).toMatchInlineSnapshot(` @@ -56,7 +56,7 @@ describe('components/MenuItem', () => { test('should match snapshot shown without icon', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchInlineSnapshot(` diff --git a/components/widgets/menu/menu_items/menu_item_action.test.tsx b/components/widgets/menu/menu_items/menu_item_action.test.tsx index 46acdef60e33..15a5d8915fb3 100644 --- a/components/widgets/menu/menu_items/menu_item_action.test.tsx +++ b/components/widgets/menu/menu_items/menu_item_action.test.tsx @@ -12,7 +12,7 @@ describe('components/MenuItemAction', () => { + />, ); expect(wrapper).toMatchInlineSnapshot(` @@ -34,7 +34,7 @@ describe('components/MenuItemAction', () => { onClick={jest.fn()} text='Whatever' extraText='Extra Text' - /> + />, ); expect(wrapper).toMatchInlineSnapshot(` diff --git a/components/widgets/menu/menu_items/menu_item_external_link.test.tsx b/components/widgets/menu/menu_items/menu_item_external_link.test.tsx index 9f9b4ee1446d..d28eba703ec7 100644 --- a/components/widgets/menu/menu_items/menu_item_external_link.test.tsx +++ b/components/widgets/menu/menu_items/menu_item_external_link.test.tsx @@ -12,7 +12,7 @@ describe('components/MenuItemExternalLink', () => { + />, ); expect(wrapper).toMatchInlineSnapshot(` diff --git a/components/widgets/menu/menu_items/menu_item_link.test.tsx b/components/widgets/menu/menu_items/menu_item_link.test.tsx index e5674e31d696..724f5d71d831 100644 --- a/components/widgets/menu/menu_items/menu_item_link.test.tsx +++ b/components/widgets/menu/menu_items/menu_item_link.test.tsx @@ -12,7 +12,7 @@ describe('components/MenuItemLink', () => { + />, ); expect(wrapper).toMatchInlineSnapshot(` diff --git a/components/widgets/menu/menu_items/menu_item_toggle_modal_redux.test.tsx b/components/widgets/menu/menu_items/menu_item_toggle_modal_redux.test.tsx index f334398d085d..aacf858efddd 100644 --- a/components/widgets/menu/menu_items/menu_item_toggle_modal_redux.test.tsx +++ b/components/widgets/menu/menu_items/menu_item_toggle_modal_redux.test.tsx @@ -14,7 +14,7 @@ describe('components/MenuItemToggleModalRedux', () => { dialogType={jest.fn()} dialogProps={{test: 'test'}} text='Whatever' - /> + />, ); expect(wrapper).toMatchInlineSnapshot(` @@ -45,7 +45,7 @@ describe('components/MenuItemToggleModalRedux', () => { dialogProps={{test: 'test'}} text='Whatever' extraText='Extra text' - /> + />, ); expect(wrapper).toMatchSnapshot(); diff --git a/components/widgets/menu/menu_items/submenu_item.test.tsx b/components/widgets/menu/menu_items/submenu_item.test.tsx index 6b72bf88493c..982627ad2e60 100644 --- a/components/widgets/menu/menu_items/submenu_item.test.tsx +++ b/components/widgets/menu/menu_items/submenu_item.test.tsx @@ -16,7 +16,7 @@ describe('components/widgets/menu/menu_items/submenu_item', () => { subMenu={[]} action={jest.fn()} root={true} - /> + />, ); expect(wrapper.html()).toEqual(''); }); @@ -38,7 +38,7 @@ describe('components/widgets/menu/menu_items/submenu_item', () => { ]} action={jest.fn()} root={true} - /> + />, ); expect(wrapper.html()).toEqual(''); }); @@ -65,7 +65,7 @@ describe('components/widgets/menu/menu_items/submenu_item', () => { ]} action={action1} root={true} - /> + />, ); wrapper.setState({show: true}); wrapper.find('#Z').at(1).simulate('click'); diff --git a/components/widgets/menu/menu_modals/submenu_modal/submenu_modal.test.tsx b/components/widgets/menu/menu_modals/submenu_modal/submenu_modal.test.tsx index 195b9171ae63..3f51e894587a 100644 --- a/components/widgets/menu/menu_modals/submenu_modal/submenu_modal.test.tsx +++ b/components/widgets/menu/menu_modals/submenu_modal/submenu_modal.test.tsx @@ -43,14 +43,14 @@ describe('components/submenu_modal', () => { test('should match snapshot', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); test('should match state when onHide is called', () => { const wrapper = shallow( - + , ); wrapper.setState({show: true}); @@ -64,7 +64,7 @@ describe('components/submenu_modal', () => { ...baseProps, }; const wrapper = mount( - + , ); wrapper.setState({show: true}); @@ -87,7 +87,7 @@ describe('components/submenu_modal', () => { const onHide = jest.fn(); const props = {...baseProps, onHide}; const wrapper = shallow( - + , ); wrapper.find(Modal).props().onExited!(document.createElement('div')); diff --git a/components/widgets/menu/menu_wrapper.test.tsx b/components/widgets/menu/menu_wrapper.test.tsx index c8762b1aa18e..5fb52673fc53 100644 --- a/components/widgets/menu/menu_wrapper.test.tsx +++ b/components/widgets/menu/menu_wrapper.test.tsx @@ -12,7 +12,7 @@ describe('components/MenuWrapper', () => {

{'title'}

{'menu'}

-
+ , ); expect(wrapper).toMatchInlineSnapshot(` @@ -39,7 +39,7 @@ describe('components/MenuWrapper', () => {

{'title'}

{'menu'}

-
+ , ); wrapper.setState({open: true}); expect(wrapper).toMatchInlineSnapshot(` @@ -66,7 +66,7 @@ describe('components/MenuWrapper', () => {

{'title'}

{'menu'}

-
+ , ); expect(wrapper.state('open')).toBe(false); wrapper.simulate('click'); @@ -83,7 +83,7 @@ describe('components/MenuWrapper', () => { shallow(

{'title'}

-
+ , ); }).toThrow(); expect(() => { @@ -92,7 +92,7 @@ describe('components/MenuWrapper', () => {

{'title1'}

{'title2'}

{'title3'}

- + , ); }).toThrow(); }); diff --git a/components/widgets/modals/full_screen_modal.test.tsx b/components/widgets/modals/full_screen_modal.test.tsx index 99796c826512..6c72e4f12ccc 100644 --- a/components/widgets/modals/full_screen_modal.test.tsx +++ b/components/widgets/modals/full_screen_modal.test.tsx @@ -16,7 +16,7 @@ describe('components/widgets/modals/FullScreenModal', () => { ariaLabel='test' > {'test'} - + , ); expect(wrapper).toMatchInlineSnapshot(` { ariaLabel='test' > {'test'} - + , ); expect(wrapper).toMatchInlineSnapshot(` { ariaLabel='test' > {'test'} - + , ); expect(wrapper).toMatchInlineSnapshot(` { ariaLabel='test' > {'test'} - + , ); expect(close).not.toBeCalled(); wrapper.find('button.close-x').simulate('click'); @@ -189,7 +189,7 @@ describe('components/widgets/modals/FullScreenModal', () => { ariaLabel='test' > {'test'} - + , ); expect(back).not.toBeCalled(); wrapper.find('button.back').simulate('click'); @@ -205,7 +205,7 @@ describe('components/widgets/modals/FullScreenModal', () => { ariaLabel='test' > {'test'} - + , ); expect(close).not.toBeCalled(); const event = new KeyboardEvent('keydown', {key: 'Escape'}); diff --git a/components/widgets/popover/index.tsx b/components/widgets/popover/index.tsx index 5932d45bbaa1..e1f878dd204d 100644 --- a/components/widgets/popover/index.tsx +++ b/components/widgets/popover/index.tsx @@ -24,7 +24,7 @@ export default class Popover extends React.PureComponent { static defaultProps = { placement: 'right', popoverStyle: 'info', - popoverSize: 'sm' + popoverSize: 'sm', } render() { diff --git a/components/widgets/popover/popover.test.tsx b/components/widgets/popover/popover.test.tsx index aefd530dff2d..12a8299ea587 100644 --- a/components/widgets/popover/popover.test.tsx +++ b/components/widgets/popover/popover.test.tsx @@ -11,7 +11,7 @@ describe('components/widgets/popover', () => { const wrapper = shallow( {'Some text'} - + , ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/widgets/separator/separator.stories.js b/components/widgets/separator/separator.stories.js index 02f9f4f8b823..8aa474345faa 100644 --- a/components/widgets/separator/separator.stories.js +++ b/components/widgets/separator/separator.stories.js @@ -15,12 +15,12 @@ storiesOf('Separator', module). 'basic separator without text', () => { return (); - } + }, ).add( 'basic separator with text', () => { return ({text('Text', 'Some text')}); - } + }, ).add( 'notification separator with text', () => { @@ -29,5 +29,5 @@ storiesOf('Separator', module). {text('Text', 'Some text')} ); - } + }, ); diff --git a/components/widgets/separator/separator.test.tsx b/components/widgets/separator/separator.test.tsx index f7824fe9b0e1..365117de7943 100644 --- a/components/widgets/separator/separator.test.tsx +++ b/components/widgets/separator/separator.test.tsx @@ -12,7 +12,7 @@ describe('components/widgets/separator', () => { const wrapper = shallow( {'Some text'} - + , ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/widgets/settings/bool_setting.test.tsx b/components/widgets/settings/bool_setting.test.tsx index 3c7c95f0c590..b974daff2b71 100644 --- a/components/widgets/settings/bool_setting.test.tsx +++ b/components/widgets/settings/bool_setting.test.tsx @@ -13,7 +13,7 @@ describe('components/widgets/settings/BoolSetting', () => { label='some label' value={true} placeholder='Text aligned with checkbox' - /> + />, ); expect(wrapper).toMatchInlineSnapshot(` { value={true} placeholder='Text aligned with checkbox' onChange={onChange} - /> + />, ); wrapper.find('input').simulate('change', {target: {checked: true}}); diff --git a/components/widgets/settings/radio_setting.test.tsx b/components/widgets/settings/radio_setting.test.tsx index 222ce96f75d7..2ff16f10ee5e 100644 --- a/components/widgets/settings/radio_setting.test.tsx +++ b/components/widgets/settings/radio_setting.test.tsx @@ -19,7 +19,7 @@ describe('components/widgets/settings/RadioSetting', () => { ]} value={'Sales'} onChange={onChange} - /> + />, ); expect(wrapper).toMatchInlineSnapshot(` { ]} value={'Sales'} onChange={onChange} - /> + />, ); wrapper.find('input').at(0).simulate('change', {target: {value: 'Administration'}}); diff --git a/components/widgets/settings/text_setting.test.tsx b/components/widgets/settings/text_setting.test.tsx index d18ec341eb6a..3d808bfe32c1 100644 --- a/components/widgets/settings/text_setting.test.tsx +++ b/components/widgets/settings/text_setting.test.tsx @@ -14,7 +14,7 @@ describe('components/widgets/settings/TextSetting', () => { label='some label' value='some value' onChange={onChange} - /> + />, ); expect(wrapper).toMatchInlineSnapshot(` { value='some value' type='textarea' onChange={onChange} - /> + />, ); expect(wrapper).toMatchInlineSnapshot(` { label='some label' value='some value' onChange={onChange} - /> + />, ); wrapper.find('input').simulate('change', {target: {value: 'somenewvalue'}}); diff --git a/components/widgets/team_icon/team_icon.stories.js b/components/widgets/team_icon/team_icon.stories.js index 04462a063c0c..3779e41142a5 100644 --- a/components/widgets/team_icon/team_icon.stories.js +++ b/components/widgets/team_icon/team_icon.stories.js @@ -22,7 +22,7 @@ storiesOf('Team Icon', module). size={sizeKnob()} /> ); - } + }, ).add( 'logo', () => { @@ -34,5 +34,5 @@ storiesOf('Team Icon', module). size={sizeKnob()} /> ); - } + }, ); diff --git a/components/widgets/team_icon/team_icon.test.tsx b/components/widgets/team_icon/team_icon.test.tsx index c9c508c99a7a..c6ded7aff9c9 100644 --- a/components/widgets/team_icon/team_icon.test.tsx +++ b/components/widgets/team_icon/team_icon.test.tsx @@ -9,7 +9,7 @@ import TeamIcon from './team_icon'; describe('components/widgets/team-icon', () => { test('basic icon', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -18,7 +18,7 @@ describe('components/widgets/team-icon', () => { + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -27,7 +27,7 @@ describe('components/widgets/team-icon', () => { + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -36,7 +36,7 @@ describe('components/widgets/team-icon', () => { + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/components/widgets/users/avatar.test.tsx b/components/widgets/users/avatar.test.tsx index 80a6233388ec..35f5c1ee4679 100644 --- a/components/widgets/users/avatar.test.tsx +++ b/components/widgets/users/avatar.test.tsx @@ -13,7 +13,7 @@ describe('components/widgets/users/Avatar', () => { url='test-url' username='test-username' size='xl' - /> + />, ); expect(wrapper).toMatchInlineSnapshot(` { test('should match the snapshot only with url', () => { const wrapper = shallow( - + , ); expect(wrapper).toMatchInlineSnapshot(` ); - } + }, ); diff --git a/e2e/cypress/extensions/Ignore-X-Frame-headers/background.js b/e2e/cypress/extensions/Ignore-X-Frame-headers/background.js index 5d2c16f8ca35..76ee2d9e08c3 100644 --- a/e2e/cypress/extensions/Ignore-X-Frame-headers/background.js +++ b/e2e/cypress/extensions/Ignore-X-Frame-headers/background.js @@ -14,8 +14,8 @@ chrome.webRequest.onHeadersReceived.addListener( return { responseHeaders: details.responseHeaders.filter((header) => { return HEADERS_TO_STRIP_LOWERCASE.indexOf(header.name.toLowerCase()) < 0; - }) + }), }; }, { - urls: [''] + urls: [''], }, ['blocking', 'responseHeaders']); diff --git a/e2e/cypress/integration/account_settings/display/theme/custom_theme_color_picker_spec.js b/e2e/cypress/integration/account_settings/display/theme/custom_theme_color_picker_spec.js index 9830e33d933c..63167a2e5c86 100644 --- a/e2e/cypress/integration/account_settings/display/theme/custom_theme_color_picker_spec.js +++ b/e2e/cypress/integration/account_settings/display/theme/custom_theme_color_picker_spec.js @@ -45,7 +45,7 @@ describe('AS14318 Theme Colors - Color Picker', () => { '#sidebarBg-ChromePickerModal', '#sidebarBg-squareColorIconValue', '#bb123e', - 'rgb(187, 18, 62)' + 'rgb(187, 18, 62)', ); }); @@ -57,7 +57,7 @@ describe('AS14318 Theme Colors - Color Picker', () => { '#centerChannelBg-ChromePickerModal', '#centerChannelBg-squareColorIconValue', '#ff8800', - 'rgb(255, 136, 0)' + 'rgb(255, 136, 0)', ); }); @@ -69,7 +69,7 @@ describe('AS14318 Theme Colors - Color Picker', () => { '#linkColor-ChromePickerModal', '#linkColor-squareColorIconValue', '#ffe577', - 'rgb(255, 229, 119)' + 'rgb(255, 229, 119)', ); }); }); diff --git a/e2e/cypress/integration/channel/channel_name_tooltips_spec.js b/e2e/cypress/integration/channel/channel_name_tooltips_spec.js index ccd86c03daf8..38a3d1c6dbf0 100644 --- a/e2e/cypress/integration/channel/channel_name_tooltips_spec.js +++ b/e2e/cypress/integration/channel/channel_name_tooltips_spec.js @@ -75,7 +75,7 @@ describe('channel name tooltips', () => { cy.apiCreateChannel( team.id, 'channel-test', - `Public channel with a long name-${timestamp}` + `Public channel with a long name-${timestamp}`, ).then((res) => { verifyChannel(res); }); @@ -87,7 +87,7 @@ describe('channel name tooltips', () => { team.id, 'channel-test', `Private channel with a long name-${timestamp}`, - 'P' + 'P', ).then((res) => { verifyChannel(res); }); @@ -110,7 +110,7 @@ describe('channel name tooltips', () => { team.id, 'channel-test', 'Private channel', - 'P' + 'P', ).then((res) => { verifyChannel(res, false); }); diff --git a/e2e/cypress/integration/channel/user_to_channel_admin_member_updates_manage_channel_members_modal_spec.js b/e2e/cypress/integration/channel/user_to_channel_admin_member_updates_manage_channel_members_modal_spec.js index dfdb06eed252..9ff1851d3b7b 100644 --- a/e2e/cypress/integration/channel/user_to_channel_admin_member_updates_manage_channel_members_modal_spec.js +++ b/e2e/cypress/integration/channel/user_to_channel_admin_member_updates_manage_channel_members_modal_spec.js @@ -24,7 +24,7 @@ const demoteToChannelMember = (user, channelId) => { data: { scheme_user: true, scheme_admin: false, - } + }, }); }; @@ -36,7 +36,7 @@ const promoteToChannelAdmin = (user, channelId) => { data: { scheme_user: true, scheme_admin: true, - } + }, }); }; diff --git a/e2e/cypress/integration/emoji/react_to_last_message_shortcut_spec.js b/e2e/cypress/integration/emoji/react_to_last_message_shortcut_spec.js index 6ab08b2bcb77..d257bebb29e0 100644 --- a/e2e/cypress/integration/emoji/react_to_last_message_shortcut_spec.js +++ b/e2e/cypress/integration/emoji/react_to_last_message_shortcut_spec.js @@ -158,7 +158,7 @@ describe('Keyboard shortcut for adding reactions to last message in channel or t cy.get(`#${lastPostId}_message`).within(() => { cy.findByLabelText('reactions').should('not.exist'); cy.findByLabelText('remove reaction smile').should( - 'not.exist' + 'not.exist', ); }); }); @@ -257,7 +257,7 @@ describe('Keyboard shortcut for adding reactions to last message in channel or t cy.postMessageAs({ sender: users['user-2'], message: MESSAGES.TINY, - channelId + channelId, }); cy.wait(TIMEOUTS.SMALL); @@ -298,7 +298,7 @@ describe('Keyboard shortcut for adding reactions to last message in channel or t cy.postMessageAs({ sender: users['user-2'], message: MESSAGES.MEDIUM, - channelId + channelId, }); cy.wait(TIMEOUTS.SMALL); @@ -352,7 +352,7 @@ describe('Keyboard shortcut for adding reactions to last message in channel or t cy.postMessageAs({ sender: users['user-2'], message: MESSAGES.MEDIUM, - channelId + channelId, }); cy.wait(TIMEOUTS.SMALL); @@ -612,7 +612,7 @@ function pressShortcutReactToLastMessage(from) { cmdOrCtrlShortcut('{shift}\\'); } else { cy.get('body', {timeout: TIMEOUTS.LARGE}).cmdOrCtrlShortcut( - '{shift}\\' + '{shift}\\', ); } cy.wait(TIMEOUTS.TINY); diff --git a/e2e/cypress/integration/enterprise/elasticsearch_autocomplete/helpers/index.js b/e2e/cypress/integration/enterprise/elasticsearch_autocomplete/helpers/index.js index 2572ffa406ca..4b2bd7af6276 100644 --- a/e2e/cypress/integration/enterprise/elasticsearch_autocomplete/helpers/index.js +++ b/e2e/cypress/integration/enterprise/elasticsearch_autocomplete/helpers/index.js @@ -233,5 +233,5 @@ module.exports = { cy.wrap(name).find('.mention--align').should('have.text', `@${user.username}`); cy.wrap(name).find('.ml-2').should('have.text', `${user.firstName} ${user.lastName} (${user.nickname})`); }); - } + }, }; diff --git a/e2e/cypress/integration/enterprise/ldap/ldap_login_spec.js b/e2e/cypress/integration/enterprise/ldap/ldap_login_spec.js index bcaceae551ac..e650fe9f76fd 100644 --- a/e2e/cypress/integration/enterprise/ldap/ldap_login_spec.js +++ b/e2e/cypress/integration/enterprise/ldap/ldap_login_spec.js @@ -18,7 +18,7 @@ function setLDAPTestSettings(config) { siteName: config.TeamSettings.SiteName, siteUrl: config.ServiceSettings.SiteURL, teamName: '', - user: null + user: null, }; } @@ -68,10 +68,10 @@ context('ldap', () => { LoginButtonColor: '#0000', LoginButtonBorderColor: '#2389D7', LoginButtonTextColor: '#2389D7', - Trace: false + Trace: false, }, GuestAccountsSettings: { - Enable: true + Enable: true, }, }; diff --git a/e2e/cypress/integration/enterprise/saml/okta_login_spec.js b/e2e/cypress/integration/enterprise/saml/okta_login_spec.js index edc74e345aad..44c88e23a131 100644 --- a/e2e/cypress/integration/enterprise/saml/okta_login_spec.js +++ b/e2e/cypress/integration/enterprise/saml/okta_login_spec.js @@ -26,7 +26,7 @@ context('Okta', () => { const { oktaBaseUrl, oktaMMAppName, - oktaMMEntityId + oktaMMEntityId, } = Cypress.env(); const idpUrl = `${oktaBaseUrl}/app/${oktaMMAppName}/${oktaMMEntityId}/sso/saml`; const idpMetadataUrl = `${oktaBaseUrl}/app/${oktaMMEntityId}/sso/saml/metadata`; @@ -59,10 +59,10 @@ context('Okta', () => { LoginButtonText: loginButtonText, }, ExperimentalSettings: { - UseNewSAMLLibrary: true + UseNewSAMLLibrary: true, }, GuestAccountsSettings: { - Enable: true + Enable: true, }, }; diff --git a/e2e/cypress/integration/enterprise/system_console/channel_moderation_spec.js b/e2e/cypress/integration/enterprise/system_console/channel_moderation_spec.js index 37a80199ea79..b8168d05a23a 100644 --- a/e2e/cypress/integration/enterprise/system_console/channel_moderation_spec.js +++ b/e2e/cypress/integration/enterprise/system_console/channel_moderation_spec.js @@ -50,7 +50,7 @@ const demoteToChannelOrTeamMember = (userId, id, channelsOrTeams = 'channels') = data: { scheme_user: true, scheme_admin: false, - } + }, }); }; @@ -62,7 +62,7 @@ const promoteToChannelOrTeamAdmin = (userId, id, channelsOrTeams = 'channels') = data: { scheme_user: true, scheme_admin: true, - } + }, }); }; @@ -102,30 +102,30 @@ const enableDisableAllChannelModeratedPermissionsViaAPI = (channelId, enable = t roles: { members: enable, guests: enable, - } + }, }, { name: 'create_reactions', roles: { members: enable, guests: enable, - } + }, }, { name: 'manage_members', roles: { members: enable, - } + }, }, { name: 'use_channel_mentions', roles: { members: enable, guests: enable, - } + }, }, ], - } + }, ); }; diff --git a/e2e/cypress/integration/enterprise/system_console/system_scheme_permission_spec.js b/e2e/cypress/integration/enterprise/system_console/system_scheme_permission_spec.js index bda0a87c4ea1..f2af93f3138d 100644 --- a/e2e/cypress/integration/enterprise/system_console/system_scheme_permission_spec.js +++ b/e2e/cypress/integration/enterprise/system_console/system_scheme_permission_spec.js @@ -29,7 +29,7 @@ const setUserTeamAndChannelMemberships = (channelAdmin = false, teamAdmin = fals data: { scheme_user: true, scheme_admin: teamAdmin, - } + }, }); // # Reload page to ensure no cache or saved information @@ -45,7 +45,7 @@ const setUserTeamAndChannelMemberships = (channelAdmin = false, teamAdmin = fals data: { scheme_user: true, scheme_admin: channelAdmin, - } + }, }); // # Reload page to ensure no cache or saved information diff --git a/e2e/cypress/integration/enterprise/system_console/team_scheme_permission_spec.js b/e2e/cypress/integration/enterprise/system_console/team_scheme_permission_spec.js index c07689924318..ef7105ffbdb7 100644 --- a/e2e/cypress/integration/enterprise/system_console/team_scheme_permission_spec.js +++ b/e2e/cypress/integration/enterprise/system_console/team_scheme_permission_spec.js @@ -31,7 +31,7 @@ const setUserTeamAndChannelMemberships = (channelAdmin = false, teamAdmin = fals data: { scheme_user: true, scheme_admin: teamAdmin, - } + }, }); // # Reload page to ensure no cache or saved information @@ -47,7 +47,7 @@ const setUserTeamAndChannelMemberships = (channelAdmin = false, teamAdmin = fals data: { scheme_user: true, scheme_admin: channelAdmin, - } + }, }); // # Reload page to ensure no cache or saved information diff --git a/e2e/cypress/integration/interactive_menu/slack_parsing_message_button_spec.js b/e2e/cypress/integration/interactive_menu/slack_parsing_message_button_spec.js index 0fcb6f29ea62..e8d0aa980819 100644 --- a/e2e/cypress/integration/interactive_menu/slack_parsing_message_button_spec.js +++ b/e2e/cypress/integration/interactive_menu/slack_parsing_message_button_spec.js @@ -83,7 +83,7 @@ function getPayload(webhookBaseUrl) { spoiler: 'a < a | b > a', skipSlackParsing: true, }, - } + }, }, { name: 'Do Parsing', integration: { diff --git a/e2e/cypress/integration/messaging/local_date_time_spec.js b/e2e/cypress/integration/messaging/local_date_time_spec.js index 4cfe0c353df8..7f3b8edfbe3b 100644 --- a/e2e/cypress/integration/messaging/local_date_time_spec.js +++ b/e2e/cypress/integration/messaging/local_date_time_spec.js @@ -66,7 +66,7 @@ describe('Messaging', () => { {postIndex: 1, standard: '12:30 PM', military: '12:30'}, {postIndex: 2, standard: '8:30 PM', military: '20:30'}, {postIndex: 3, standard: '12:30 AM', military: '00:30'}, - ] + ], }, { name: 'in Spanish', @@ -78,7 +78,7 @@ describe('Messaging', () => { {postIndex: 1, standard: '12:30 p. m.', military: '12:30'}, {postIndex: 2, standard: '8:30 p. m.', military: '20:30'}, {postIndex: 3, standard: '12:30 a. m.', military: '0:30'}, - ] + ], }, { name: 'in react-intl unsupported timezone', @@ -90,7 +90,7 @@ describe('Messaging', () => { {postIndex: 1, standard: '02:15 AM', military: '02:15'}, {postIndex: 2, standard: '10:15 AM', military: '10:15'}, {postIndex: 3, standard: '02:15 PM', military: '14:15'}, - ] + ], }, ]; diff --git a/e2e/cypress/integration/multi_team_and_dm/system_message_spec.js b/e2e/cypress/integration/multi_team_and_dm/system_message_spec.js index d463c674f2af..c15a4929a0b7 100644 --- a/e2e/cypress/integration/multi_team_and_dm/system_message_spec.js +++ b/e2e/cypress/integration/multi_team_and_dm/system_message_spec.js @@ -42,7 +42,7 @@ describe('System message', () => { cy.getCurrentChannelId().then((channelId) => { cy.apiPatchChannel( channelId, - {header: ' Updating header'.repeat(Math.floor(Math.random() * 10))} + {header: ' Updating header'.repeat(Math.floor(Math.random() * 10))}, ); }); diff --git a/e2e/cypress/plugins/okta_request.js b/e2e/cypress/plugins/okta_request.js index ab66e542c643..58388d150e1b 100644 --- a/e2e/cypress/plugins/okta_request.js +++ b/e2e/cypress/plugins/okta_request.js @@ -11,7 +11,7 @@ module.exports = async ({baseUrl, urlSuffix, method = 'get', token, data = {}}) url: baseUrl + urlSuffix, headers: { 'X-Requested-With': 'XMLHttpRequest', - Authorization: token + Authorization: token, }, method, data, diff --git a/e2e/cypress/support/api_commands.js b/e2e/cypress/support/api_commands.js index d5baa2f10cb4..6fb2e844f76d 100644 --- a/e2e/cypress/support/api_commands.js +++ b/e2e/cypress/support/api_commands.js @@ -1250,7 +1250,7 @@ Cypress.Commands.add('apiGetSAMLCertificateStatus', () => { return cy.request({ headers: {'X-Requested-With': 'XMLHttpRequest'}, url: '/api/v4/saml/certificate/status', - method: 'GET' + method: 'GET', }).then((response) => { expect(response.status).to.equal(200); return cy.wrap(response); @@ -1267,7 +1267,7 @@ Cypress.Commands.add('apiGetMetadataFromIdp', (samlMetadataUrl) => { headers: {'X-Requested-With': 'XMLHttpRequest'}, url: '/api/v4/saml/metadatafromidp', method: 'POST', - body: {saml_metadata_url: samlMetadataUrl} + body: {saml_metadata_url: samlMetadataUrl}, }).then((response) => { expect(response.status, 'Failed to obtain metadata from Identity Provider URL').to.equal(200); return cy.wrap(response); diff --git a/e2e/cypress/support/okta_commands.js b/e2e/cypress/support/okta_commands.js index dba8cddd322c..e1d6822bdaf9 100644 --- a/e2e/cypress/support/okta_commands.js +++ b/e2e/cypress/support/okta_commands.js @@ -13,7 +13,7 @@ function buildProfile(user) { login: user.email, userType: user.userType, isAdmin: user.isAdmin, - isGuest: user.isGuest + isGuest: user.isGuest, }; return profile; } @@ -31,10 +31,10 @@ Cypress.Commands.add('oktaCreateUser', (user = {}) => { password: {value: user.password}, recovery_question: { question: 'What is the best open source messaging platform for developers?', - answer: 'Mattermost' - } - } - } + answer: 'Mattermost', + }, + }, + }, }).then((response) => { expect(response.status).to.equal(200); const userId = response.data.id; @@ -66,8 +66,8 @@ Cypress.Commands.add('oktaUpdateUser', (userId = '', user = {}) => { method: 'post', token, data: { - profile - } + profile, + }, }).then((response) => { expect(response.status).to.equal(201); return cy.wrap(response.data); @@ -80,7 +80,7 @@ Cypress.Commands.add('oktaDeleteUser', (userId = '') => { baseUrl: Cypress.env('oktaApiUrl'), urlSuffix: '/users/' + userId, method: 'delete', - token + token, }).then((response) => { expect(response.status).to.equal(204); expect(response.data).is.empty; @@ -88,7 +88,7 @@ Cypress.Commands.add('oktaDeleteUser', (userId = '') => { baseUrl: Cypress.env('oktaApiUrl'), urlSuffix: '/users/' + userId, method: 'delete', - token + token, }).then((_response) => { expect(_response.status).to.equal(204); expect(_response.data).is.empty; @@ -101,7 +101,7 @@ Cypress.Commands.add('oktaDeleteSession', (userId = '') => { baseUrl: Cypress.env('oktaApiUrl'), urlSuffix: '/users/' + userId + '/sessions', method: 'delete', - token + token, }).then((response) => { expect(response.status).to.equal(204); expect(response.data).is.empty; @@ -125,9 +125,9 @@ Cypress.Commands.add('oktaAssignUserToApplication', (userId = '', user = {}) => profile: { firstName: user.firstName, lastName: user.lastName, - email: user.email - } - } + email: user.email, + }, + }, }).then((response) => { expect(response.status).to.be.equal(200); return cy.wrap(response.data); diff --git a/e2e/cypress/support/saml_commands.js b/e2e/cypress/support/saml_commands.js index c3c618ac5907..b93f6eb5d46c 100644 --- a/e2e/cypress/support/saml_commands.js +++ b/e2e/cypress/support/saml_commands.js @@ -54,6 +54,6 @@ Cypress.Commands.add('setTestSettings', (loginButtonText, config) => { siteName: config.TeamSettings.SiteName, siteUrl: config.ServiceSettings.SiteURL, teamName: '', - user: null + user: null, }; }); diff --git a/e2e/run_tests.js b/e2e/run_tests.js index 9a24999c2319..89378beb1231 100644 --- a/e2e/run_tests.js +++ b/e2e/run_tests.js @@ -55,7 +55,7 @@ const { generateTestReport, getServerInfo, sendReport, - writeJsonToFile + writeJsonToFile, } = require('./utils/report'); const {saveArtifacts} = require('./utils/save_artifacts'); const {saveDashboard} = require('./utils/dashboard'); diff --git a/e2e/utils/report.js b/e2e/utils/report.js index e73724ab0898..de287d2cb9c9 100644 --- a/e2e/utils/report.js +++ b/e2e/utils/report.js @@ -124,9 +124,9 @@ function generateTestReport(summary, isUploadedToS3, bucketFolder) { short: false, title: `Key metrics (required support: ${testResult.priority})`, value: statsFieldValue, - } + }, ], - image_url: 'https://pbs.twimg.com/profile_images/1044345247440896001/pXI1GDHW_bigger.jpg' + image_url: 'https://pbs.twimg.com/profile_images/1044345247440896001/pXI1GDHW_bigger.jpg', }], }; } diff --git a/e2e/utils/save_artifacts.js b/e2e/utils/save_artifacts.js index dba0d2ae8937..c03c8f2bed29 100644 --- a/e2e/utils/save_artifacts.js +++ b/e2e/utils/save_artifacts.js @@ -16,13 +16,13 @@ require('dotenv').config(); const { AWS_S3_BUCKET, AWS_ACCESS_KEY_ID, - AWS_SECRET_ACCESS_KEY + AWS_SECRET_ACCESS_KEY, } = process.env; const s3 = new AWS.S3({ signatureVersion: 'v4', accessKeyId: AWS_ACCESS_KEY_ID, - secretAccessKey: AWS_SECRET_ACCESS_KEY + secretAccessKey: AWS_SECRET_ACCESS_KEY, }); function getFiles(dirPath) { @@ -54,7 +54,7 @@ async function saveArtifacts(upload, bucketFolder) { Key, Bucket: AWS_S3_BUCKET, Body: fs.readFileSync(file), - ContentType: `${contentType}${charset ? '; charset=' + charset : ''}` + ContentType: `${contentType}${charset ? '; charset=' + charset : ''}`, }, (err) => { if (err) { @@ -62,7 +62,7 @@ async function saveArtifacts(upload, bucketFolder) { return rej(new Error(err)); } res({success: true}); - } + }, ); }); }), @@ -73,7 +73,7 @@ async function saveArtifacts(upload, bucketFolder) { } resolve({success: true}); - } + }, ); }); } diff --git a/e2e/utils/webhook_utils.js b/e2e/utils/webhook_utils.js index 302ba9d41422..dfc86a5549d5 100644 --- a/e2e/utils/webhook_utils.js +++ b/e2e/utils/webhook_utils.js @@ -231,7 +231,7 @@ function getUserAndChannelDialog(triggerId, webhookBaseUrl) { options: null, }, ], - } + }, }; } @@ -258,7 +258,7 @@ function getBooleanDialog(triggerId, webhookBaseUrl) { help_text: 'This is the help text', }, ], - } + }, }; } diff --git a/plugins/channel_header_plug/channel_header_plug.test.jsx b/plugins/channel_header_plug/channel_header_plug.test.jsx index 16b915e18803..8505df832088 100644 --- a/plugins/channel_header_plug/channel_header_plug.test.jsx +++ b/plugins/channel_header_plug/channel_header_plug.test.jsx @@ -24,7 +24,7 @@ describe('plugins/ChannelHeaderPlug', () => { channel={{}} channelMember={{}} theme={{}} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -36,7 +36,7 @@ describe('plugins/ChannelHeaderPlug', () => { channel={{}} channelMember={{}} theme={{}} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); @@ -55,7 +55,7 @@ describe('plugins/ChannelHeaderPlug', () => { channel={{}} channelMember={{}} theme={{}} - /> + />, ); expect(wrapper).toMatchSnapshot(); }); diff --git a/plugins/mobile_channel_header_plug/mobile_channel_header_plug.test.jsx b/plugins/mobile_channel_header_plug/mobile_channel_header_plug.test.jsx index 6d9805b3aab0..c6a27076e157 100644 --- a/plugins/mobile_channel_header_plug/mobile_channel_header_plug.test.jsx +++ b/plugins/mobile_channel_header_plug/mobile_channel_header_plug.test.jsx @@ -23,7 +23,7 @@ describe('plugins/MobileChannelHeaderPlug', () => { channelMember={{}} theme={{}} isDropdown={false} - /> + />, ); expect(wrapper).toMatchSnapshot(); @@ -39,7 +39,7 @@ describe('plugins/MobileChannelHeaderPlug', () => { channelMember={{}} theme={{}} isDropdown={false} - /> + />, ); expect(wrapper).toMatchSnapshot(); @@ -61,7 +61,7 @@ describe('plugins/MobileChannelHeaderPlug', () => { channelMember={{}} theme={{}} isDropdown={false} - /> + />, ); expect(wrapper).toMatchSnapshot(); @@ -77,7 +77,7 @@ describe('plugins/MobileChannelHeaderPlug', () => { channelMember={{}} theme={{}} isDropdown={true} - /> + />, ); expect(wrapper).toMatchSnapshot(); @@ -93,7 +93,7 @@ describe('plugins/MobileChannelHeaderPlug', () => { channelMember={{}} theme={{}} isDropdown={true} - /> + />, ); expect(wrapper).toMatchSnapshot(); @@ -110,7 +110,7 @@ describe('plugins/MobileChannelHeaderPlug', () => { channelMember={{}} theme={{}} isDropdown={true} - /> + />, ); expect(wrapper).toMatchSnapshot(); @@ -144,7 +144,7 @@ describe('plugins/MobileChannelHeaderPlug', () => { channelMember={channelMember} theme={{}} isDropdown={true} - /> + />, ); wrapper.instance().fireAction(newTestPlug); diff --git a/plugins/pluggable/pluggable.test.jsx b/plugins/pluggable/pluggable.test.jsx index cc1cfbe7a0ed..c05b956572cd 100644 --- a/plugins/pluggable/pluggable.test.jsx +++ b/plugins/pluggable/pluggable.test.jsx @@ -93,7 +93,7 @@ describe('plugins/Pluggable', () => { components={{}} theme={{}} /> - + , ); expect(wrapper).toMatchSnapshot(); }); @@ -106,7 +106,7 @@ describe('plugins/Pluggable', () => { components={{PopoverSection1: [{component: ProfilePopoverPlugin}]}} theme={{id: 'theme_id'}} /> - + , ); expect(wrapper).toMatchSnapshot(); @@ -119,7 +119,7 @@ describe('plugins/Pluggable', () => { pluggableName='PopoverSection1' components={{PopoverSection1: [{component: ProfilePopoverPlugin}]}} theme={{id: 'theme_id'}} - /> + />, ); expect(wrapper).toMatchSnapshot(); @@ -131,7 +131,7 @@ describe('plugins/Pluggable', () => { + />, ); expect(wrapper.type()).toBe(null); @@ -143,7 +143,7 @@ describe('plugins/Pluggable', () => { pluggableName='PopoverSection1' components={{}} theme={{id: 'theme_id'}} - /> + />, ); expect(wrapper.type()).toBe(null); diff --git a/plugins/rhs_plugin/rhs_plugin.jsx b/plugins/rhs_plugin/rhs_plugin.jsx index 5569e7a2a118..2c31aa451dfd 100644 --- a/plugins/rhs_plugin/rhs_plugin.jsx +++ b/plugins/rhs_plugin/rhs_plugin.jsx @@ -19,7 +19,7 @@ export default class RhsPlugin extends React.PureComponent { icon: PropTypes.node.isRequired, tooltip: PropTypes.node.isRequired, action: PropTypes.func.isRequired, - })) + })), } render() { diff --git a/plugins/test/main_menu_action.test.jsx b/plugins/test/main_menu_action.test.jsx index 79e61c322b98..c0af060d2419 100644 --- a/plugins/test/main_menu_action.test.jsx +++ b/plugins/test/main_menu_action.test.jsx @@ -45,7 +45,7 @@ describe('plugins/MainMenuActions', () => { const wrapper = shallowWithIntl( + />, ); expect(wrapper).toMatchSnapshot(); diff --git a/plugins/test/post_type.test.jsx b/plugins/test/post_type.test.jsx index 489f0feddb81..f48874a89dd2 100644 --- a/plugins/test/post_type.test.jsx +++ b/plugins/test/post_type.test.jsx @@ -31,7 +31,7 @@ describe('plugins/PostMessageView', () => { test('should match snapshot with extended post type', () => { const wrapper = mount( - + , ); expect(wrapper).toMatchSnapshot(); @@ -41,7 +41,7 @@ describe('plugins/PostMessageView', () => { test('should match snapshot with no extended post type', () => { const props = {...requiredProps, pluginPostTypes: {}}; const wrapper = shallow( - + , ); expect(wrapper).toMatchSnapshot(); diff --git a/reducers/storage.test.js b/reducers/storage.test.js index 46153ed6a311..89177aaff933 100644 --- a/reducers/storage.test.js +++ b/reducers/storage.test.js @@ -22,13 +22,13 @@ describe('Reducers.Storage', () => { value: 'value', timestamp: now, }, - } + }, ); assert.deepEqual( nextState.storage, { user_id_key: {value: 'value', timestamp: now}, - } + }, ); }); @@ -44,13 +44,13 @@ describe('Reducers.Storage', () => { value: 'value', timestamp: now, }, - } + }, ); assert.deepEqual( nextState.storage, { key: {value: 'value', timestamp: now}, - } + }, ); }); @@ -67,11 +67,11 @@ describe('Reducers.Storage', () => { name: 'key', prefix: 'user_id_', }, - } + }, ); assert.deepEqual( nextState.storage, - {} + {}, ); nextState = storageReducer( { @@ -83,11 +83,11 @@ describe('Reducers.Storage', () => { name: 'key', prefix: 'user_id_', }, - } + }, ); assert.deepEqual( nextState.storage, - {} + {}, ); }); @@ -103,11 +103,11 @@ describe('Reducers.Storage', () => { data: { name: 'key', }, - } + }, ); assert.deepEqual( nextState.storage, - {} + {}, ); nextState = storageReducer( { @@ -118,11 +118,11 @@ describe('Reducers.Storage', () => { data: { name: 'key', }, - } + }, ); assert.deepEqual( nextState.storage, - {} + {}, ); }); @@ -139,13 +139,13 @@ describe('Reducers.Storage', () => { data: { exclude: ['excluded'], }, - } + }, ); assert.deepEqual( nextState.storage, { excluded: {value: 'not-cleared', timestamp: now}, - } + }, ); }); @@ -166,11 +166,11 @@ describe('Reducers.Storage', () => { prefix: 'prefix', action: (key, value) => touchedPairs.push([key, value]), }, - } + }, ); assert.deepEqual( touchedPairs, - [['prefix_key1', 1], ['prefix_key2', 2]] + [['prefix_key1', 1], ['prefix_key2', 2]], ); }); @@ -190,11 +190,11 @@ describe('Reducers.Storage', () => { prefix: 'prefix', action: (key, value) => touchedPairs.push([key, value]), }, - } + }, ); assert.deepEqual( touchedPairs, - [['prefix_key1', 1], ['prefix_key2', 2]] + [['prefix_key1', 1], ['prefix_key2', 2]], ); }); @@ -206,33 +206,33 @@ describe('Reducers.Storage', () => { { type: StorageTypes.STORAGE_REHYDRATE, data: {test: '123'}, - } + }, ); assert.deepEqual( nextState.storage, - {test: '123'} + {test: '123'}, ); nextState = storageReducer( nextState, { type: StorageTypes.STORAGE_REHYDRATE, data: {test: '456'}, - } + }, ); assert.deepEqual( nextState.storage, - {test: '456'} + {test: '456'}, ); nextState = storageReducer( nextState, { type: StorageTypes.STORAGE_REHYDRATE, data: {test2: '789'}, - } + }, ); assert.deepEqual( nextState.storage, - {test: '456', test2: '789'} + {test: '456', test2: '789'}, ); }); }); diff --git a/reducers/views/announcement_bar.js b/reducers/views/announcement_bar.js index 843a7675855f..8768c602344a 100644 --- a/reducers/views/announcement_bar.js +++ b/reducers/views/announcement_bar.js @@ -10,13 +10,13 @@ function announcementBarState(state = {announcementBarCount: 0}, action) { case ActionTypes.TRACK_ANNOUNCEMENT_BAR: return { ...state, - announcementBarCount: state.announcementBarCount + 1 + announcementBarCount: state.announcementBarCount + 1, }; case ActionTypes.DISMISS_ANNOUNCEMENT_BAR: return { ...state, - announcementBarCount: Math.max(state.announcementBarCount - 1, 0) + announcementBarCount: Math.max(state.announcementBarCount - 1, 0), }; default: diff --git a/reducers/views/browser.test.js b/reducers/views/browser.test.js index b4e6aaeaf744..12fc2dae1461 100644 --- a/reducers/views/browser.test.js +++ b/reducers/views/browser.test.js @@ -14,7 +14,7 @@ describe('Reducers.Browser', () => { { focused: true, }, - {} + {}, ); expect(nextState).toEqual(initialState); @@ -28,7 +28,7 @@ describe('Reducers.Browser', () => { { type: ActionTypes.BROWSER_CHANGE_FOCUS, focus: false, - } + }, ); expect(nextState).toEqual({ @@ -45,7 +45,7 @@ describe('Reducers.Browser', () => { { type: ActionTypes.BROWSER_CHANGE_FOCUS, focus: true, - } + }, ); expect(nextState).toEqual({ diff --git a/reducers/views/emoji.js b/reducers/views/emoji.js index 0e91fae3bb11..0e8dbc48f7af 100644 --- a/reducers/views/emoji.js +++ b/reducers/views/emoji.js @@ -36,5 +36,5 @@ function shortcutReactToLastPostEmittedFrom(state = '', action) { export default combineReducers({ emojiPickerCustomPage, - shortcutReactToLastPostEmittedFrom + shortcutReactToLastPostEmittedFrom, }); diff --git a/reducers/views/lhs.test.js b/reducers/views/lhs.test.js index 4c4695adae9d..cfe618a7f57b 100644 --- a/reducers/views/lhs.test.js +++ b/reducers/views/lhs.test.js @@ -14,7 +14,7 @@ describe('Reducers.LHS', () => { test('Initial state', () => { const nextState = lhsReducer( {}, - {} + {}, ); expect(nextState).toEqual(initialState); @@ -27,7 +27,7 @@ describe('Reducers.LHS', () => { }, { type: ActionTypes.TOGGLE_LHS, - } + }, ); expect(nextState).toEqual({ @@ -43,7 +43,7 @@ describe('Reducers.LHS', () => { }, { type: ActionTypes.TOGGLE_LHS, - } + }, ); expect(nextState).toEqual({ @@ -59,7 +59,7 @@ describe('Reducers.LHS', () => { }, { type: ActionTypes.OPEN_LHS, - } + }, ); expect(nextState).toEqual({ @@ -75,7 +75,7 @@ describe('Reducers.LHS', () => { }, { type: ActionTypes.CLOSE_LHS, - } + }, ); expect(nextState).toEqual({ @@ -97,7 +97,7 @@ describe('Reducers.LHS', () => { }, { type: action, - } + }, ); expect(nextState).toEqual({ diff --git a/reducers/views/modals.test.jsx b/reducers/views/modals.test.jsx index 523093391b54..21d5841b3406 100644 --- a/reducers/views/modals.test.jsx +++ b/reducers/views/modals.test.jsx @@ -24,7 +24,7 @@ describe('Reducers.Modals', () => { test('Initial state', () => { const nextState = modalsReducer( {}, - {} + {}, ); const expectedState = { @@ -47,7 +47,7 @@ describe('Reducers.Modals', () => { modalId: ModalIdentifiers.DELETE_CHANNEL, dialogType, dialogProps, - } + }, ); const expectedState = { @@ -69,7 +69,7 @@ describe('Reducers.Modals', () => { { type: ActionTypes.MODAL_CLOSE, modalId: ModalIdentifiers.DELETE_CHANNEL, - } + }, ); const expectedState = { diff --git a/reducers/views/rhs.test.js b/reducers/views/rhs.test.js index 09247768b938..5ff1c258f0f9 100644 --- a/reducers/views/rhs.test.js +++ b/reducers/views/rhs.test.js @@ -27,7 +27,7 @@ describe('Reducers.RHS', () => { test('Initial state', () => { const nextState = rhsReducer( {}, - {} + {}, ); expect(nextState).toEqual(initialState); @@ -40,7 +40,7 @@ describe('Reducers.RHS', () => { type: ActionTypes.UPDATE_RHS_STATE, state: RHSStates.PIN, channelId: '123', - } + }, ); expect(nextState).toEqual({ @@ -58,7 +58,7 @@ describe('Reducers.RHS', () => { type: ActionTypes.UPDATE_RHS_STATE, state: RHSStates.PLUGIN, pluginId: '123', - } + }, ); expect(nextState).toEqual({ @@ -77,7 +77,7 @@ describe('Reducers.RHS', () => { { type: ActionTypes.UPDATE_RHS_STATE, state: RHSStates.SEARCH, - } + }, ); expect(nextState).toEqual({ @@ -96,7 +96,7 @@ describe('Reducers.RHS', () => { { type: ActionTypes.UPDATE_RHS_STATE, state: RHSStates.SEARCH, - } + }, ); expect(nextState).toEqual({ @@ -112,7 +112,7 @@ describe('Reducers.RHS', () => { {}, { type: SearchTypes.SEARCH_FLAGGED_POSTS_REQUEST, - } + }, ); expect(nextState).toEqual({ @@ -126,7 +126,7 @@ describe('Reducers.RHS', () => { {}, { type: SearchTypes.SEARCH_FLAGGED_POSTS_SUCCESS, - } + }, ); expect(nextState).toEqual({ @@ -141,7 +141,7 @@ describe('Reducers.RHS', () => { { type: ActionTypes.UPDATE_RHS_SEARCH_TERMS, terms: 'testing', - } + }, ); expect(nextState).toEqual({ @@ -158,7 +158,7 @@ describe('Reducers.RHS', () => { postId: '123', channelId: '321', timestamp: 1234, - } + }, ); expect(nextState1).toEqual({ @@ -178,7 +178,7 @@ describe('Reducers.RHS', () => { channelId: '321', previousRhsState: RHSStates.SEARCH, timestamp: 4567, - } + }, ); expect(nextState2).toEqual({ @@ -200,7 +200,7 @@ describe('Reducers.RHS', () => { channelId: '321', previousRhsState: RHSStates.FLAG, timestamp: 0, - } + }, ); expect(nextState3).toEqual({ @@ -220,7 +220,7 @@ describe('Reducers.RHS', () => { type: ActionTypes.SELECT_POST_CARD, postId: '123', channelId: '321', - } + }, ); expect(nextState1).toEqual({ @@ -238,7 +238,7 @@ describe('Reducers.RHS', () => { postId: '123', channelId: '321', previousRhsState: RHSStates.SEARCH, - } + }, ); expect(nextState2).toEqual({ @@ -258,7 +258,7 @@ describe('Reducers.RHS', () => { postId: '123', channelId: '321', previousRhsState: RHSStates.FLAG, - } + }, ); expect(nextState3).toEqual({ @@ -280,7 +280,7 @@ describe('Reducers.RHS', () => { postId: '123', channelId: '321', previousRhsState: RHSStates.PIN, - } + }, ); expect(nextState).toEqual({ @@ -303,7 +303,7 @@ describe('Reducers.RHS', () => { postId: '123', channelId: '321', previousRhsState: RHSStates.PIN, - } + }, ); expect(nextState).toEqual({ @@ -324,7 +324,7 @@ describe('Reducers.RHS', () => { }, { type: ActionTypes.TOGGLE_RHS_MENU, - } + }, ); expect(nextState).toEqual({ @@ -342,7 +342,7 @@ describe('Reducers.RHS', () => { }, { type: ActionTypes.TOGGLE_RHS_MENU, - } + }, ); expect(nextState).toEqual({ @@ -360,7 +360,7 @@ describe('Reducers.RHS', () => { }, { type: ActionTypes.OPEN_RHS_MENU, - } + }, ); expect(nextState).toEqual({ @@ -378,7 +378,7 @@ describe('Reducers.RHS', () => { }, { type: ActionTypes.CLOSE_RHS_MENU, - } + }, ); expect(nextState).toEqual({ @@ -402,7 +402,7 @@ describe('Reducers.RHS', () => { }, { type: action, - } + }, ); expect(nextState).toEqual({ diff --git a/reducers/views/search.test.js b/reducers/views/search.test.js index 9088a5549ae0..14010dd8a7b9 100644 --- a/reducers/views/search.test.js +++ b/reducers/views/search.test.js @@ -16,7 +16,7 @@ describe('Reducers.Search', () => { modalSearch: '', systemUsersSearch: {}, }, - {} + {}, ); expect(nextState).toEqual(initialState); @@ -30,7 +30,7 @@ describe('Reducers.Search', () => { { type: SearchTypes.SET_MODAL_SEARCH, data: ' something ', - } + }, ); expect(nextState).toEqual({ diff --git a/reducers/views/textbox.test.js b/reducers/views/textbox.test.js index db474ecb7a2d..c0c5e28dee2a 100644 --- a/reducers/views/textbox.test.js +++ b/reducers/views/textbox.test.js @@ -16,7 +16,7 @@ describe('Reducers.RHS', () => { test('Initial state', () => { const nextState = textboxReducer( {}, - {} + {}, ); expect(nextState).toEqual(initialState); @@ -28,7 +28,7 @@ describe('Reducers.RHS', () => { { type: ActionTypes.SET_SHOW_PREVIEW_ON_CREATE_COMMENT, showPreview: true, - } + }, ); expect(nextState).toEqual({ @@ -43,7 +43,7 @@ describe('Reducers.RHS', () => { { type: ActionTypes.SET_SHOW_PREVIEW_ON_CREATE_POST, showPreview: true, - } + }, ); expect(nextState).toEqual({ @@ -58,7 +58,7 @@ describe('Reducers.RHS', () => { { type: ActionTypes.SET_SHOW_PREVIEW_ON_EDIT_CHANNEL_HEADER_MODAL, showPreview: true, - } + }, ); expect(nextState).toEqual({ @@ -73,7 +73,7 @@ describe('Reducers.RHS', () => { { type: ActionTypes.SET_SHOW_PREVIEW_ON_EDIT_POST_MODAL, showPreview: true, - } + }, ); expect(nextState).toEqual({ diff --git a/selectors/admin_console.jsx b/selectors/admin_console.jsx index 619de139524a..d1314884bb77 100644 --- a/selectors/admin_console.jsx +++ b/selectors/admin_console.jsx @@ -15,7 +15,7 @@ export const getAdminDefinition = createSelector( result = reducer(result); } return result; - } + }, ); export const getAdminConsoleCustomComponents = (state, pluginId) => diff --git a/selectors/emojis.js b/selectors/emojis.js index fb421a38eb11..3926188526b5 100644 --- a/selectors/emojis.js +++ b/selectors/emojis.js @@ -16,7 +16,7 @@ export const getEmojiMap = createSelector( getCustomEmojisByName, (customEmojisByName) => { return new EmojiMap(customEmojisByName); - } + }, ); export const getShortcutReactToLastPostEmittedFrom = (state) => state.views.emoji.shortcutReactToLastPostEmittedFrom; @@ -33,5 +33,5 @@ export const getRecentEmojis = createSelector( } return recentEmojis; - } + }, ); diff --git a/selectors/posts.js b/selectors/posts.js index 6242c18ed4b0..92980e119196 100644 --- a/selectors/posts.js +++ b/selectors/posts.js @@ -23,7 +23,7 @@ export const getEditingPost = createSelector( ...editingPost, post, }; - } + }, ); export function isEmbedVisible(state, postId) { @@ -32,7 +32,7 @@ export function isEmbedVisible(state, postId) { state, Preferences.CATEGORY_DISPLAY_SETTINGS, Preferences.COLLAPSE_DISPLAY, - Preferences.COLLAPSE_DISPLAY_DEFAULT !== 'false' + Preferences.COLLAPSE_DISPLAY_DEFAULT !== 'false', ); return getGlobalItem(state, StoragePrefixes.EMBED_VISIBLE + currentUserId + '_' + postId, !previewCollapsed); diff --git a/selectors/rhs.ts b/selectors/rhs.ts index 4fcdfcef97b0..d04353dcadda 100644 --- a/selectors/rhs.ts +++ b/selectors/rhs.ts @@ -60,7 +60,7 @@ export const getSelectedPost = createSelector( channel_id: selectedPostChannelId, user_id: currentUserId, }; - } + }, ); export function getRhsState(state: GlobalState): RhsState { diff --git a/selectors/views/channel_selector_modal.js b/selectors/views/channel_selector_modal.js index 852a235c527c..2e8bcab58d24 100644 --- a/selectors/views/channel_selector_modal.js +++ b/selectors/views/channel_selector_modal.js @@ -13,5 +13,5 @@ export const getChannelsForChannelSelector = createSelector( return channelIds.map((id) => channels[id]); } return []; - } + }, ); diff --git a/selectors/views/channel_sidebar.ts b/selectors/views/channel_sidebar.ts index 99d85c46ee7e..e38d7a115145 100644 --- a/selectors/views/channel_sidebar.ts +++ b/selectors/views/channel_sidebar.ts @@ -39,7 +39,7 @@ function makeGetCollapsedStateForAllCategoriesByTeam(): (state: GlobalState, tea map[category.id] = isCategoryCollapsedFromStorage(prefix, storage, category.id) || unreadFilterEnabled; return map; }, {}); - } + }, ); } @@ -74,6 +74,6 @@ export function makeGetCurrentlyDisplayedChannelsForTeam(): (state: GlobalState, return channels; }).flat(); - } + }, ); } \ No newline at end of file diff --git a/store/index.js b/store/index.js index d618aaf9a537..6e6964b899f2 100644 --- a/store/index.js +++ b/store/index.js @@ -90,7 +90,7 @@ export default function configureStore(initialState) { } return outboundState; - } + }, ); const offlineOptions = { diff --git a/tests/helpers/client-test-helper.jsx b/tests/helpers/client-test-helper.jsx index 94be6cb3c0bd..6618aaab07d9 100644 --- a/tests/helpers/client-test-helper.jsx +++ b/tests/helpers/client-test-helper.jsx @@ -176,19 +176,19 @@ class TestHelperClass { self.basicp = rpost; d1.resolve(); }, - throwerror + throwerror, ); }, - throwerror + throwerror, ); }, - throwerror + throwerror, ); }, - throwerror + throwerror, ); }, - throwerror + throwerror, ); jqd.when(d1).done(() => { diff --git a/utils/channel_utils.jsx b/utils/channel_utils.jsx index fb5516e34e80..f55eb362013f 100644 --- a/utils/channel_utils.jsx +++ b/utils/channel_utils.jsx @@ -15,7 +15,7 @@ export function canManageMembers(state, channel) { channel: channel.id, team: channel.team_id, permission: Permissions.MANAGE_PRIVATE_CHANNEL_MEMBERS, - } + }, ); } @@ -26,7 +26,7 @@ export function canManageMembers(state, channel) { channel: channel.id, team: channel.team_id, permission: Permissions.MANAGE_PUBLIC_CHANNEL_MEMBERS, - } + }, ); } diff --git a/utils/constants.jsx b/utils/constants.jsx index b09b1f42065a..0e1e279b6b42 100644 --- a/utils/constants.jsx +++ b/utils/constants.jsx @@ -264,7 +264,7 @@ export const EventTypes = Object.assign( }, keyMirror({ POST_LIST_SCROLL_TO_BOTTOM: null, - }) + }), ); export const A11yClassNames = { @@ -745,7 +745,7 @@ export const Locations = { RHS_ROOT: 'RHS_ROOT', RHS_COMMENT: 'RHS_COMMENT', SEARCH: 'SEARCH', - NO_WHERE: 'NO_WHERE' + NO_WHERE: 'NO_WHERE', }; export const PostListRowListIds = { diff --git a/utils/emoji.test.jsx b/utils/emoji.test.jsx index d05f332802b2..1fcfbd6cbd61 100644 --- a/utils/emoji.test.jsx +++ b/utils/emoji.test.jsx @@ -122,17 +122,17 @@ describe('Emoji', () => { test('special case for thumbsup emoji should sort custom "thumb" emojis after system', () => { const thumbsUpEmoji = { aliases: ['+1', 'thumbsup'], - category: 'default' + category: 'default', }; const thumbsDownEmoji = { name: 'thumbsdown', - category: 'default' + category: 'default', }; const thumbsUpCustomEmoji = { name: 'thumbsup-custom', - category: 'custom' + category: 'custom', }; const emojiArray = [thumbsUpCustomEmoji, thumbsDownEmoji, thumbsUpEmoji]; diff --git a/utils/emoticons.tsx b/utils/emoticons.tsx index e06116ee43d5..490f9a3fc286 100644 --- a/utils/emoticons.tsx +++ b/utils/emoticons.tsx @@ -47,7 +47,7 @@ export function matchEmoticons(text: string): RegExpMatchArray | null { export function handleEmoticons( text: string, - tokens: Map + tokens: Map, ): string { let output = text; @@ -55,7 +55,7 @@ export function handleEmoticons( fullMatch: string, prefix: string, matchText: string, - name: string + name: string, ): string { const index = tokens.size; const alias = `$MM_EMOTICON${index}$`; @@ -72,7 +72,7 @@ export function handleEmoticons( output = output.replace( EMOJI_PATTERN, (fullMatch: string, matchText: string, name: string): string => - replaceEmoticonWithToken(fullMatch, '', matchText, name) + replaceEmoticonWithToken(fullMatch, '', matchText, name), ); // match text smilies like :D diff --git a/utils/file_utils.test.jsx b/utils/file_utils.test.jsx index fd12eea3ec93..b66881a42cb6 100644 --- a/utils/file_utils.test.jsx +++ b/utils/file_utils.test.jsx @@ -15,13 +15,13 @@ describe('FileUtils.trimFilename', () => { assert.equal( trimFilename('abcdefghijklmnopqrstuvwxyz'), 'abcdefghijklmnopqrstuvwxyz', - 'should return same filename' + 'should return same filename', ); assert.equal( trimFilename('abcdefghijklmnopqrstuvwxyz0123456789'), 'abcdefghijklmnopqrstuvwxyz012345678...', - 'should return trimmed filename' + 'should return trimmed filename', ); }); }); diff --git a/utils/markdown/index.ts b/utils/markdown/index.ts index a2d6489ee781..46388088bee7 100644 --- a/utils/markdown/index.ts +++ b/utils/markdown/index.ts @@ -32,7 +32,7 @@ export function formatWithRenderer(text: string, renderer: marked.Renderer) { export function stripMarkdown(text: string) { if (typeof text === 'string' && text.length > 0) { return convertEntityToCharacter( - formatWithRenderer(text, removeMarkdown) + formatWithRenderer(text, removeMarkdown), ).trim(); } diff --git a/utils/markdown/renderer.tsx b/utils/markdown/renderer.tsx index 6edf9df4d304..d5e39cbd4b91 100644 --- a/utils/markdown/renderer.tsx +++ b/utils/markdown/renderer.tsx @@ -15,7 +15,7 @@ export default class Renderer extends marked.Renderer { public constructor( options: MarkedOptions, formattingOptions = {}, - emojiMap = new EmojiMap(new Map()) + emojiMap = new EmojiMap(new Map()), ) { super(options); @@ -72,7 +72,7 @@ export default class Renderer extends marked.Renderer { searched = TextFormatting.highlightSearchTerms( searched, tokens, - this.formattingOptions.searchPatterns + this.formattingOptions.searchPatterns, ); if (tokens.size > 0) { @@ -105,7 +105,7 @@ export default class Renderer extends marked.Renderer { output = TextFormatting.highlightSearchTerms( output, tokens, - this.formattingOptions.searchPatterns + this.formattingOptions.searchPatterns, ); output = TextFormatting.replaceTokens(output, tokens); } @@ -171,7 +171,7 @@ export default class Renderer extends marked.Renderer { } else if (isUrl && this.formattingOptions.autolinkedUrlSchemes) { const isValidUrl = this.formattingOptions.autolinkedUrlSchemes.indexOf( - scheme.toLowerCase() + scheme.toLowerCase(), ) !== -1; if (!isValidUrl) { @@ -202,14 +202,14 @@ export default class Renderer extends marked.Renderer { const pattern = new RegExp( '^(' + TextFormatting.escapeRegex(this.formattingOptions.siteURL) + - ')?\\/(?:signup_user_complete|admin_console|[^\\/]+\\/(?:pl|channels|messages))\\/' + ')?\\/(?:signup_user_complete|admin_console|[^\\/]+\\/(?:pl|channels|messages))\\/', ); internalLink = pattern.test(outHref); if (internalLink && this.formattingOptions.siteURL) { output += ` data-link="${outHref.replace( this.formattingOptions.siteURL, - '' + '', )}"`; } else { output += ' target="_blank"'; @@ -256,7 +256,7 @@ export default class Renderer extends marked.Renderer { flags: { header: boolean; align: 'center' | 'left' | 'right' | null; - } + }, ) { return marked.Renderer.prototype.tablecell(content, flags).trim(); } @@ -294,7 +294,7 @@ export default class Renderer extends marked.Renderer { return TextFormatting.doFormatText( txt, this.formattingOptions, - this.emojiMap + this.emojiMap, ); } } diff --git a/utils/position_utils.tsx b/utils/position_utils.tsx index cb38e3dcd291..fa9a2cc2e600 100644 --- a/utils/position_utils.tsx +++ b/utils/position_utils.tsx @@ -5,7 +5,7 @@ export function popOverOverlayPosition( targetBounds: DOMRect, innerHeight: number, spaceRequiredAbove: number, - spaceRequiredBelow?: number + spaceRequiredBelow?: number, ): string { let placement: string; diff --git a/utils/post_utils.jsx b/utils/post_utils.jsx index fc81bdb417a4..ad15221b8be0 100644 --- a/utils/post_utils.jsx +++ b/utils/post_utils.jsx @@ -339,7 +339,7 @@ export function makeCreateAriaLabelForPost() { getEmojiMap, (post, author, reactions, isFlagged, emojiMap) => { return (intl) => createAriaLabelForPost(post, author, isFlagged, reactions, intl, emojiMap); - } + }, ); } @@ -468,7 +468,7 @@ export function splitMessageBasedOnCaretPosition(caretPosition, message) { export function getNewMessageIndex(postListIds) { return postListIds.findIndex( - (item) => item.indexOf(PostListRowListIds.START_OF_NEW_MESSAGES) === 0 + (item) => item.indexOf(PostListRowListIds.START_OF_NEW_MESSAGES) === 0, ); } @@ -483,6 +483,6 @@ export function makeGetReplyCount() { // Count the number of non-ephemeral posts in the thread return postIds.map((id) => allPosts[id]).filter((post) => post && !isPostEphemeral(post)).length; - } + }, ); } diff --git a/utils/test_helper.ts b/utils/test_helper.ts index 2bb152d7a29d..d50407bafc23 100644 --- a/utils/test_helper.ts +++ b/utils/test_helper.ts @@ -37,8 +37,8 @@ export class TestHelper { mark_unread: 'mention', mention_keys: '', push: 'none', - push_status: 'offline' - } + push_status: 'offline', + }, }; return Object.assign({}, defaultUser, override); } @@ -52,7 +52,7 @@ export class TestHelper { user_id: '', username: '', description: '', - display_name: '' + display_name: '', }; return Object.assign({}, defaultBot, override); } diff --git a/utils/text_formatting.test.jsx b/utils/text_formatting.test.jsx index 4764ffd14847..fae595d1da34 100644 --- a/utils/text_formatting.test.jsx +++ b/utils/text_formatting.test.jsx @@ -181,22 +181,22 @@ describe('handleUnicodeEmoji', () => { { description: 'should correctly match gendered emojis', text: '🙅‍♀️🙅‍♂️', - output: '🙅‍♀️🙅‍♂️' + output: '🙅‍♀️🙅‍♂️', }, { description: 'should correctly match flags', text: '🏳️🇨🇦🇫🇮', - output: '🏳️🇨🇦🇫🇮' + output: '🏳️🇨🇦🇫🇮', }, { description: 'should correctly match emojis with skin tones', text: '👍🏿👍🏻', - output: '👍🏿👍🏻' + output: '👍🏿👍🏻', }, { description: 'should correctly match combined emojis', text: '👨‍👩‍👧‍👦👨‍❤️‍👨', - output: '👨‍👩‍👧‍👦👨‍❤️‍👨' + output: '👨‍👩‍👧‍👦👨‍❤️‍👨', }, ]; diff --git a/utils/text_formatting.tsx b/utils/text_formatting.tsx index a7a881b61a55..e15632b7f90e 100644 --- a/utils/text_formatting.tsx +++ b/utils/text_formatting.tsx @@ -189,7 +189,7 @@ const cjkPattern = /[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00- export function formatText( text: string, inputOptions: TextFormattingOptions = DEFAULT_OPTIONS, - emojiMap: EmojiMap + emojiMap: EmojiMap, ) { if (!text || typeof text !== 'string') { return ''; @@ -256,7 +256,7 @@ export function doFormatText(text: string, options: TextFormattingOptions, emoji output, tokens, options.channelNamesMap, - options.team + options.team, ); } @@ -316,7 +316,7 @@ const reEmail = XRegExp.cache( '(^|[^\\pL\\d])(' + emailStartPattern + '[\\pL\\d.\\-]+[.]\\pL{2,4}(?=$|[^\\p{L}]))', - 'g' + 'g', ); // Convert emails into tokens @@ -324,7 +324,7 @@ function autolinkEmails(text: string, tokens: Tokens) { function replaceEmailWithToken( fullMatch: string, prefix: string, - email: string + email: string, ) { const index = tokens.size; const alias = `$MM_EMAIL${index}$`; @@ -368,7 +368,7 @@ export function autolinkAtMentions(text: string, tokens: Tokens) { // handle @channel, @all, @here mentions first (supports trailing punctuation) output = output.replace( Constants.SPECIAL_MENTIONS_REGEX, - replaceAtMentionWithToken + replaceAtMentionWithToken, ); // handle all other mentions (supports trailing punctuation) @@ -389,7 +389,7 @@ function autolinkChannelMentions( text: string, tokens: Tokens, channelNamesMap: ChannelNamesMap, - team?: Team + team?: Team, ) { function channelMentionExists(c: string) { return Boolean(channelNamesMap[c]); @@ -420,7 +420,7 @@ function autolinkChannelMentions( function replaceChannelMentionWithToken( fullMatch: string, mention: string, - channelName: string + channelName: string, ) { let channelNameLower = channelName.toLowerCase(); @@ -435,7 +435,7 @@ function autolinkChannelMentions( channelNameLower, teamName, mention, - escapeHtml(channelValue.display_name) + escapeHtml(channelValue.display_name), ); return alias; } @@ -458,7 +458,7 @@ function autolinkChannelMentions( channelNameLower, teamName, '~' + channelNameLower, - escapeHtml(channelValue.display_name) + escapeHtml(channelValue.display_name), ); return alias + suffix; } @@ -474,7 +474,7 @@ function autolinkChannelMentions( let output = text; output = output.replace( /\B(~([a-z0-9.\-_]*))/gi, - replaceChannelMentionWithToken + replaceChannelMentionWithToken, ); return output; @@ -498,7 +498,7 @@ const htmlEntities = { export function escapeHtml(text: string) { return text.replace( /[&<>"']/g, - (match: string) => htmlEntities[match as keyof (typeof htmlEntities)] + (match: string) => htmlEntities[match as keyof (typeof htmlEntities)], ); } @@ -514,7 +514,7 @@ export function convertEntityToCharacter(text: string) { function highlightCurrentMentions( text: string, tokens: Tokens, - mentionKeys: MentionKey[] = [] + mentionKeys: MentionKey[] = [], ) { let output = text; @@ -545,7 +545,7 @@ function highlightCurrentMentions( fullMatch: string, prefix: string, mention: string, - suffix = '' + suffix = '', ) { const index = tokens.size; const alias = `$MM_SELFMENTION${index}$`; @@ -575,7 +575,7 @@ function highlightCurrentMentions( } else { pattern = new RegExp( `(^|\\W)(${escapeRegex(mention.key)})(\\b|_+\\b)`, - flags + flags, ); } output = output.replace(pattern, replaceCurrentMentionWithToken); @@ -587,7 +587,7 @@ function highlightCurrentMentions( function autolinkHashtags( text: string, tokens: Tokens, - minimumHashtagLength = 3 + minimumHashtagLength = 3, ) { let output = text; @@ -616,7 +616,7 @@ function autolinkHashtags( function replaceHashtagWithToken( fullMatch: string, prefix: string, - originalText: string + originalText: string, ) { const index = tokens.size; const alias = `$MM_HASHTAG${index}$`; @@ -637,7 +637,7 @@ function autolinkHashtags( return output.replace( XRegExp.cache('(^|\\W)(#\\pL[\\pL\\d\\-_.]*[\\pL\\d])', 'g'), - replaceHashtagWithToken + replaceHashtagWithToken, ); } @@ -686,14 +686,14 @@ export function parseSearchTerms(searchTerm: string) { // break the text up into words based on how the server splits them in SqlPostStore.SearchPosts and then discard empty terms terms.push( - ...captured[0].split(/[ <>+()~@]/).filter((term) => Boolean(term)) + ...captured[0].split(/[ <>+()~@]/).filter((term) => Boolean(term)), ); continue; } // we should never reach this point since at least one of the regexes should match something in the remaining text throw new Error( - 'Infinite loop in search term parsing: "' + termString + '"' + 'Infinite loop in search term parsing: "' + termString + '"', ); } @@ -733,7 +733,7 @@ function convertSearchTermToRegex(term: string): SearchPattern { export function highlightSearchTerms( text: string, tokens: Tokens, - searchPatterns: SearchPattern[] + searchPatterns: SearchPattern[], ) { if (!searchPatterns || searchPatterns.length === 0) { return text; @@ -744,7 +744,7 @@ export function highlightSearchTerms( function replaceSearchTermWithToken( match: string, prefix: string, - word: string + word: string, ) { const index = tokens.size; const alias = `$MM_SEARCHTERM${index}$`; diff --git a/utils/text_formatting_at_mentions.test.jsx b/utils/text_formatting_at_mentions.test.jsx index a60158731fea..994e5ad37f8c 100644 --- a/utils/text_formatting_at_mentions.test.jsx +++ b/utils/text_formatting_at_mentions.test.jsx @@ -10,79 +10,79 @@ describe('TextFormatting.AtMentions', () => { assert.equal( TextFormatting.autolinkAtMentions('@user', new Map()), '$MM_ATMENTION0$', - 'should replace mention with token' + 'should replace mention with token', ); assert.equal( TextFormatting.autolinkAtMentions('abc"@user"def', new Map()), 'abc"$MM_ATMENTION0$"def', - 'should replace mention surrounded by punctuation with token' + 'should replace mention surrounded by punctuation with token', ); assert.equal( TextFormatting.autolinkAtMentions('@user1 @user2', new Map()), '$MM_ATMENTION0$ $MM_ATMENTION1$', - 'should replace multiple mentions with tokens' + 'should replace multiple mentions with tokens', ); assert.equal( TextFormatting.autolinkAtMentions('@user1/@user2/@user3', new Map()), '$MM_ATMENTION0$/$MM_ATMENTION1$/$MM_ATMENTION2$', - 'should replace multiple mentions with tokens' + 'should replace multiple mentions with tokens', ); assert.equal( TextFormatting.autolinkAtMentions('@us_-e.r', new Map()), '$MM_ATMENTION0$', - 'should replace multiple mentions containing punctuation with token' + 'should replace multiple mentions containing punctuation with token', ); assert.equal( TextFormatting.autolinkAtMentions('@user.', new Map()), '$MM_ATMENTION0$', - 'should capture trailing punctuation as part of mention' + 'should capture trailing punctuation as part of mention', ); assert.equal( TextFormatting.autolinkAtMentions('@foo.com @bar.com', new Map()), '$MM_ATMENTION0$ $MM_ATMENTION1$', - 'should capture two at mentions with space in between' + 'should capture two at mentions with space in between', ); assert.equal( TextFormatting.autolinkAtMentions('@foo.com@bar.com', new Map()), '$MM_ATMENTION0$$MM_ATMENTION1$', - 'should capture two at mentions without space in between' + 'should capture two at mentions without space in between', ); assert.equal( TextFormatting.autolinkAtMentions('@foo.com@bar.com@baz.com', new Map()), '$MM_ATMENTION0$$MM_ATMENTION1$$MM_ATMENTION2$', - 'should capture multiple at mentions without space in between' + 'should capture multiple at mentions without space in between', ); }); it('Not at mentions', () => { assert.equal( TextFormatting.autolinkAtMentions('user@host', new Map()), - 'user@host' + 'user@host', ); assert.equal( TextFormatting.autolinkAtMentions('user@email.com', new Map()), - 'user@email.com' + 'user@email.com', ); assert.equal( TextFormatting.autolinkAtMentions('@', new Map()), - '@' + '@', ); assert.equal( TextFormatting.autolinkAtMentions('@ ', new Map()), - '@ ' + '@ ', ); assert.equal( TextFormatting.autolinkAtMentions(':@', new Map()), - ':@' + ':@', ); }); @@ -130,27 +130,27 @@ describe('TextFormatting.AtMentions', () => { assert.equal( TextFormatting.formatText('@foo.com @bar.com', {atMentions: true, mentionKeys: [{key: '@foo.com'}]}).trim(), '

@foo.com @bar.com

', - 'should highlight first at mention, with space in between' + 'should highlight first at mention, with space in between', ); assert.equal( TextFormatting.formatText('@foo.com @bar.com', {atMentions: true, mentionKeys: [{key: '@bar.com'}]}).trim(), '

@foo.com @bar.com

', - 'should highlight second at mention, with space in between' + 'should highlight second at mention, with space in between', ); assert.equal( TextFormatting.formatText('@foo.com@bar.com', {atMentions: true, mentionKeys: [{key: '@foo.com'}]}).trim(), '

@foo.com@bar.com

', - 'should highlight first at mention, without space in between' + 'should highlight first at mention, without space in between', ); assert.equal( TextFormatting.formatText('@foo.com@bar.com', {atMentions: true, mentionKeys: [{key: '@bar.com'}]}).trim(), '

@foo.com@bar.com

', - 'should highlight second at mention, without space in between' + 'should highlight second at mention, without space in between', ); assert.equal( TextFormatting.formatText('@foo.com@bar.com', {atMentions: true, mentionKeys: [{key: '@user'}]}).trim(), '

@foo.com@bar.com

', - 'should not highlight any at mention' + 'should not highlight any at mention', ); }); }); diff --git a/utils/text_formatting_channel_links.test.jsx b/utils/text_formatting_channel_links.test.jsx index 07bd590f970d..dc06d2b5ea2f 100644 --- a/utils/text_formatting_channel_links.test.jsx +++ b/utils/text_formatting_channel_links.test.jsx @@ -6,15 +6,15 @@ import * as TextFormatting from 'utils/text_formatting'; describe('TextFormatting.ChannelLinks', () => { test('Not channel links', () => { expect( - TextFormatting.formatText('~123').trim() + TextFormatting.formatText('~123').trim(), ).toBe( - '

~123

' + '

~123

', ); expect( - TextFormatting.formatText('~town-square').trim() + TextFormatting.formatText('~town-square').trim(), ).toBe( - '

~town-square

' + '

~town-square

', ); }); @@ -28,9 +28,9 @@ describe('TextFormatting.ChannelLinks', () => { TextFormatting.formatText('~town-square', { channelNamesMap: {'town-square': {display_name: 'Town Square'}}, team: {name: 'myteam'}, - }).trim() + }).trim(), ).toBe( - '

~Town Square

' + '

~Town Square

', ); }); @@ -39,9 +39,9 @@ describe('TextFormatting.ChannelLinks', () => { TextFormatting.formatText('~town-square.', { channelNamesMap: {'town-square': {display_name: 'Town Square'}}, team: {name: 'myteam'}, - }).trim() + }).trim(), ).toBe( - '

~Town Square.

' + '

~Town Square.

', ); }); @@ -50,9 +50,9 @@ describe('TextFormatting.ChannelLinks', () => { TextFormatting.formatText('~town-square', { channelNamesMap: {'town-square': {display_name: 'Reception'}}, team: {name: 'myteam'}, - }).trim() + }).trim(), ).toBe( - '

~<b>Reception</b>

' + '

~<b>Reception</b>

', ); }); @@ -62,9 +62,9 @@ describe('TextFormatting.ChannelLinks', () => { TextFormatting.formatText('~town-square', { channelNamesMap: {'town-square': {display_name: 'Reception'}}, team: {name: 'myteam'}, - }).trim() + }).trim(), ).toBe( - '

~<b>Reception</b>

' + '

~<b>Reception</b>

', ); }); @@ -73,9 +73,9 @@ describe('TextFormatting.ChannelLinks', () => { TextFormatting.formatText('(~town-square)', { channelNamesMap: {'town-square': {display_name: 'Town Square'}}, team: {name: 'myteam'}, - }).trim() + }).trim(), ).toBe( - '

(~Town Square)

' + '

(~Town Square)

', ); }); }); @@ -86,9 +86,9 @@ describe('TextFormatting.ChannelLinks', () => { TextFormatting.formatText('aa~town-square', { channelNamesMap: {'town-square': {display_name: 'Town Square'}}, team: {name: 'myteam'}, - }).trim() + }).trim(), ).toBe( - '

aa~town-square

' + '

aa~town-square

', ); }); }); diff --git a/utils/text_formatting_hashtags.test.jsx b/utils/text_formatting_hashtags.test.jsx index e36fc5140022..c26afef10f91 100644 --- a/utils/text_formatting_hashtags.test.jsx +++ b/utils/text_formatting_hashtags.test.jsx @@ -9,17 +9,17 @@ describe('TextFormatting.Hashtags with default setting', () => { it('Not hashtags', (done) => { assert.equal( TextFormatting.formatText('# hashtag').trim(), - '

hashtag

' + '

hashtag

', ); assert.equal( TextFormatting.formatText('#ab').trim(), - '

#ab

' + '

#ab

', ); assert.equal( TextFormatting.formatText('#123test').trim(), - '

#123test

' + '

#123test

', ); done(); @@ -28,52 +28,52 @@ describe('TextFormatting.Hashtags with default setting', () => { it('Hashtags', (done) => { assert.equal( TextFormatting.formatText('#test').trim(), - "

#test

" + "

#test

", ); assert.equal( TextFormatting.formatText('#test123').trim(), - "

#test123

" + "

#test123

", ); assert.equal( TextFormatting.formatText('#test-test').trim(), - "

#test-test

" + "

#test-test

", ); assert.equal( TextFormatting.formatText('#test_test').trim(), - "

#test_test

" + "

#test_test

", ); assert.equal( TextFormatting.formatText('#test.test').trim(), - "

#test.test

" + "

#test.test

", ); assert.equal( TextFormatting.formatText('#test1/#test2').trim(), - "

#test1/#test2

" + "

#test1/#test2

", ); assert.equal( TextFormatting.formatText('(#test)').trim(), - "

(#test)

" + "

(#test)

", ); assert.equal( TextFormatting.formatText('#test-').trim(), - "

#test-

" + "

#test-

", ); assert.equal( TextFormatting.formatText('#test.').trim(), - "

#test.

" + "

#test.

", ); assert.equal( TextFormatting.formatText('This is a sentence #test containing a hashtag').trim(), - "

This is a sentence #test containing a hashtag

" + "

This is a sentence #test containing a hashtag

", ); done(); @@ -82,27 +82,27 @@ describe('TextFormatting.Hashtags with default setting', () => { it('Formatted hashtags', (done) => { assert.equal( TextFormatting.formatText('*#test*').trim(), - "

#test

" + "

#test

", ); assert.equal( TextFormatting.formatText('_#test_').trim(), - "

#test

" + "

#test

", ); assert.equal( TextFormatting.formatText('**#test**').trim(), - "

#test

" + "

#test

", ); assert.equal( TextFormatting.formatText('__#test__').trim(), - "

#test

" + "

#test

", ); assert.equal( TextFormatting.formatText('~~#test~~').trim(), - "

#test

" + "

#test

", ); assert.equal( @@ -113,12 +113,12 @@ describe('TextFormatting.Hashtags with default setting', () => { '#test' + '' + '' + - '

' + '

', ); assert.equal( TextFormatting.formatText('[this is a link #test](example.com)').trim(), - '

this is a link #test

' + '

this is a link #test

', ); done(); @@ -127,27 +127,27 @@ describe('TextFormatting.Hashtags with default setting', () => { it('Searching for hashtags', (done) => { assert.equal( TextFormatting.formatText('#test', {searchTerm: 'test'}).trim(), - '

#test

' + '

#test

', ); assert.equal( TextFormatting.formatText('#test', {searchTerm: '#test'}).trim(), - '

#test

' + '

#test

', ); assert.equal( TextFormatting.formatText('#foo/#bar', {searchTerm: '#foo'}).trim(), - '

#foo/#bar

' + '

#foo/#bar

', ); assert.equal( TextFormatting.formatText('#foo/#bar', {searchTerm: 'bar'}).trim(), - '

#foo/#bar

' + '

#foo/#bar

', ); assert.equal( TextFormatting.formatText('not#test', {searchTerm: '#test'}).trim(), - '

not#test

' + '

not#test

', ); done(); @@ -156,7 +156,7 @@ describe('TextFormatting.Hashtags with default setting', () => { it('Potential hashtags with other entities nested', (done) => { assert.equal( TextFormatting.formatText('#@test').trim(), - '

#@test

' + '

#@test

', ); let options = { @@ -164,12 +164,12 @@ describe('TextFormatting.Hashtags with default setting', () => { }; assert.equal( TextFormatting.formatText('#@test', options).trim(), - '

#@test

' + '

#@test

', ); assert.equal( TextFormatting.formatText('#~test').trim(), - '

#~test

' + '

#~test

', ); options = { @@ -180,17 +180,17 @@ describe('TextFormatting.Hashtags with default setting', () => { }; assert.equal( TextFormatting.formatText('#~test', options).trim(), - '

#~Test Channel

' + '

#~Test Channel

', ); assert.equal( TextFormatting.formatText('#:mattermost:').trim(), - '

#:mattermost:

' + '

#:mattermost:

', ); assert.equal( TextFormatting.formatText('#test@example.com').trim(), - "

#test@example.com

" + "

#test@example.com

", ); done(); @@ -201,20 +201,20 @@ describe('TextFormatting.Hashtags with various settings', () => { it('Boundary of MinimumHashtagLength', (done) => { assert.equal( TextFormatting.formatText('#疑問', {minimumHashtagLength: 2}).trim(), - "

#疑問

" + "

#疑問

", ); assert.equal( TextFormatting.formatText('This is a sentence #疑問 containing a hashtag', {minimumHashtagLength: 2}).trim(), - "

This is a sentence #疑問 containing a hashtag

" + "

This is a sentence #疑問 containing a hashtag

", ); assert.equal( TextFormatting.formatText('#疑', {minimumHashtagLength: 2}).trim(), - '

#疑

' + '

#疑

', ); assert.equal( TextFormatting.formatText('This is a sentence #疑 containing a hashtag', {minimumHashtagLength: 2}).trim(), - '

This is a sentence #疑 containing a hashtag

' + '

This is a sentence #疑 containing a hashtag

', ); done(); diff --git a/utils/text_formatting_imgs.test.jsx b/utils/text_formatting_imgs.test.jsx index 5050c4ec3fa4..f8c2630ecbc1 100644 --- a/utils/text_formatting_imgs.test.jsx +++ b/utils/text_formatting_imgs.test.jsx @@ -10,7 +10,7 @@ describe('Markdown.Imgs', () => { it('Inline mage', (done) => { assert.equal( Markdown.format('![Mattermost](/images/icon.png)').trim(), - '

Mattermost

' + '

Mattermost

', ); done(); @@ -19,7 +19,7 @@ describe('Markdown.Imgs', () => { it('Image with hover text', (done) => { assert.equal( Markdown.format('![Mattermost](/images/icon.png "Mattermost Icon")').trim(), - '

Mattermost

' + '

Mattermost

', ); done(); @@ -28,7 +28,7 @@ describe('Markdown.Imgs', () => { it('Image with link', (done) => { assert.equal( Markdown.format('[![Mattermost](../../images/icon-76x76.png)](https://github.com/mattermost/platform)').trim(), - '

Mattermost

' + '

Mattermost

', ); done(); @@ -37,7 +37,7 @@ describe('Markdown.Imgs', () => { it('Image with width and height', (done) => { assert.equal( Markdown.format('![Mattermost](../../images/icon-76x76.png =50x76 "Mattermost Icon")').trim(), - '

Mattermost

' + '

Mattermost

', ); done(); @@ -46,7 +46,7 @@ describe('Markdown.Imgs', () => { it('Image with width', (done) => { assert.equal( Markdown.format('![Mattermost](../../images/icon-76x76.png =50 "Mattermost Icon")').trim(), - '

Mattermost

' + '

Mattermost

', ); done(); @@ -60,7 +60,7 @@ describe('Text-formatted inline markdown images', () => { assert.equal( output, - '
Mattermost
' + '
Mattermost
', ); done(); diff --git a/utils/text_formatting_links.test.jsx b/utils/text_formatting_links.test.jsx index de85cabcf575..f7e563fcb024 100644 --- a/utils/text_formatting_links.test.jsx +++ b/utils/text_formatting_links.test.jsx @@ -10,22 +10,22 @@ describe('Markdown.Links', () => { it('Not links', () => { assert.equal( Markdown.format('example.com').trim(), - '

example.com

' + '

example.com

', ); assert.equal( Markdown.format('readme.md').trim(), - '

readme.md

' + '

readme.md

', ); assert.equal( Markdown.format('@example.com').trim(), - '

@example.com

' + '

@example.com

', ); assert.equal( Markdown.format('./make-compiled-client.sh').trim(), - '

./make-compiled-client.sh

' + '

./make-compiled-client.sh

', ); assert.equal( @@ -36,456 +36,456 @@ describe('Markdown.Links', () => { 'https://example.com' + '' + '' + - '

' + '

', ); assert.equal( Markdown.format('[link](example.com').trim(), - '

[link](example.com

' + '

[link](example.com

', ); }); it('External links', () => { assert.equal( Markdown.format('test.:test').trim(), - '

test.:test

' + '

test.:test

', ); assert.equal( Markdown.format('http://example.com').trim(), - '

http://example.com

' + '

http://example.com

', ); assert.equal( Markdown.format('https://example.com').trim(), - '

https://example.com

' + '

https://example.com

', ); assert.equal( Markdown.format('www.example.com').trim(), - '

www.example.com

' + '

www.example.com

', ); assert.equal( Markdown.format('www.example.com/index').trim(), - '

www.example.com/index

' + '

www.example.com/index

', ); assert.equal( Markdown.format('www.example.com/index.html').trim(), - '

www.example.com/index.html

' + '

www.example.com/index.html

', ); assert.equal( Markdown.format('www.example.com/index/sub').trim(), - '

www.example.com/index/sub

' + '

www.example.com/index/sub

', ); assert.equal( Markdown.format('www1.example.com').trim(), - '

www1.example.com

' + '

www1.example.com

', ); assert.equal( Markdown.format('example.com/index').trim(), - '

example.com/index

' + '

example.com/index

', ); }); it('IP addresses', () => { assert.equal( Markdown.format('http://127.0.0.1').trim(), - '

http://127.0.0.1

' + '

http://127.0.0.1

', ); assert.equal( Markdown.format('http://192.168.1.1:4040').trim(), - '

http://192.168.1.1:4040

' + '

http://192.168.1.1:4040

', ); assert.equal( Markdown.format('http://[::1]:80').trim(), - '

http://[::1]:80

' + '

http://[::1]:80

', ); assert.equal( Markdown.format('http://[::1]:8065').trim(), - '

http://[::1]:8065

' + '

http://[::1]:8065

', ); assert.equal( Markdown.format('https://[::1]:80').trim(), - '

https://[::1]:80

' + '

https://[::1]:80

', ); assert.equal( Markdown.format('http://[2001:0:5ef5:79fb:303a:62d5:3312:ff42]:80').trim(), - '

http://[2001:0:5ef5:79fb:303a:62d5:3312:ff42]:80

' + '

http://[2001:0:5ef5:79fb:303a:62d5:3312:ff42]:80

', ); assert.equal( Markdown.format('http://[2001:0:5ef5:79fb:303a:62d5:3312:ff42]:8065').trim(), - '

http://[2001:0:5ef5:79fb:303a:62d5:3312:ff42]:8065

' + '

http://[2001:0:5ef5:79fb:303a:62d5:3312:ff42]:8065

', ); assert.equal( Markdown.format('https://[2001:0:5ef5:79fb:303a:62d5:3312:ff42]:443').trim(), - '

https://[2001:0:5ef5:79fb:303a:62d5:3312:ff42]:443

' + '

https://[2001:0:5ef5:79fb:303a:62d5:3312:ff42]:443

', ); assert.equal( Markdown.format('http://username:password@127.0.0.1').trim(), - '

http://username:password@127.0.0.1

' + '

http://username:password@127.0.0.1

', ); assert.equal( Markdown.format('http://username:password@[2001:0:5ef5:79fb:303a:62d5:3312:ff42]:80').trim(), - '

http://username:password@[2001:0:5ef5:79fb:303a:62d5:3312:ff42]:80

' + '

http://username:password@[2001:0:5ef5:79fb:303a:62d5:3312:ff42]:80

', ); }); it('Links with anchors', () => { assert.equal( Markdown.format('https://en.wikipedia.org/wiki/URLs#Syntax').trim(), - '

https://en.wikipedia.org/wiki/URLs#Syntax

' + '

https://en.wikipedia.org/wiki/URLs#Syntax

', ); assert.equal( Markdown.format('https://groups.google.com/forum/#!msg').trim(), - '

https://groups.google.com/forum/#!msg

' + '

https://groups.google.com/forum/#!msg

', ); }); it('Links with parameters', () => { assert.equal( Markdown.format('www.example.com/index?params=1').trim(), - '

www.example.com/index?params=1

' + '

www.example.com/index?params=1

', ); assert.equal( Markdown.format('www.example.com/index?params=1&other=2').trim(), - '

www.example.com/index?params=1&other=2

' + '

www.example.com/index?params=1&other=2

', ); assert.equal( Markdown.format('www.example.com/index?params=1;other=2').trim(), - '

www.example.com/index?params=1;other=2

' + '

www.example.com/index?params=1;other=2

', ); assert.equal( Markdown.format('http://example.com:8065').trim(), - '

http://example.com:8065

' + '

http://example.com:8065

', ); assert.equal( Markdown.format('http://username:password@example.com').trim(), - '

http://username:password@example.com

' + '

http://username:password@example.com

', ); }); it('Special characters', () => { assert.equal( Markdown.format('http://www.example.com/_/page').trim(), - '

http://www.example.com/_/page

' + '

http://www.example.com/_/page

', ); assert.equal( Markdown.format('www.example.com/_/page').trim(), - '

www.example.com/_/page

' + '

www.example.com/_/page

', ); assert.equal( Markdown.format('https://en.wikipedia.org/wiki/🐬').trim(), - '

https://en.wikipedia.org/wiki/🐬

' + '

https://en.wikipedia.org/wiki/🐬

', ); assert.equal( Markdown.format('http://✪df.ws/1234').trim(), - '

http://✪df.ws/1234

' + '

http://✪df.ws/1234

', ); }); it('Brackets', () => { assert.equal( Markdown.format('https://en.wikipedia.org/wiki/Rendering_(computer_graphics)').trim(), - '

https://en.wikipedia.org/wiki/Rendering_(computer_graphics)

' + '

https://en.wikipedia.org/wiki/Rendering_(computer_graphics)

', ); assert.equal( Markdown.format('http://example.com/more_(than)_one_(parens)').trim(), - '

http://example.com/more_(than)_one_(parens)

' + '

http://example.com/more_(than)_one_(parens)

', ); assert.equal( Markdown.format('http://example.com/(something)?after=parens').trim(), - '

http://example.com/(something)?after=parens

' + '

http://example.com/(something)?after=parens

', ); assert.equal( Markdown.format('http://foo.com/unicode_(✪)_in_parens').trim(), - '

http://foo.com/unicode_(✪)_in_parens

' + '

http://foo.com/unicode_(✪)_in_parens

', ); }); it('Email addresses', () => { assert.equal( Markdown.format('test@example.com').trim(), - '

test@example.com

' + '

test@example.com

', ); assert.equal( Markdown.format('test_underscore@example.com').trim(), - '

test_underscore@example.com

' + '

test_underscore@example.com

', ); assert.equal( Markdown.format('mailto:test@example.com').trim(), - '

mailto:test@example.com

' + '

mailto:test@example.com

', ); }); it('Formatted links', () => { assert.equal( Markdown.format('*https://example.com*').trim(), - '

https://example.com

' + '

https://example.com

', ); assert.equal( Markdown.format('_https://example.com_').trim(), - '

https://example.com

' + '

https://example.com

', ); assert.equal( Markdown.format('**https://example.com**').trim(), - '

https://example.com

' + '

https://example.com

', ); assert.equal( Markdown.format('__https://example.com__').trim(), - '

https://example.com

' + '

https://example.com

', ); assert.equal( Markdown.format('***https://example.com***').trim(), - '

https://example.com

' + '

https://example.com

', ); assert.equal( Markdown.format('___https://example.com___').trim(), - '

https://example.com

' + '

https://example.com

', ); assert.equal( Markdown.format('').trim(), - '

https://example.com

' + '

https://example.com

', ); assert.equal( Markdown.format('').trim(), - '

https://en.wikipedia.org/wiki/Rendering_(computer_graphics)

' + '

https://en.wikipedia.org/wiki/Rendering_(computer_graphics)

', ); }); it('Links with text', () => { assert.equal( Markdown.format('[example link](example.com)').trim(), - '

example link

' + '

example link

', ); assert.equal( Markdown.format('[example.com](example.com)').trim(), - '

example.com

' + '

example.com

', ); assert.equal( Markdown.format('[example.com/other](example.com)').trim(), - '

example.com/other

' + '

example.com/other

', ); assert.equal( Markdown.format('[example.com/other_link](example.com/example)').trim(), - '

example.com/other_link

' + '

example.com/other_link

', ); assert.equal( Markdown.format('[link with spaces](example.com/ spaces in the url)').trim(), - '

link with spaces

' + '

link with spaces

', ); assert.equal( Markdown.format('[This whole #sentence should be a link](https://example.com)').trim(), - '

This whole #sentence should be a link

' + '

This whole #sentence should be a link

', ); assert.equal( Markdown.format('[email link](mailto:test@example.com)').trim(), - '

email link

' + '

email link

', ); assert.equal( Markdown.format('[other link](ts3server://example.com)').trim(), - '

other link

' + '

other link

', ); }); it('Links with tooltips', () => { assert.equal( Markdown.format('[link](example.com "catch phrase!")').trim(), - '

link

' + '

link

', ); assert.equal( Markdown.format('[link](example.com "title with "quotes"")').trim(), - '

link

' + '

link

', ); assert.equal( Markdown.format('[link with spaces](example.com/ spaces in the url "and a title")').trim(), - '

link with spaces

' + '

link with spaces

', ); }); it('Links with surrounding text', () => { assert.equal( Markdown.format('This is a sentence with a http://example.com in it.').trim(), - '

This is a sentence with a http://example.com in it.

' + '

This is a sentence with a http://example.com in it.

', ); assert.equal( Markdown.format('This is a sentence with a http://example.com/_/underscore in it.').trim(), - '

This is a sentence with a http://example.com/_/underscore in it.

' + '

This is a sentence with a http://example.com/_/underscore in it.

', ); assert.equal( Markdown.format('This is a sentence with a http://192.168.1.1:4040 in it.').trim(), - '

This is a sentence with a http://192.168.1.1:4040 in it.

' + '

This is a sentence with a http://192.168.1.1:4040 in it.

', ); assert.equal( Markdown.format('This is a sentence with a https://[::1]:80 in it.').trim(), - '

This is a sentence with a https://[::1]:80 in it.

' + '

This is a sentence with a https://[::1]:80 in it.

', ); }); it('Links with trailing punctuation', () => { assert.equal( Markdown.format('This is a link to http://example.com.').trim(), - '

This is a link to http://example.com.

' + '

This is a link to http://example.com.

', ); assert.equal( Markdown.format('This is a link containing http://example.com/something?with,commas,in,url, but not at the end').trim(), - '

This is a link containing http://example.com/something?with,commas,in,url, but not at the end

' + '

This is a link containing http://example.com/something?with,commas,in,url, but not at the end

', ); assert.equal( Markdown.format('This is a question about a link http://example.com?').trim(), - '

This is a question about a link http://example.com?

' + '

This is a question about a link http://example.com?

', ); }); it('Links with surrounding brackets', () => { assert.equal( Markdown.format('(http://example.com)').trim(), - '

(http://example.com)

' + '

(http://example.com)

', ); assert.equal( Markdown.format('(see http://example.com)').trim(), - '

(see http://example.com)

' + '

(see http://example.com)

', ); assert.equal( Markdown.format('(http://example.com watch this)').trim(), - '

(http://example.com watch this)

' + '

(http://example.com watch this)

', ); assert.equal( Markdown.format('(www.example.com)').trim(), - '

(www.example.com)

' + '

(www.example.com)

', ); assert.equal( Markdown.format('(see www.example.com)').trim(), - '

(see www.example.com)

' + '

(see www.example.com)

', ); assert.equal( Markdown.format('(www.example.com watch this)').trim(), - '

(www.example.com watch this)

' + '

(www.example.com watch this)

', ); assert.equal( Markdown.format('([link](http://example.com))').trim(), - '

(link)

' + '

(link)

', ); assert.equal( Markdown.format('(see [link](http://example.com))').trim(), - '

(see link)

' + '

(see link)

', ); assert.equal( Markdown.format('([link](http://example.com) watch this)').trim(), - '

(link watch this)

' + '

(link watch this)

', ); assert.equal( Markdown.format('(test@example.com)').trim(), - '

(test@example.com)

' + '

(test@example.com)

', ); assert.equal( Markdown.format('(email test@example.com)').trim(), - '

(email test@example.com)

' + '

(email test@example.com)

', ); assert.equal( Markdown.format('(test@example.com email)').trim(), - '

(test@example.com email)

' + '

(test@example.com email)

', ); assert.equal( Markdown.format('This is a sentence with a [link](http://example.com) in it.').trim(), - '

This is a sentence with a link in it.

' + '

This is a sentence with a link in it.

', ); assert.equal( Markdown.format('This is a sentence with a link (http://example.com) in it.').trim(), - '

This is a sentence with a link (http://example.com) in it.

' + '

This is a sentence with a link (http://example.com) in it.

', ); assert.equal( Markdown.format('This is a sentence with a (https://en.wikipedia.org/wiki/Rendering_(computer_graphics)) in it.').trim(), - '

This is a sentence with a (https://en.wikipedia.org/wiki/Rendering_(computer_graphics)) in it.

' + '

This is a sentence with a (https://en.wikipedia.org/wiki/Rendering_(computer_graphics)) in it.

', ); }); it('Searching for links', () => { assert.equal( TextFormatting.formatText('https://en.wikipedia.org/wiki/Unix', {searchTerm: 'wikipedia'}).trim(), - '

https://en.wikipedia.org/wiki/Unix

' + '

https://en.wikipedia.org/wiki/Unix

', ); assert.equal( TextFormatting.formatText('[Link](https://en.wikipedia.org/wiki/Unix)', {searchTerm: 'unix'}).trim(), - '

Link

' + '

Link

', ); }); it('Links containing %', () => { assert.equal( Markdown.format('https://en.wikipedia.org/wiki/%C3%89').trim(), - '

https://en.wikipedia.org/wiki/%C3%89

' + '

https://en.wikipedia.org/wiki/%C3%89

', ); assert.equal( Markdown.format('https://en.wikipedia.org/wiki/%E9').trim(), - '

https://en.wikipedia.org/wiki/%E9

' + '

https://en.wikipedia.org/wiki/%E9

', ); }); it('Relative link', () => { assert.equal( Markdown.format('[A Relative Link](/static/files/5b4a7904a3e041018526a00dba59ee48.png)').trim(), - '

A Relative Link

' + '

A Relative Link

', ); }); diff --git a/utils/utils.jsx b/utils/utils.jsx index 1a664f8d24de..4b7b9e52a631 100644 --- a/utils/utils.jsx +++ b/utils/utils.jsx @@ -90,7 +90,7 @@ export function isUnhandledLineBreakKeyCombo(e) { return Boolean( isKeyPressed(e, Constants.KeyCodes.ENTER) && !e.shiftKey && // shift + enter is already handled everywhere, so don't handle again - (e.altKey && !UserAgent.isSafari() && !cmdOrCtrlPressed(e)) // alt/option + enter is already handled in Safari, so don't handle again + (e.altKey && !UserAgent.isSafari() && !cmdOrCtrlPressed(e)), // alt/option + enter is already handled in Safari, so don't handle again ); } diff --git a/utils/utils.test.jsx b/utils/utils.test.jsx index fe3672c7b572..6596486fd660 100644 --- a/utils/utils.test.jsx +++ b/utils/utils.test.jsx @@ -733,7 +733,7 @@ describe('Utils.getSortedUsers', () => { expect(currentUserReacted).toEqual(true); assert.deepEqual( users, - ['You', 'username_2', 'username_3'] + ['You', 'username_2', 'username_3'], ); }); }); diff --git a/webpack.config.js b/webpack.config.js index 0679e5bb7e3e..6fc735c42aa5 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -345,7 +345,7 @@ var config = { if (!DEV) { config.plugins.push(new BrotliPlugin({ asset: '[file].br', - test: /\.(js|css)$/ + test: /\.(js|css)$/, })); }