From 7c97f8ab6e9b934e3cd8b249c48fa7bfee12612a Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Wed, 23 Jun 2021 10:37:08 +0100 Subject: [PATCH] Switch to new JSX runtime (#4225) * Use new JSX runtime and update Babel Node target * Update .eslintrc * Remove React imports GitOrigin-RevId: 559de0267f8f2934c56a860ea8701bb522aa861a --- services/web/.eslintrc | 13 ++++--- services/web/.storybook/preview.js | 2 -- services/web/babel.config.json | 34 ++++++++++++++----- .../chat/components/chat-fallback-error.js | 1 - .../chat/components/infinite-scroll.js | 2 +- .../chat/components/message-content.js | 2 +- .../features/chat/components/message-input.js | 1 - .../features/chat/components/message-list.js | 1 - .../js/features/chat/components/message.js | 1 - .../js/features/chat/context/chat-context.js | 2 +- .../components/clone-project-modal-content.js | 1 - .../components/clone-project-modal.js | 2 +- .../components/back-to-projects-button.js | 1 - .../components/chat-toggle-button.js | 1 - .../components/cobranding-logo.js | 1 - .../components/history-toggle-button.js | 1 - .../components/menu-button.js | 1 - .../components/pdf-toggle-button.js | 1 - .../components/project-name-editable-label.js | 2 +- .../components/share-project-button.js | 1 - .../components/track-changes-toggle-button.js | 1 - .../file-tree/components/file-tree-context.js | 1 - .../file-tree-create/danger-message.js | 1 - .../file-tree-create/error-message.js | 1 - .../file-tree-create-name-input.js | 2 +- .../file-tree-modal-create-file-body.js | 1 - .../file-tree-modal-create-file-footer.js | 1 - .../file-tree-modal-create-file-mode.js | 1 - .../modes/file-tree-create-new-doc.js | 2 +- .../modes/file-tree-import-from-project.js | 2 +- .../modes/file-tree-import-from-url.js | 2 +- .../modes/file-tree-upload-doc.js | 2 +- .../file-tree-create/redirect-to-login.js | 2 +- .../file-tree/components/file-tree-doc.js | 1 - .../file-tree-draggable-preview-layer.js | 2 +- .../file-tree/components/file-tree-error.js | 1 - .../components/file-tree-folder-list.js | 1 - .../file-tree/components/file-tree-folder.js | 2 +- .../file-tree-item/file-tree-item-inner.js | 2 +- .../file-tree-item-menu-items.js | 1 - .../file-tree-item/file-tree-item-menu.js | 2 +- .../file-tree-item/file-tree-item-name.js | 2 +- .../file-tree/components/file-tree-toolbar.js | 1 - .../modals/file-tree-modal-create-file.js | 1 - .../modals/file-tree-modal-create-folder.js | 2 +- .../modals/file-tree-modal-delete.js | 1 - .../modals/file-tree-modal-error.js | 2 -- .../contexts/file-tree-actionable.js | 2 +- .../contexts/file-tree-create-form.js | 2 +- .../contexts/file-tree-create-name.js | 2 +- .../file-tree/contexts/file-tree-draggable.js | 2 +- .../file-tree/contexts/file-tree-main.js | 2 +- .../file-tree/contexts/file-tree-mutable.js | 2 +- .../contexts/file-tree-selectable.js | 2 +- .../file-view/components/file-view-header.js | 2 +- .../file-view/components/file-view-image.js | 1 - .../file-view/components/file-view-text.js | 2 +- .../file-view/components/file-view.js | 2 +- .../hotkeys-modal/components/hotkeys-modal.js | 1 - .../outline/components/outline-item.js | 2 +- .../outline/components/outline-list.js | 1 - .../outline/components/outline-root.js | 1 - .../components/preview-download-button.js | 1 - .../components/preview-download-file-list.js | 1 - .../preview/components/preview-error.js | 1 - .../components/preview-first-error-pop-up.js | 1 - .../components/preview-logs-pane-entry.js | 2 +- .../preview/components/preview-logs-pane.js | 1 - .../components/preview-logs-toggle-button.js | 1 - .../components/preview-recompile-button.js | 1 - .../preview/components/preview-toolbar.js | 2 +- .../components/preview-validation-issue.js | 1 - .../components/add-collaborators-upgrade.js | 2 +- .../components/add-collaborators.js | 2 +- .../components/edit-member.js | 2 +- .../share-project-modal/components/invite.js | 2 +- .../components/link-sharing.js | 2 +- .../components/member-privileges.js | 1 - .../components/owner-info.js | 1 - .../components/select-collaborators.js | 2 +- .../components/send-invites-notice.js | 1 - .../components/send-invites.js | 2 +- .../components/share-modal-body.js | 1 - .../components/share-project-modal-content.js | 1 - .../components/transfer-ownership-modal.js | 2 +- .../components/view-member.js | 1 - .../components/symbol-palette-body.js | 1 - .../components/symbol-palette-content.js | 2 +- .../components/symbol-palette-info-link.js | 1 - .../components/symbol-palette-item.js | 2 +- .../components/symbol-palette-items.js | 2 +- .../components/symbol-palette-search.js | 2 +- .../components/symbol-palette-tabs.js | 1 - .../components/symbol-palette.js | 1 - .../components/word-count-modal-content.js | 1 - .../components/word-count-modal.js | 2 +- .../HumanReadableLogsRules.js | 1 - .../js/infrastructure/error-boundary.js | 1 - .../js/shared/components/accessible-modal.js | 2 +- .../js/shared/components/beta-badge.js | 1 - .../js/shared/components/copy-link.js | 2 +- .../web/frontend/js/shared/components/icon.js | 1 - .../js/shared/components/pagination.js | 2 +- .../js/shared/components/processing.js | 1 - .../components/start-free-trial-button.js | 2 +- .../js/shared/components/tooltip-button.js | 1 - .../js/shared/context/application-context.js | 2 +- .../js/shared/context/compile-context.js | 2 +- .../js/shared/context/editor-context.js | 2 +- .../frontend/js/shared/context/ide-context.js | 2 +- .../js/shared/context/layout-context.js | 2 +- .../js/shared/context/root-context.js | 1 - services/web/frontend/stories/chat.stories.js | 1 - .../clone-project-modal-content.stories.js | 2 -- .../stories/clone-project-modal.stories.js | 1 - .../web/frontend/stories/dropdown.stories.js | 1 - .../editor-navigation-toolbar.stories.js | 1 - .../web/frontend/stories/file-tree.stories.js | 1 - .../web/frontend/stories/file-view.stories.js | 2 -- .../stories/git-bridge-modal.stories.js | 1 - .../frontend/stories/hotkeys-modal.stories.js | 2 -- services/web/frontend/stories/icon.stories.js | 1 - .../frontend/stories/linked-file.stories.js | 1 - .../create-file-modal-decorator.js | 2 +- .../create-file-modal-footer.stories.js | 1 - .../create-file/create-file-modal.stories.js | 2 +- .../create-file-name-input.stories.js | 1 - .../create-file/error-message.stories.js | 1 - .../stories/modals/modal-decorators.js | 2 -- .../web/frontend/stories/outline.stories.js | 2 -- .../frontend/stories/pagination.stories.js | 2 -- .../preview-logs-pane-entry.stories.js | 1 - .../stories/preview-logs-pane.stories.js | 1 - .../stories/share-project-modal.stories.js | 2 +- .../stories/symbol-palette.stories.js | 2 -- .../stories/use-expand-collapse.stories.js | 1 - .../stories/utils/with-context-root.js | 1 - .../word-count-modal-content.stories.js | 2 -- .../stories/word-count-modal.stories.js | 1 - .../chat/components/chat-pane.test.js | 1 - .../chat/components/message-input.test.js | 1 - .../chat/components/message-list.test.js | 1 - .../features/chat/components/message.test.js | 1 - .../chat/context/chat-context.test.js | 1 - .../components/clone-project-modal.test.js | 1 - .../components/chat-toggle-button.test.js | 1 - .../components/online-users-widget.test.js | 1 - .../project-name-editable-label.test.js | 1 - .../components/toolbar-header.test.js | 1 - .../file-tree-create-name-input.test.js | 1 - .../file-tree-modal-create-file.test.js | 2 +- .../components/file-tree-doc.test.js | 1 - .../components/file-tree-folder-list.test.js | 1 - .../components/file-tree-folder.test.js | 1 - .../file-tree-item-inner.test.js | 1 - .../file-tree-item-menu.test.js | 1 - .../file-tree-item-name.test.js | 1 - .../components/file-tree-root.test.js | 1 - .../components/file-tree-toolbar.test.js | 1 - .../file-tree/flows/context-menu.test.js | 1 - .../file-tree/flows/create-folder.test.js | 1 - .../file-tree/flows/delete-entity.test.js | 1 - .../file-tree/flows/rename-entity.test.js | 1 - .../file-tree/helpers/render-with-context.js | 1 - .../components/file-view-header.test.js | 1 - .../components/file-view-image.test.js | 1 - .../components/file-view-text.test.js | 1 - .../file-view/components/file-view.test.js | 1 - .../components/hotkeys-modal.test.js | 1 - .../outline/components/outline-item.test.js | 1 - .../outline/components/outline-list.test.js | 1 - .../outline/components/outline-pane.test.js | 1 - .../outline/components/outline-root.test.js | 1 - .../preview-download-button.test.js | 1 - .../preview-download-file-list.test.js | 1 - .../preview-logs-pane-entry.test.js | 1 - .../components/preview-logs-pane.test.js | 1 - .../preview-logs-toggle-button.test.js | 1 - .../preview/components/preview-pane.test.js | 1 - .../preview-recompile-button.test.js | 1 - .../components/preview-toolbar.test.js | 1 - .../components/share-project-modal.test.js | 1 - .../components/symbol-palette.test.js | 1 - .../components/word-count-modal.test.js | 1 - .../frontend/helpers/render-with-context.js | 1 - .../frontend/shared/components/icon.test.js | 1 - .../shared/components/pagination.test.js | 1 - .../shared/components/processing.test.js | 1 - .../shared/hooks/use-expand-collapse.test.js | 1 - 189 files changed, 90 insertions(+), 210 deletions(-) diff --git a/services/web/.eslintrc b/services/web/.eslintrc index 80ba6dd196..f46dc93855 100644 --- a/services/web/.eslintrc +++ b/services/web/.eslintrc @@ -49,9 +49,7 @@ "node/no-callback-literal": "off", "node/no-deprecated-api": "off", "node/handle-callback-err": "off", - "node/no-path-concat": "off", - - "react/jsx-no-target-blank": "off", + "node/no-path-concat": "off" }, "overrides": [ // NOTE: changing paths may require updating them in the Makefile too. @@ -106,7 +104,7 @@ }, { // Frontend specific rules - "files": ["**/frontend/js/**/*.js"], + "files": ["**/frontend/js/**/*.js", "**/frontend/stories/**/*.js", "**/*.stories.js", "**/test/frontend/**/*.js"], "globals": { "$": true, "angular": true, @@ -128,6 +126,13 @@ "children": "never" }], + // Allow target="_blank" in JSX + "react/jsx-no-target-blank": "off", + + // Don't import React for JSX; the JSX runtime is added by a Babel plugin + "react/react-in-jsx-scope": "off", + "react/jsx-uses-react": "off", + // Fix conflict between prettier & standard by overriding to prefer // double quotes "jsx-quotes": ["error", "prefer-double"], diff --git a/services/web/.storybook/preview.js b/services/web/.storybook/preview.js index 7b7488ac84..7a658984bc 100644 --- a/services/web/.storybook/preview.js +++ b/services/web/.storybook/preview.js @@ -1,5 +1,3 @@ -import React from 'react' - import './preview.css' // Storybook does not (currently) support async loading of "stories". Therefore diff --git a/services/web/babel.config.json b/services/web/babel.config.json index 927db5afe2..4a1da76e68 100644 --- a/services/web/babel.config.json +++ b/services/web/babel.config.json @@ -1,10 +1,18 @@ { "presets": [ - "@babel/react", - ["@babel/env", { - "useBuiltIns": "usage", - "corejs": { "version": 3 } - }] + [ + "@babel/react", + { + "runtime": "automatic" + } + ], + [ + "@babel/env", + { + "useBuiltIns": "usage", + "corejs": { "version": 3 } + } + ] ], "plugins": ["angularjs-annotate", "macros"], // Target our current Node version in test environment, to transform and @@ -12,12 +20,20 @@ "env": { "test": { "presets": [ - "@babel/react", - ["@babel/env", { - "targets": {"node": "10.21"}, + [ + "@babel/react", + { + "runtime": "automatic" + } + ], + [ + "@babel/env", + { + "targets": { "node": "12.21" }, "useBuiltIns": "usage", "corejs": { "version": 3 } - }] + } + ] ] } } diff --git a/services/web/frontend/js/features/chat/components/chat-fallback-error.js b/services/web/frontend/js/features/chat/components/chat-fallback-error.js index c79b0ed439..38273505b2 100644 --- a/services/web/frontend/js/features/chat/components/chat-fallback-error.js +++ b/services/web/frontend/js/features/chat/components/chat-fallback-error.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { useTranslation } from 'react-i18next' import { Button, Alert } from 'react-bootstrap' diff --git a/services/web/frontend/js/features/chat/components/infinite-scroll.js b/services/web/frontend/js/features/chat/components/infinite-scroll.js index 8f37f24f6a..361fec55d4 100644 --- a/services/web/frontend/js/features/chat/components/infinite-scroll.js +++ b/services/web/frontend/js/features/chat/components/infinite-scroll.js @@ -1,4 +1,4 @@ -import React, { useRef, useEffect, useLayoutEffect } from 'react' +import { useRef, useEffect, useLayoutEffect } from 'react' import PropTypes from 'prop-types' import _ from 'lodash' diff --git a/services/web/frontend/js/features/chat/components/message-content.js b/services/web/frontend/js/features/chat/components/message-content.js index 551fe70222..109dc52f11 100644 --- a/services/web/frontend/js/features/chat/components/message-content.js +++ b/services/web/frontend/js/features/chat/components/message-content.js @@ -1,4 +1,4 @@ -import React, { useRef, useEffect } from 'react' +import { useRef, useEffect } from 'react' import PropTypes from 'prop-types' import Linkify from 'react-linkify' diff --git a/services/web/frontend/js/features/chat/components/message-input.js b/services/web/frontend/js/features/chat/components/message-input.js index 9c1fede193..a80b091072 100644 --- a/services/web/frontend/js/features/chat/components/message-input.js +++ b/services/web/frontend/js/features/chat/components/message-input.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/chat/components/message-list.js b/services/web/frontend/js/features/chat/components/message-list.js index d8b6a413ee..bf712dd700 100644 --- a/services/web/frontend/js/features/chat/components/message-list.js +++ b/services/web/frontend/js/features/chat/components/message-list.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import moment from 'moment' import Message from './message' diff --git a/services/web/frontend/js/features/chat/components/message.js b/services/web/frontend/js/features/chat/components/message.js index 9b84a45e0d..f63b71c701 100644 --- a/services/web/frontend/js/features/chat/components/message.js +++ b/services/web/frontend/js/features/chat/components/message.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { getHueForUserId } from '../../../shared/utils/colors' import MessageContent from './message-content' diff --git a/services/web/frontend/js/features/chat/context/chat-context.js b/services/web/frontend/js/features/chat/context/chat-context.js index 254c4054cd..224621118f 100644 --- a/services/web/frontend/js/features/chat/context/chat-context.js +++ b/services/web/frontend/js/features/chat/context/chat-context.js @@ -1,4 +1,4 @@ -import React, { +import { createContext, useCallback, useContext, diff --git a/services/web/frontend/js/features/clone-project-modal/components/clone-project-modal-content.js b/services/web/frontend/js/features/clone-project-modal/components/clone-project-modal-content.js index ccb5744602..b1d9d38b25 100644 --- a/services/web/frontend/js/features/clone-project-modal/components/clone-project-modal-content.js +++ b/services/web/frontend/js/features/clone-project-modal/components/clone-project-modal-content.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { Trans } from 'react-i18next' import { diff --git a/services/web/frontend/js/features/clone-project-modal/components/clone-project-modal.js b/services/web/frontend/js/features/clone-project-modal/components/clone-project-modal.js index ea43885444..91158dd278 100644 --- a/services/web/frontend/js/features/clone-project-modal/components/clone-project-modal.js +++ b/services/web/frontend/js/features/clone-project-modal/components/clone-project-modal.js @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect, useMemo, useState } from 'react' +import { useCallback, useEffect, useMemo, useState } from 'react' import PropTypes from 'prop-types' import { cloneProject } from '../utils/api' import CloneProjectModalContent from './clone-project-modal-content' diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/components/back-to-projects-button.js b/services/web/frontend/js/features/editor-navigation-toolbar/components/back-to-projects-button.js index 6a3a26d2af..1a76a3b774 100644 --- a/services/web/frontend/js/features/editor-navigation-toolbar/components/back-to-projects-button.js +++ b/services/web/frontend/js/features/editor-navigation-toolbar/components/back-to-projects-button.js @@ -1,4 +1,3 @@ -import React from 'react' import Icon from '../../../shared/components/icon' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/components/chat-toggle-button.js b/services/web/frontend/js/features/editor-navigation-toolbar/components/chat-toggle-button.js index 0654d40fe8..70523485c6 100644 --- a/services/web/frontend/js/features/editor-navigation-toolbar/components/chat-toggle-button.js +++ b/services/web/frontend/js/features/editor-navigation-toolbar/components/chat-toggle-button.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import classNames from 'classnames' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/components/cobranding-logo.js b/services/web/frontend/js/features/editor-navigation-toolbar/components/cobranding-logo.js index 2d7752a68b..80f3bc12b8 100644 --- a/services/web/frontend/js/features/editor-navigation-toolbar/components/cobranding-logo.js +++ b/services/web/frontend/js/features/editor-navigation-toolbar/components/cobranding-logo.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' function CobrandingLogo({ diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/components/history-toggle-button.js b/services/web/frontend/js/features/editor-navigation-toolbar/components/history-toggle-button.js index 25467551fb..ef1d12291b 100644 --- a/services/web/frontend/js/features/editor-navigation-toolbar/components/history-toggle-button.js +++ b/services/web/frontend/js/features/editor-navigation-toolbar/components/history-toggle-button.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import classNames from 'classnames' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/components/menu-button.js b/services/web/frontend/js/features/editor-navigation-toolbar/components/menu-button.js index 288863ba27..537f851f80 100644 --- a/services/web/frontend/js/features/editor-navigation-toolbar/components/menu-button.js +++ b/services/web/frontend/js/features/editor-navigation-toolbar/components/menu-button.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { useTranslation } from 'react-i18next' import Icon from '../../../shared/components/icon' diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/components/pdf-toggle-button.js b/services/web/frontend/js/features/editor-navigation-toolbar/components/pdf-toggle-button.js index a49582433c..83d5ba6db0 100644 --- a/services/web/frontend/js/features/editor-navigation-toolbar/components/pdf-toggle-button.js +++ b/services/web/frontend/js/features/editor-navigation-toolbar/components/pdf-toggle-button.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { OverlayTrigger, Tooltip } from 'react-bootstrap' import classNames from 'classnames' diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/components/project-name-editable-label.js b/services/web/frontend/js/features/editor-navigation-toolbar/components/project-name-editable-label.js index 1ba554c917..24f4e60859 100644 --- a/services/web/frontend/js/features/editor-navigation-toolbar/components/project-name-editable-label.js +++ b/services/web/frontend/js/features/editor-navigation-toolbar/components/project-name-editable-label.js @@ -1,4 +1,4 @@ -import React, { useEffect, useState, useRef } from 'react' +import { useEffect, useState, useRef } from 'react' import PropTypes from 'prop-types' import { OverlayTrigger, Tooltip } from 'react-bootstrap' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/components/share-project-button.js b/services/web/frontend/js/features/editor-navigation-toolbar/components/share-project-button.js index 06adcf3777..39e03a033a 100644 --- a/services/web/frontend/js/features/editor-navigation-toolbar/components/share-project-button.js +++ b/services/web/frontend/js/features/editor-navigation-toolbar/components/share-project-button.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { useTranslation } from 'react-i18next' import Icon from '../../../shared/components/icon' diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/components/track-changes-toggle-button.js b/services/web/frontend/js/features/editor-navigation-toolbar/components/track-changes-toggle-button.js index bc2af42ef8..3cbdb4916a 100644 --- a/services/web/frontend/js/features/editor-navigation-toolbar/components/track-changes-toggle-button.js +++ b/services/web/frontend/js/features/editor-navigation-toolbar/components/track-changes-toggle-button.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import classNames from 'classnames' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-context.js b/services/web/frontend/js/features/file-tree/components/file-tree-context.js index 9a4f16c7d7..aeee342ff3 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-context.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-context.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { FileTreeMainProvider } from '../contexts/file-tree-main' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-create/danger-message.js b/services/web/frontend/js/features/file-tree/components/file-tree-create/danger-message.js index 6388721d79..45553d72d2 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-create/danger-message.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-create/danger-message.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { Alert } from 'react-bootstrap' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-create/error-message.js b/services/web/frontend/js/features/file-tree/components/file-tree-create/error-message.js index e80331a422..59b9638a5d 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-create/error-message.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-create/error-message.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { useTranslation } from 'react-i18next' import { FetchError } from '../../../../infrastructure/fetch-json' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-create-name-input.js b/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-create-name-input.js index 390568cf49..6d142598b9 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-create-name-input.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-create-name-input.js @@ -1,7 +1,7 @@ import ControlLabel from 'react-bootstrap/lib/ControlLabel' import { Alert, FormControl } from 'react-bootstrap' import FormGroup from 'react-bootstrap/lib/FormGroup' -import React, { useCallback } from 'react' +import { useCallback } from 'react' import { Trans, useTranslation } from 'react-i18next' import { useFileTreeCreateName } from '../../contexts/file-tree-create-name' import PropTypes from 'prop-types' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-body.js b/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-body.js index c1bdf89273..5b669cfa4c 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-body.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-body.js @@ -1,4 +1,3 @@ -import React from 'react' import { useTranslation } from 'react-i18next' import FileTreeCreateNewDoc from './modes/file-tree-create-new-doc' import FileTreeImportFromUrl from './modes/file-tree-import-from-url' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-footer.js b/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-footer.js index d9c816bc3a..0846e6535f 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-footer.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-footer.js @@ -1,4 +1,3 @@ -import React from 'react' import { useTranslation } from 'react-i18next' import { Alert, Button } from 'react-bootstrap' import { useFileTreeCreateForm } from '../../contexts/file-tree-create-form' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-mode.js b/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-mode.js index 6581cf362b..645b573488 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-mode.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-mode.js @@ -1,4 +1,3 @@ -import React from 'react' import classnames from 'classnames' import { Button } from 'react-bootstrap' import PropTypes from 'prop-types' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-create-new-doc.js b/services/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-create-new-doc.js index 39e9617152..c86de20f4f 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-create-new-doc.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-create-new-doc.js @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect } from 'react' +import { useCallback, useEffect } from 'react' import FileTreeCreateNameInput from '../file-tree-create-name-input' import { useFileTreeActionable } from '../../../contexts/file-tree-actionable' import { useFileTreeCreateName } from '../../../contexts/file-tree-create-name' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-import-from-project.js b/services/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-import-from-project.js index 2742a7490d..398acd76a7 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-import-from-project.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-import-from-project.js @@ -1,4 +1,4 @@ -import React, { useState, useCallback, useEffect, useMemo } from 'react' +import { useState, useCallback, useEffect, useMemo } from 'react' import { Button, ControlLabel, FormControl, FormGroup } from 'react-bootstrap' import Icon from '../../../../../shared/components/icon' import FileTreeCreateNameInput from '../file-tree-create-name-input' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-import-from-url.js b/services/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-import-from-url.js index 13efa54a0e..9c72a57e58 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-import-from-url.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-import-from-url.js @@ -1,5 +1,5 @@ import { ControlLabel, FormControl, FormGroup } from 'react-bootstrap' -import React, { useCallback, useEffect, useState } from 'react' +import { useCallback, useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import FileTreeCreateNameInput from '../file-tree-create-name-input' import { useFileTreeActionable } from '../../../contexts/file-tree-actionable' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-upload-doc.js b/services/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-upload-doc.js index bbc045927b..14b9c84949 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-upload-doc.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-create/modes/file-tree-upload-doc.js @@ -1,6 +1,6 @@ import { Trans } from 'react-i18next' import { Alert, Button } from 'react-bootstrap' -import React, { useCallback, useState } from 'react' +import { useCallback, useState } from 'react' import PropTypes from 'prop-types' import Uppy from '@uppy/core' import XHRUpload from '@uppy/xhr-upload' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-create/redirect-to-login.js b/services/web/frontend/js/features/file-tree/components/file-tree-create/redirect-to-login.js index 5b44a6a818..fc3ed99915 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-create/redirect-to-login.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-create/redirect-to-login.js @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react' +import { useState, useEffect } from 'react' import { Trans } from 'react-i18next' import { useFileTreeMainContext } from '../../contexts/file-tree-main' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-doc.js b/services/web/frontend/js/features/file-tree/components/file-tree-doc.js index 97dc46cf49..9e58dfb5d1 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-doc.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-doc.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-draggable-preview-layer.js b/services/web/frontend/js/features/file-tree/components/file-tree-draggable-preview-layer.js index 3bac12011f..2e8e1f6860 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-draggable-preview-layer.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-draggable-preview-layer.js @@ -1,4 +1,4 @@ -import React, { useRef } from 'react' +import { useRef } from 'react' import PropTypes from 'prop-types' import { useDragLayer } from 'react-dnd' import classNames from 'classnames' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-error.js b/services/web/frontend/js/features/file-tree/components/file-tree-error.js index 9a1022a314..4d518bc0d5 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-error.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-error.js @@ -1,4 +1,3 @@ -import React from 'react' import { Button } from 'react-bootstrap' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-folder-list.js b/services/web/frontend/js/features/file-tree/components/file-tree-folder-list.js index eca6458980..a5f4dd313f 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-folder-list.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-folder-list.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import classNames from 'classnames' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-folder.js b/services/web/frontend/js/features/file-tree/components/file-tree-folder.js index 0bcbd1a211..07fea9a29c 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-folder.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-folder.js @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react' +import { useEffect } from 'react' import PropTypes from 'prop-types' import { useTranslation } from 'react-i18next' import classNames from 'classnames' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-inner.js b/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-inner.js index 0ea2017747..83e1a6f447 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-inner.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-inner.js @@ -1,4 +1,4 @@ -import React, { useEffect, createRef } from 'react' +import { useEffect, createRef } from 'react' import PropTypes from 'prop-types' import classNames from 'classnames' import scrollIntoViewIfNeeded from 'scroll-into-view-if-needed' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-menu-items.js b/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-menu-items.js index 1d7c1bf4ce..84e1b24dd4 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-menu-items.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-menu-items.js @@ -1,4 +1,3 @@ -import React from 'react' import { useTranslation } from 'react-i18next' import { MenuItem } from 'react-bootstrap' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-menu.js b/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-menu.js index 33dab9a510..b30b75444d 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-menu.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-menu.js @@ -1,4 +1,4 @@ -import React, { useState } from 'react' +import { useState } from 'react' import { findDOMNode } from 'react-dom' import PropTypes from 'prop-types' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-name.js b/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-name.js index 4ca30bde27..65a3472964 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-name.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-item/file-tree-item-name.js @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react' +import { useState, useEffect } from 'react' import PropTypes from 'prop-types' import { useRefWithAutoFocus } from '../../../../shared/hooks/use-ref-with-auto-focus' diff --git a/services/web/frontend/js/features/file-tree/components/file-tree-toolbar.js b/services/web/frontend/js/features/file-tree/components/file-tree-toolbar.js index a946934528..9e53483d7d 100644 --- a/services/web/frontend/js/features/file-tree/components/file-tree-toolbar.js +++ b/services/web/frontend/js/features/file-tree/components/file-tree-toolbar.js @@ -1,4 +1,3 @@ -import React from 'react' import { useTranslation } from 'react-i18next' import Icon from '../../../shared/components/icon' diff --git a/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-create-file.js b/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-create-file.js index b8c33576a6..6fd497f79f 100644 --- a/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-create-file.js +++ b/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-create-file.js @@ -1,4 +1,3 @@ -import React from 'react' import { Modal } from 'react-bootstrap' import { useTranslation } from 'react-i18next' import { useFileTreeActionable } from '../../contexts/file-tree-actionable' diff --git a/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-create-folder.js b/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-create-folder.js index 2bd8fb5ccf..cdffa65950 100644 --- a/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-create-folder.js +++ b/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-create-folder.js @@ -1,4 +1,4 @@ -import React, { useState } from 'react' +import { useState } from 'react' import PropTypes from 'prop-types' import { Button, Modal } from 'react-bootstrap' diff --git a/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-delete.js b/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-delete.js index 95dff23b24..3b3784b649 100644 --- a/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-delete.js +++ b/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-delete.js @@ -1,4 +1,3 @@ -import React from 'react' import { Button, Modal } from 'react-bootstrap' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-error.js b/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-error.js index 410b8a8b21..86954c53ae 100644 --- a/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-error.js +++ b/services/web/frontend/js/features/file-tree/components/modals/file-tree-modal-error.js @@ -1,5 +1,3 @@ -import React from 'react' - import { Button, Modal } from 'react-bootstrap' import { Trans, useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/file-tree/contexts/file-tree-actionable.js b/services/web/frontend/js/features/file-tree/contexts/file-tree-actionable.js index b5441bb740..2c8c1ec756 100644 --- a/services/web/frontend/js/features/file-tree/contexts/file-tree-actionable.js +++ b/services/web/frontend/js/features/file-tree/contexts/file-tree-actionable.js @@ -1,4 +1,4 @@ -import React, { +import { createContext, useCallback, useMemo, diff --git a/services/web/frontend/js/features/file-tree/contexts/file-tree-create-form.js b/services/web/frontend/js/features/file-tree/contexts/file-tree-create-form.js index 6860d3b219..ee6c49c95f 100644 --- a/services/web/frontend/js/features/file-tree/contexts/file-tree-create-form.js +++ b/services/web/frontend/js/features/file-tree/contexts/file-tree-create-form.js @@ -1,4 +1,4 @@ -import React, { createContext, useContext, useState } from 'react' +import { createContext, useContext, useState } from 'react' import PropTypes from 'prop-types' const FileTreeCreateFormContext = createContext() diff --git a/services/web/frontend/js/features/file-tree/contexts/file-tree-create-name.js b/services/web/frontend/js/features/file-tree/contexts/file-tree-create-name.js index 6f9cd1bb44..4bf7336bc1 100644 --- a/services/web/frontend/js/features/file-tree/contexts/file-tree-create-name.js +++ b/services/web/frontend/js/features/file-tree/contexts/file-tree-create-name.js @@ -1,4 +1,4 @@ -import React, { createContext, useContext, useMemo, useReducer } from 'react' +import { createContext, useContext, useMemo, useReducer } from 'react' import { isCleanFilename } from '../util/safe-path' import PropTypes from 'prop-types' diff --git a/services/web/frontend/js/features/file-tree/contexts/file-tree-draggable.js b/services/web/frontend/js/features/file-tree/contexts/file-tree-draggable.js index 0706039575..82a0ed97f1 100644 --- a/services/web/frontend/js/features/file-tree/contexts/file-tree-draggable.js +++ b/services/web/frontend/js/features/file-tree/contexts/file-tree-draggable.js @@ -1,4 +1,4 @@ -import React, { useRef, useEffect, useState } from 'react' +import { useRef, useEffect, useState } from 'react' import PropTypes from 'prop-types' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/file-tree/contexts/file-tree-main.js b/services/web/frontend/js/features/file-tree/contexts/file-tree-main.js index 46abee97ed..6acb440fd6 100644 --- a/services/web/frontend/js/features/file-tree/contexts/file-tree-main.js +++ b/services/web/frontend/js/features/file-tree/contexts/file-tree-main.js @@ -1,4 +1,4 @@ -import React, { createContext, useContext, useState } from 'react' +import { createContext, useContext, useState } from 'react' import PropTypes from 'prop-types' const FileTreeMainContext = createContext() diff --git a/services/web/frontend/js/features/file-tree/contexts/file-tree-mutable.js b/services/web/frontend/js/features/file-tree/contexts/file-tree-mutable.js index ff7614a28b..2d161e2065 100644 --- a/services/web/frontend/js/features/file-tree/contexts/file-tree-mutable.js +++ b/services/web/frontend/js/features/file-tree/contexts/file-tree-mutable.js @@ -1,4 +1,4 @@ -import React, { +import { createContext, useCallback, useReducer, diff --git a/services/web/frontend/js/features/file-tree/contexts/file-tree-selectable.js b/services/web/frontend/js/features/file-tree/contexts/file-tree-selectable.js index 78f50424c2..7cda5609ce 100644 --- a/services/web/frontend/js/features/file-tree/contexts/file-tree-selectable.js +++ b/services/web/frontend/js/features/file-tree/contexts/file-tree-selectable.js @@ -1,4 +1,4 @@ -import React, { +import { createContext, useCallback, useContext, diff --git a/services/web/frontend/js/features/file-view/components/file-view-header.js b/services/web/frontend/js/features/file-view/components/file-view-header.js index faf47bc008..c18fbf87ea 100644 --- a/services/web/frontend/js/features/file-view/components/file-view-header.js +++ b/services/web/frontend/js/features/file-view/components/file-view-header.js @@ -1,4 +1,4 @@ -import React, { useState, useCallback } from 'react' +import { useState, useCallback } from 'react' import PropTypes from 'prop-types' import { Trans, useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/file-view/components/file-view-image.js b/services/web/frontend/js/features/file-view/components/file-view-image.js index f2ba66f96e..64fa6cee16 100644 --- a/services/web/frontend/js/features/file-view/components/file-view-image.js +++ b/services/web/frontend/js/features/file-view/components/file-view-image.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { useEditorContext } from '../../../shared/context/editor-context' diff --git a/services/web/frontend/js/features/file-view/components/file-view-text.js b/services/web/frontend/js/features/file-view/components/file-view-text.js index 4d26ebacaf..a9c1f11db3 100644 --- a/services/web/frontend/js/features/file-view/components/file-view-text.js +++ b/services/web/frontend/js/features/file-view/components/file-view-text.js @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react' +import { useState, useEffect } from 'react' import PropTypes from 'prop-types' import { useEditorContext } from '../../../shared/context/editor-context' diff --git a/services/web/frontend/js/features/file-view/components/file-view.js b/services/web/frontend/js/features/file-view/components/file-view.js index 04c84326f4..13b678efa3 100644 --- a/services/web/frontend/js/features/file-view/components/file-view.js +++ b/services/web/frontend/js/features/file-view/components/file-view.js @@ -1,4 +1,4 @@ -import React, { useState } from 'react' +import { useState } from 'react' import PropTypes from 'prop-types' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/hotkeys-modal/components/hotkeys-modal.js b/services/web/frontend/js/features/hotkeys-modal/components/hotkeys-modal.js index 656a043dfc..5cb76acccd 100644 --- a/services/web/frontend/js/features/hotkeys-modal/components/hotkeys-modal.js +++ b/services/web/frontend/js/features/hotkeys-modal/components/hotkeys-modal.js @@ -1,4 +1,3 @@ -import React from 'react' import { Button, Modal, Row, Col } from 'react-bootstrap' import PropTypes from 'prop-types' import { Trans, useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/outline/components/outline-item.js b/services/web/frontend/js/features/outline/components/outline-item.js index 3729c0402e..cdc723d715 100644 --- a/services/web/frontend/js/features/outline/components/outline-item.js +++ b/services/web/frontend/js/features/outline/components/outline-item.js @@ -1,4 +1,4 @@ -import React, { useState, useEffect, createRef, useRef } from 'react' +import { useState, useEffect, createRef, useRef } from 'react' import PropTypes from 'prop-types' import scrollIntoViewIfNeeded from 'scroll-into-view-if-needed' import classNames from 'classnames' diff --git a/services/web/frontend/js/features/outline/components/outline-list.js b/services/web/frontend/js/features/outline/components/outline-list.js index d0ccc5132a..c7992235be 100644 --- a/services/web/frontend/js/features/outline/components/outline-list.js +++ b/services/web/frontend/js/features/outline/components/outline-list.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import classNames from 'classnames' import OutlineItem from './outline-item' diff --git a/services/web/frontend/js/features/outline/components/outline-root.js b/services/web/frontend/js/features/outline/components/outline-root.js index 184cdab09a..9d403ace8f 100644 --- a/services/web/frontend/js/features/outline/components/outline-root.js +++ b/services/web/frontend/js/features/outline/components/outline-root.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/preview/components/preview-download-button.js b/services/web/frontend/js/features/preview/components/preview-download-button.js index d2052eab92..3c515f4275 100644 --- a/services/web/frontend/js/features/preview/components/preview-download-button.js +++ b/services/web/frontend/js/features/preview/components/preview-download-button.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { Dropdown, OverlayTrigger, Tooltip } from 'react-bootstrap' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/preview/components/preview-download-file-list.js b/services/web/frontend/js/features/preview/components/preview-download-file-list.js index 0ef1846075..48dc34057d 100644 --- a/services/web/frontend/js/features/preview/components/preview-download-file-list.js +++ b/services/web/frontend/js/features/preview/components/preview-download-file-list.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { MenuItem } from 'react-bootstrap' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/preview/components/preview-error.js b/services/web/frontend/js/features/preview/components/preview-error.js index 767be1f077..a72fca2fb1 100644 --- a/services/web/frontend/js/features/preview/components/preview-error.js +++ b/services/web/frontend/js/features/preview/components/preview-error.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { useTranslation } from 'react-i18next' import PreviewLogsPaneEntry from './preview-logs-pane-entry' diff --git a/services/web/frontend/js/features/preview/components/preview-first-error-pop-up.js b/services/web/frontend/js/features/preview/components/preview-first-error-pop-up.js index 182ae4263f..e713d25bd0 100644 --- a/services/web/frontend/js/features/preview/components/preview-first-error-pop-up.js +++ b/services/web/frontend/js/features/preview/components/preview-first-error-pop-up.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { useTranslation } from 'react-i18next' import Icon from '../../../shared/components/icon' diff --git a/services/web/frontend/js/features/preview/components/preview-logs-pane-entry.js b/services/web/frontend/js/features/preview/components/preview-logs-pane-entry.js index eb5fb47e26..a646b62d01 100644 --- a/services/web/frontend/js/features/preview/components/preview-logs-pane-entry.js +++ b/services/web/frontend/js/features/preview/components/preview-logs-pane-entry.js @@ -1,4 +1,4 @@ -import React, { useState, useRef } from 'react' +import { useState, useRef } from 'react' import PropTypes from 'prop-types' import classNames from 'classnames' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/preview/components/preview-logs-pane.js b/services/web/frontend/js/features/preview/components/preview-logs-pane.js index d1a190260c..fb17aaa60c 100644 --- a/services/web/frontend/js/features/preview/components/preview-logs-pane.js +++ b/services/web/frontend/js/features/preview/components/preview-logs-pane.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { useTranslation } from 'react-i18next' import { Dropdown } from 'react-bootstrap' diff --git a/services/web/frontend/js/features/preview/components/preview-logs-toggle-button.js b/services/web/frontend/js/features/preview/components/preview-logs-toggle-button.js index f1e753a4c4..6f47dc779e 100644 --- a/services/web/frontend/js/features/preview/components/preview-logs-toggle-button.js +++ b/services/web/frontend/js/features/preview/components/preview-logs-toggle-button.js @@ -1,4 +1,3 @@ -import React from 'react' import { OverlayTrigger, Tooltip } from 'react-bootstrap' import PropTypes from 'prop-types' import classNames from 'classnames' diff --git a/services/web/frontend/js/features/preview/components/preview-recompile-button.js b/services/web/frontend/js/features/preview/components/preview-recompile-button.js index 0fdc65985a..5335a30b7c 100644 --- a/services/web/frontend/js/features/preview/components/preview-recompile-button.js +++ b/services/web/frontend/js/features/preview/components/preview-recompile-button.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { Dropdown, MenuItem, OverlayTrigger, Tooltip } from 'react-bootstrap' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/preview/components/preview-toolbar.js b/services/web/frontend/js/features/preview/components/preview-toolbar.js index 157bf8e789..6886131417 100644 --- a/services/web/frontend/js/features/preview/components/preview-toolbar.js +++ b/services/web/frontend/js/features/preview/components/preview-toolbar.js @@ -1,4 +1,4 @@ -import React, { useRef, useState } from 'react' +import { useRef, useState } from 'react' import PropTypes from 'prop-types' import { OverlayTrigger, Tooltip } from 'react-bootstrap' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/preview/components/preview-validation-issue.js b/services/web/frontend/js/features/preview/components/preview-validation-issue.js index 2b1a096340..a8d27676e8 100644 --- a/services/web/frontend/js/features/preview/components/preview-validation-issue.js +++ b/services/web/frontend/js/features/preview/components/preview-validation-issue.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { useTranslation } from 'react-i18next' import PreviewLogsPaneEntry from './preview-logs-pane-entry' diff --git a/services/web/frontend/js/features/share-project-modal/components/add-collaborators-upgrade.js b/services/web/frontend/js/features/share-project-modal/components/add-collaborators-upgrade.js index 08c35f6b3d..3f6858cc5f 100644 --- a/services/web/frontend/js/features/share-project-modal/components/add-collaborators-upgrade.js +++ b/services/web/frontend/js/features/share-project-modal/components/add-collaborators-upgrade.js @@ -1,4 +1,4 @@ -import React, { useState } from 'react' +import { useState } from 'react' import { Trans, useTranslation } from 'react-i18next' import { Button } from 'react-bootstrap' import PropTypes from 'prop-types' diff --git a/services/web/frontend/js/features/share-project-modal/components/add-collaborators.js b/services/web/frontend/js/features/share-project-modal/components/add-collaborators.js index c51512cfbd..b4ccd96351 100644 --- a/services/web/frontend/js/features/share-project-modal/components/add-collaborators.js +++ b/services/web/frontend/js/features/share-project-modal/components/add-collaborators.js @@ -1,4 +1,4 @@ -import React, { useState, useMemo } from 'react' +import { useState, useMemo } from 'react' import { useTranslation, Trans } from 'react-i18next' import { Form, FormGroup, FormControl, Button } from 'react-bootstrap' import { useMultipleSelection } from 'downshift' diff --git a/services/web/frontend/js/features/share-project-modal/components/edit-member.js b/services/web/frontend/js/features/share-project-modal/components/edit-member.js index 119448e6db..5ff38175c2 100644 --- a/services/web/frontend/js/features/share-project-modal/components/edit-member.js +++ b/services/web/frontend/js/features/share-project-modal/components/edit-member.js @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react' +import { useState, useEffect } from 'react' import PropTypes from 'prop-types' import { Trans, useTranslation } from 'react-i18next' import { diff --git a/services/web/frontend/js/features/share-project-modal/components/invite.js b/services/web/frontend/js/features/share-project-modal/components/invite.js index bcf27de71e..59fdf28410 100644 --- a/services/web/frontend/js/features/share-project-modal/components/invite.js +++ b/services/web/frontend/js/features/share-project-modal/components/invite.js @@ -1,4 +1,4 @@ -import React, { useCallback } from 'react' +import { useCallback } from 'react' import PropTypes from 'prop-types' import { useProjectContext, diff --git a/services/web/frontend/js/features/share-project-modal/components/link-sharing.js b/services/web/frontend/js/features/share-project-modal/components/link-sharing.js index cfd4d4f73d..6763432b70 100644 --- a/services/web/frontend/js/features/share-project-modal/components/link-sharing.js +++ b/services/web/frontend/js/features/share-project-modal/components/link-sharing.js @@ -1,4 +1,4 @@ -import React, { useCallback, useState } from 'react' +import { useCallback, useState } from 'react' import PropTypes from 'prop-types' import { Button, Col, OverlayTrigger, Row, Tooltip } from 'react-bootstrap' import { Trans } from 'react-i18next' diff --git a/services/web/frontend/js/features/share-project-modal/components/member-privileges.js b/services/web/frontend/js/features/share-project-modal/components/member-privileges.js index 41de80e976..f803dd1c40 100644 --- a/services/web/frontend/js/features/share-project-modal/components/member-privileges.js +++ b/services/web/frontend/js/features/share-project-modal/components/member-privileges.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { Trans } from 'react-i18next' diff --git a/services/web/frontend/js/features/share-project-modal/components/owner-info.js b/services/web/frontend/js/features/share-project-modal/components/owner-info.js index affb80e072..4d73d71955 100644 --- a/services/web/frontend/js/features/share-project-modal/components/owner-info.js +++ b/services/web/frontend/js/features/share-project-modal/components/owner-info.js @@ -1,4 +1,3 @@ -import React from 'react' import { useProjectContext } from './share-project-modal' import { Col, Row } from 'react-bootstrap' import { Trans } from 'react-i18next' diff --git a/services/web/frontend/js/features/share-project-modal/components/select-collaborators.js b/services/web/frontend/js/features/share-project-modal/components/select-collaborators.js index 9a8429ba13..5c0e2c0e56 100644 --- a/services/web/frontend/js/features/share-project-modal/components/select-collaborators.js +++ b/services/web/frontend/js/features/share-project-modal/components/select-collaborators.js @@ -1,4 +1,4 @@ -import React, { useEffect, useMemo, useState, useRef, useCallback } from 'react' +import { useEffect, useMemo, useState, useRef, useCallback } from 'react' import PropTypes from 'prop-types' import { Trans, useTranslation } from 'react-i18next' import { matchSorter } from 'match-sorter' diff --git a/services/web/frontend/js/features/share-project-modal/components/send-invites-notice.js b/services/web/frontend/js/features/share-project-modal/components/send-invites-notice.js index 7986516374..2281d4ecf6 100644 --- a/services/web/frontend/js/features/share-project-modal/components/send-invites-notice.js +++ b/services/web/frontend/js/features/share-project-modal/components/send-invites-notice.js @@ -1,4 +1,3 @@ -import React from 'react' import { Col, Row } from 'react-bootstrap' import PropTypes from 'prop-types' import { Trans } from 'react-i18next' diff --git a/services/web/frontend/js/features/share-project-modal/components/send-invites.js b/services/web/frontend/js/features/share-project-modal/components/send-invites.js index c44790ac60..2ff9425fa9 100644 --- a/services/web/frontend/js/features/share-project-modal/components/send-invites.js +++ b/services/web/frontend/js/features/share-project-modal/components/send-invites.js @@ -1,4 +1,4 @@ -import React, { useMemo } from 'react' +import { useMemo } from 'react' import { Row } from 'react-bootstrap' import { useProjectContext } from './share-project-modal' import AddCollaborators from './add-collaborators' diff --git a/services/web/frontend/js/features/share-project-modal/components/share-modal-body.js b/services/web/frontend/js/features/share-project-modal/components/share-modal-body.js index 62520a461f..f02322c965 100644 --- a/services/web/frontend/js/features/share-project-modal/components/share-modal-body.js +++ b/services/web/frontend/js/features/share-project-modal/components/share-modal-body.js @@ -1,4 +1,3 @@ -import React from 'react' import { useProjectContext, useShareProjectContext, diff --git a/services/web/frontend/js/features/share-project-modal/components/share-project-modal-content.js b/services/web/frontend/js/features/share-project-modal/components/share-project-modal-content.js index 0e2b5a457a..7233a040bb 100644 --- a/services/web/frontend/js/features/share-project-modal/components/share-project-modal-content.js +++ b/services/web/frontend/js/features/share-project-modal/components/share-project-modal-content.js @@ -1,4 +1,3 @@ -import React from 'react' import { Button, Modal, Grid } from 'react-bootstrap' import { Trans } from 'react-i18next' import ShareModalBody from './share-modal-body' diff --git a/services/web/frontend/js/features/share-project-modal/components/transfer-ownership-modal.js b/services/web/frontend/js/features/share-project-modal/components/transfer-ownership-modal.js index e9f09c6a3a..13d305647a 100644 --- a/services/web/frontend/js/features/share-project-modal/components/transfer-ownership-modal.js +++ b/services/web/frontend/js/features/share-project-modal/components/transfer-ownership-modal.js @@ -1,4 +1,4 @@ -import React, { useState } from 'react' +import { useState } from 'react' import { Modal, Button } from 'react-bootstrap' import { Trans } from 'react-i18next' import PropTypes from 'prop-types' diff --git a/services/web/frontend/js/features/share-project-modal/components/view-member.js b/services/web/frontend/js/features/share-project-modal/components/view-member.js index 9642a5b249..5d5c17956a 100644 --- a/services/web/frontend/js/features/share-project-modal/components/view-member.js +++ b/services/web/frontend/js/features/share-project-modal/components/view-member.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { Col, Row } from 'react-bootstrap' import MemberPrivileges from './member-privileges' diff --git a/services/web/frontend/js/features/symbol-palette/components/symbol-palette-body.js b/services/web/frontend/js/features/symbol-palette/components/symbol-palette-body.js index b7b90d6312..c4f47e325d 100644 --- a/services/web/frontend/js/features/symbol-palette/components/symbol-palette-body.js +++ b/services/web/frontend/js/features/symbol-palette/components/symbol-palette-body.js @@ -1,4 +1,3 @@ -import React from 'react' import { TabPanels, TabPanel } from '@reach/tabs' import { useTranslation } from 'react-i18next' import PropTypes from 'prop-types' diff --git a/services/web/frontend/js/features/symbol-palette/components/symbol-palette-content.js b/services/web/frontend/js/features/symbol-palette/components/symbol-palette-content.js index 01d80996f0..39d5e6d5c1 100644 --- a/services/web/frontend/js/features/symbol-palette/components/symbol-palette-content.js +++ b/services/web/frontend/js/features/symbol-palette/components/symbol-palette-content.js @@ -1,5 +1,5 @@ import { Tabs } from '@reach/tabs' -import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' +import { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { useTranslation } from 'react-i18next' import PropTypes from 'prop-types' import { matchSorter } from 'match-sorter' diff --git a/services/web/frontend/js/features/symbol-palette/components/symbol-palette-info-link.js b/services/web/frontend/js/features/symbol-palette/components/symbol-palette-info-link.js index 60af9124b5..ba56cf2b10 100644 --- a/services/web/frontend/js/features/symbol-palette/components/symbol-palette-info-link.js +++ b/services/web/frontend/js/features/symbol-palette/components/symbol-palette-info-link.js @@ -1,4 +1,3 @@ -import React from 'react' import { Button, OverlayTrigger, Tooltip } from 'react-bootstrap' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/symbol-palette/components/symbol-palette-item.js b/services/web/frontend/js/features/symbol-palette/components/symbol-palette-item.js index c17852451e..a892f33cf8 100644 --- a/services/web/frontend/js/features/symbol-palette/components/symbol-palette-item.js +++ b/services/web/frontend/js/features/symbol-palette/components/symbol-palette-item.js @@ -1,4 +1,4 @@ -import React, { useEffect, useRef } from 'react' +import { useEffect, useRef } from 'react' import { OverlayTrigger, Tooltip } from 'react-bootstrap' import PropTypes from 'prop-types' diff --git a/services/web/frontend/js/features/symbol-palette/components/symbol-palette-items.js b/services/web/frontend/js/features/symbol-palette/components/symbol-palette-items.js index bb65da71db..44835261f5 100644 --- a/services/web/frontend/js/features/symbol-palette/components/symbol-palette-items.js +++ b/services/web/frontend/js/features/symbol-palette/components/symbol-palette-items.js @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect, useState } from 'react' +import { useCallback, useEffect, useState } from 'react' import PropTypes from 'prop-types' import SymbolPaletteItem from './symbol-palette-item' diff --git a/services/web/frontend/js/features/symbol-palette/components/symbol-palette-search.js b/services/web/frontend/js/features/symbol-palette/components/symbol-palette-search.js index 23ebbda996..cf5a1eb2a7 100644 --- a/services/web/frontend/js/features/symbol-palette/components/symbol-palette-search.js +++ b/services/web/frontend/js/features/symbol-palette/components/symbol-palette-search.js @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect, useState } from 'react' +import { useCallback, useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import PropTypes from 'prop-types' import { FormControl } from 'react-bootstrap' diff --git a/services/web/frontend/js/features/symbol-palette/components/symbol-palette-tabs.js b/services/web/frontend/js/features/symbol-palette/components/symbol-palette-tabs.js index 3c0996bcb5..ba74b0c1cd 100644 --- a/services/web/frontend/js/features/symbol-palette/components/symbol-palette-tabs.js +++ b/services/web/frontend/js/features/symbol-palette/components/symbol-palette-tabs.js @@ -1,4 +1,3 @@ -import React from 'react' import { TabList, Tab } from '@reach/tabs' import PropTypes from 'prop-types' diff --git a/services/web/frontend/js/features/symbol-palette/components/symbol-palette.js b/services/web/frontend/js/features/symbol-palette/components/symbol-palette.js index cf9da84f13..9348431bff 100644 --- a/services/web/frontend/js/features/symbol-palette/components/symbol-palette.js +++ b/services/web/frontend/js/features/symbol-palette/components/symbol-palette.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import SymbolPaletteContent from './symbol-palette-content' diff --git a/services/web/frontend/js/features/word-count-modal/components/word-count-modal-content.js b/services/web/frontend/js/features/word-count-modal/components/word-count-modal-content.js index 5f6755b42f..3441c7c311 100644 --- a/services/web/frontend/js/features/word-count-modal/components/word-count-modal-content.js +++ b/services/web/frontend/js/features/word-count-modal/components/word-count-modal-content.js @@ -1,4 +1,3 @@ -import React from 'react' import { Row, Col, Modal, Grid, Alert, Button } from 'react-bootstrap' import PropTypes from 'prop-types' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/word-count-modal/components/word-count-modal.js b/services/web/frontend/js/features/word-count-modal/components/word-count-modal.js index c017ef51ae..b3f636afd5 100644 --- a/services/web/frontend/js/features/word-count-modal/components/word-count-modal.js +++ b/services/web/frontend/js/features/word-count-modal/components/word-count-modal.js @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from 'react' +import { useEffect, useState } from 'react' import PropTypes from 'prop-types' import WordCountModalContent from './word-count-modal-content' import { fetchWordCount } from '../utils/api' diff --git a/services/web/frontend/js/ide/human-readable-logs/HumanReadableLogsRules.js b/services/web/frontend/js/ide/human-readable-logs/HumanReadableLogsRules.js index 64c060e014..1680bc6052 100644 --- a/services/web/frontend/js/ide/human-readable-logs/HumanReadableLogsRules.js +++ b/services/web/frontend/js/ide/human-readable-logs/HumanReadableLogsRules.js @@ -1,5 +1,4 @@ /* eslint-disable no-useless-escape */ -import React from 'react' import PropTypes from 'prop-types' function WikiLink({ url, children }) { diff --git a/services/web/frontend/js/infrastructure/error-boundary.js b/services/web/frontend/js/infrastructure/error-boundary.js index a8d84f8bf1..1384b93abe 100644 --- a/services/web/frontend/js/infrastructure/error-boundary.js +++ b/services/web/frontend/js/infrastructure/error-boundary.js @@ -1,4 +1,3 @@ -import React from 'react' import { captureException } from './error-reporter' import { ErrorBoundary } from 'react-error-boundary' diff --git a/services/web/frontend/js/shared/components/accessible-modal.js b/services/web/frontend/js/shared/components/accessible-modal.js index 7eb5a53cbe..f8f839b75a 100644 --- a/services/web/frontend/js/shared/components/accessible-modal.js +++ b/services/web/frontend/js/shared/components/accessible-modal.js @@ -1,4 +1,4 @@ -import React, { useCallback } from 'react' +import { useCallback } from 'react' import PropTypes from 'prop-types' import { Modal } from 'react-bootstrap' diff --git a/services/web/frontend/js/shared/components/beta-badge.js b/services/web/frontend/js/shared/components/beta-badge.js index c9a9d79757..858db3a42a 100644 --- a/services/web/frontend/js/shared/components/beta-badge.js +++ b/services/web/frontend/js/shared/components/beta-badge.js @@ -1,4 +1,3 @@ -import React from 'react' import { OverlayTrigger, Tooltip } from 'react-bootstrap' import PropTypes from 'prop-types' diff --git a/services/web/frontend/js/shared/components/copy-link.js b/services/web/frontend/js/shared/components/copy-link.js index 60af68f22e..80509cc38d 100644 --- a/services/web/frontend/js/shared/components/copy-link.js +++ b/services/web/frontend/js/shared/components/copy-link.js @@ -1,4 +1,4 @@ -import React, { useCallback, useState } from 'react' +import { useCallback, useState } from 'react' import { Button, OverlayTrigger, Tooltip } from 'react-bootstrap' import PropTypes from 'prop-types' import { Trans, useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/shared/components/icon.js b/services/web/frontend/js/shared/components/icon.js index ac0d7afefe..55b8649487 100644 --- a/services/web/frontend/js/shared/components/icon.js +++ b/services/web/frontend/js/shared/components/icon.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import classNames from 'classnames' diff --git a/services/web/frontend/js/shared/components/pagination.js b/services/web/frontend/js/shared/components/pagination.js index 117dfb34fa..b23cceb1e4 100644 --- a/services/web/frontend/js/shared/components/pagination.js +++ b/services/web/frontend/js/shared/components/pagination.js @@ -1,4 +1,4 @@ -import React, { useMemo } from 'react' +import { useMemo } from 'react' import PropTypes from 'prop-types' import classNames from 'classnames' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/shared/components/processing.js b/services/web/frontend/js/shared/components/processing.js index 367300d9e7..6d1e021336 100644 --- a/services/web/frontend/js/shared/components/processing.js +++ b/services/web/frontend/js/shared/components/processing.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { useTranslation } from 'react-i18next' import Icon from './icon' diff --git a/services/web/frontend/js/shared/components/start-free-trial-button.js b/services/web/frontend/js/shared/components/start-free-trial-button.js index 4ff2e35312..82dd579d46 100644 --- a/services/web/frontend/js/shared/components/start-free-trial-button.js +++ b/services/web/frontend/js/shared/components/start-free-trial-button.js @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect } from 'react' +import { useCallback, useEffect } from 'react' import { useTranslation } from 'react-i18next' import { Button } from 'react-bootstrap' import PropTypes from 'prop-types' diff --git a/services/web/frontend/js/shared/components/tooltip-button.js b/services/web/frontend/js/shared/components/tooltip-button.js index 0102b9ea45..1689cf4699 100644 --- a/services/web/frontend/js/shared/components/tooltip-button.js +++ b/services/web/frontend/js/shared/components/tooltip-button.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { Button, Tooltip, OverlayTrigger } from 'react-bootstrap' diff --git a/services/web/frontend/js/shared/context/application-context.js b/services/web/frontend/js/shared/context/application-context.js index c627f8c684..627f8792d7 100644 --- a/services/web/frontend/js/shared/context/application-context.js +++ b/services/web/frontend/js/shared/context/application-context.js @@ -1,4 +1,4 @@ -import React, { createContext, useContext, useMemo } from 'react' +import { createContext, useContext, useMemo } from 'react' import PropTypes from 'prop-types' export const ApplicationContext = createContext() diff --git a/services/web/frontend/js/shared/context/compile-context.js b/services/web/frontend/js/shared/context/compile-context.js index 7ab63ecf48..5f2d8b3d00 100644 --- a/services/web/frontend/js/shared/context/compile-context.js +++ b/services/web/frontend/js/shared/context/compile-context.js @@ -1,4 +1,4 @@ -import React, { createContext, useContext } from 'react' +import { createContext, useContext } from 'react' import PropTypes from 'prop-types' import useScopeValue from './util/scope-value-hook' diff --git a/services/web/frontend/js/shared/context/editor-context.js b/services/web/frontend/js/shared/context/editor-context.js index 0ded53a256..9928bc15ed 100644 --- a/services/web/frontend/js/shared/context/editor-context.js +++ b/services/web/frontend/js/shared/context/editor-context.js @@ -1,4 +1,4 @@ -import React, { +import { createContext, useCallback, useContext, diff --git a/services/web/frontend/js/shared/context/ide-context.js b/services/web/frontend/js/shared/context/ide-context.js index f28ea7989a..52546da157 100644 --- a/services/web/frontend/js/shared/context/ide-context.js +++ b/services/web/frontend/js/shared/context/ide-context.js @@ -1,4 +1,4 @@ -import React, { createContext, useContext } from 'react' +import { createContext, useContext } from 'react' import PropTypes from 'prop-types' const IdeContext = createContext() diff --git a/services/web/frontend/js/shared/context/layout-context.js b/services/web/frontend/js/shared/context/layout-context.js index 46886fb3a8..c066f76089 100644 --- a/services/web/frontend/js/shared/context/layout-context.js +++ b/services/web/frontend/js/shared/context/layout-context.js @@ -1,4 +1,4 @@ -import React, { createContext, useContext, useCallback, useMemo } from 'react' +import { createContext, useContext, useCallback, useMemo } from 'react' import PropTypes from 'prop-types' import useScopeValue from './util/scope-value-hook' import { useIdeContext } from './ide-context' diff --git a/services/web/frontend/js/shared/context/root-context.js b/services/web/frontend/js/shared/context/root-context.js index 92a376e219..a503134dca 100644 --- a/services/web/frontend/js/shared/context/root-context.js +++ b/services/web/frontend/js/shared/context/root-context.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import createSharedContext from 'react2angular-shared-context' diff --git a/services/web/frontend/stories/chat.stories.js b/services/web/frontend/stories/chat.stories.js index c662ebfea4..708f1e60f8 100644 --- a/services/web/frontend/stories/chat.stories.js +++ b/services/web/frontend/stories/chat.stories.js @@ -1,4 +1,3 @@ -import React from 'react' import { v4 as uuid } from 'uuid' import { ContextRoot } from '../js/shared/context/root-context' diff --git a/services/web/frontend/stories/clone-project-modal-content.stories.js b/services/web/frontend/stories/clone-project-modal-content.stories.js index e4a99a1a5e..0f82f6c573 100644 --- a/services/web/frontend/stories/clone-project-modal-content.stories.js +++ b/services/web/frontend/stories/clone-project-modal-content.stories.js @@ -1,5 +1,3 @@ -import React from 'react' - import CloneProjectModalContent from '../js/features/clone-project-modal/components/clone-project-modal-content' export const Basic = args => { diff --git a/services/web/frontend/stories/clone-project-modal.stories.js b/services/web/frontend/stories/clone-project-modal.stories.js index 7d20ea6d93..eed732a474 100644 --- a/services/web/frontend/stories/clone-project-modal.stories.js +++ b/services/web/frontend/stories/clone-project-modal.stories.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import CloneProjectModal from '../js/features/clone-project-modal/components/clone-project-modal' diff --git a/services/web/frontend/stories/dropdown.stories.js b/services/web/frontend/stories/dropdown.stories.js index 05270154fb..f588cd8f40 100644 --- a/services/web/frontend/stories/dropdown.stories.js +++ b/services/web/frontend/stories/dropdown.stories.js @@ -1,4 +1,3 @@ -import React from 'react' import { Dropdown, MenuItem } from 'react-bootstrap' import ControlledDropdown from '../js/shared/components/controlled-dropdown' diff --git a/services/web/frontend/stories/editor-navigation-toolbar.stories.js b/services/web/frontend/stories/editor-navigation-toolbar.stories.js index b7d020ad8e..c2b4df7ae7 100644 --- a/services/web/frontend/stories/editor-navigation-toolbar.stories.js +++ b/services/web/frontend/stories/editor-navigation-toolbar.stories.js @@ -1,4 +1,3 @@ -import React from 'react' import ToolbarHeader from '../js/features/editor-navigation-toolbar/components/toolbar-header' import { setupContext } from './fixtures/context' diff --git a/services/web/frontend/stories/file-tree.stories.js b/services/web/frontend/stories/file-tree.stories.js index 8df74b7e75..9bf2442ed9 100644 --- a/services/web/frontend/stories/file-tree.stories.js +++ b/services/web/frontend/stories/file-tree.stories.js @@ -1,4 +1,3 @@ -import React from 'react' import MockedSocket from 'socket.io-mock' import { ContextRoot } from '../js/shared/context/root-context' diff --git a/services/web/frontend/stories/file-view.stories.js b/services/web/frontend/stories/file-view.stories.js index c26df536cb..fc8ec16ff7 100644 --- a/services/web/frontend/stories/file-view.stories.js +++ b/services/web/frontend/stories/file-view.stories.js @@ -1,5 +1,3 @@ -import React from 'react' - import { ContextRoot } from '../js/shared/context/root-context' import FileView from '../js/features/file-view/components/file-view' import useFetchMock from './hooks/use-fetch-mock' diff --git a/services/web/frontend/stories/git-bridge-modal.stories.js b/services/web/frontend/stories/git-bridge-modal.stories.js index f3e9a23d88..d57c1b6ed4 100644 --- a/services/web/frontend/stories/git-bridge-modal.stories.js +++ b/services/web/frontend/stories/git-bridge-modal.stories.js @@ -1,4 +1,3 @@ -import React from 'react' import { ContextRoot } from '../js/shared/context/root-context' import { setupContext } from './fixtures/context' import importOverleafModules from '../macros/import-overleaf-module.macro' diff --git a/services/web/frontend/stories/hotkeys-modal.stories.js b/services/web/frontend/stories/hotkeys-modal.stories.js index 74d40347a3..629ccb1bc2 100644 --- a/services/web/frontend/stories/hotkeys-modal.stories.js +++ b/services/web/frontend/stories/hotkeys-modal.stories.js @@ -1,5 +1,3 @@ -import React from 'react' - import HotkeysModal from '../js/features/hotkeys-modal/components/hotkeys-modal' export const ReviewEnabled = args => { diff --git a/services/web/frontend/stories/icon.stories.js b/services/web/frontend/stories/icon.stories.js index 1c8aaa2626..87d199e980 100644 --- a/services/web/frontend/stories/icon.stories.js +++ b/services/web/frontend/stories/icon.stories.js @@ -1,4 +1,3 @@ -import React from 'react' import Icon from '../js/shared/components/icon' export const Type = args => { diff --git a/services/web/frontend/stories/linked-file.stories.js b/services/web/frontend/stories/linked-file.stories.js index 010a10962c..fed3417aef 100644 --- a/services/web/frontend/stories/linked-file.stories.js +++ b/services/web/frontend/stories/linked-file.stories.js @@ -1,4 +1,3 @@ -import React from 'react' import { LinkedFileInfo } from '../../modules/tpr-webmodule/frontend/js/components/linked-file-info' export const MendeleyLinkedFile = args => { diff --git a/services/web/frontend/stories/modals/create-file/create-file-modal-decorator.js b/services/web/frontend/stories/modals/create-file/create-file-modal-decorator.js index 793e7867e6..aa2f27c819 100644 --- a/services/web/frontend/stories/modals/create-file/create-file-modal-decorator.js +++ b/services/web/frontend/stories/modals/create-file/create-file-modal-decorator.js @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react' +import { useEffect } from 'react' import FileTreeContext from '../../../js/features/file-tree/components/file-tree-context' import FileTreeCreateNameProvider from '../../../js/features/file-tree/contexts/file-tree-create-name' import FileTreeCreateFormProvider from '../../../js/features/file-tree/contexts/file-tree-create-form' diff --git a/services/web/frontend/stories/modals/create-file/create-file-modal-footer.stories.js b/services/web/frontend/stories/modals/create-file/create-file-modal-footer.stories.js index 31167e4220..fd2cd1a872 100644 --- a/services/web/frontend/stories/modals/create-file/create-file-modal-footer.stories.js +++ b/services/web/frontend/stories/modals/create-file/create-file-modal-footer.stories.js @@ -1,4 +1,3 @@ -import React from 'react' import { ModalFooterDecorator, ModalContentDecorator, diff --git a/services/web/frontend/stories/modals/create-file/create-file-modal.stories.js b/services/web/frontend/stories/modals/create-file/create-file-modal.stories.js index 72f3abbd63..4c04e6b8af 100644 --- a/services/web/frontend/stories/modals/create-file/create-file-modal.stories.js +++ b/services/web/frontend/stories/modals/create-file/create-file-modal.stories.js @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react' +import { useEffect } from 'react' import { createFileModalDecorator, mockCreateFileModalFetch, diff --git a/services/web/frontend/stories/modals/create-file/create-file-name-input.stories.js b/services/web/frontend/stories/modals/create-file/create-file-name-input.stories.js index e801face95..b0a649d57d 100644 --- a/services/web/frontend/stories/modals/create-file/create-file-name-input.stories.js +++ b/services/web/frontend/stories/modals/create-file/create-file-name-input.stories.js @@ -1,4 +1,3 @@ -import React from 'react' import FileTreeCreateNameInput from '../../../js/features/file-tree/components/file-tree-create/file-tree-create-name-input' import FileTreeCreateNameProvider from '../../../js/features/file-tree/contexts/file-tree-create-name' import { diff --git a/services/web/frontend/stories/modals/create-file/error-message.stories.js b/services/web/frontend/stories/modals/create-file/error-message.stories.js index 2189774b78..3c29babdae 100644 --- a/services/web/frontend/stories/modals/create-file/error-message.stories.js +++ b/services/web/frontend/stories/modals/create-file/error-message.stories.js @@ -1,4 +1,3 @@ -import React from 'react' import ErrorMessage from '../../../js/features/file-tree/components/file-tree-create/error-message' import { createFileModalDecorator } from './create-file-modal-decorator' import { FetchError } from '../../../js/infrastructure/fetch-json' diff --git a/services/web/frontend/stories/modals/modal-decorators.js b/services/web/frontend/stories/modals/modal-decorators.js index 76cfb0f13b..53b304673a 100644 --- a/services/web/frontend/stories/modals/modal-decorators.js +++ b/services/web/frontend/stories/modals/modal-decorators.js @@ -1,5 +1,3 @@ -import React from 'react' - /** * Wrap modal content in modal classes, without modal behaviours */ diff --git a/services/web/frontend/stories/outline.stories.js b/services/web/frontend/stories/outline.stories.js index abd9b5a85e..2ee30b541b 100644 --- a/services/web/frontend/stories/outline.stories.js +++ b/services/web/frontend/stories/outline.stories.js @@ -1,5 +1,3 @@ -import React from 'react' - import OutlinePane from '../js/features/outline/components/outline-pane' import { ContextRoot } from '../js/shared/context/root-context' import { setupContext } from './fixtures/context' diff --git a/services/web/frontend/stories/pagination.stories.js b/services/web/frontend/stories/pagination.stories.js index c50ff6728b..7a46750df7 100644 --- a/services/web/frontend/stories/pagination.stories.js +++ b/services/web/frontend/stories/pagination.stories.js @@ -1,5 +1,3 @@ -import React from 'react' - import Pagination from '../js/shared/components/pagination' export const Interactive = args => { diff --git a/services/web/frontend/stories/preview-logs-pane-entry.stories.js b/services/web/frontend/stories/preview-logs-pane-entry.stories.js index c8210c1cd6..7c17aff60e 100644 --- a/services/web/frontend/stories/preview-logs-pane-entry.stories.js +++ b/services/web/frontend/stories/preview-logs-pane-entry.stories.js @@ -1,4 +1,3 @@ -import React from 'react' import PreviewLogsPaneEntry from '../js/features/preview/components/preview-logs-pane-entry.js' import Icon from '../js/shared/components/icon.js' diff --git a/services/web/frontend/stories/preview-logs-pane.stories.js b/services/web/frontend/stories/preview-logs-pane.stories.js index 066cbe161b..767cc3edff 100644 --- a/services/web/frontend/stories/preview-logs-pane.stories.js +++ b/services/web/frontend/stories/preview-logs-pane.stories.js @@ -1,4 +1,3 @@ -import React from 'react' import PreviewLogsPane from '../js/features/preview/components/preview-logs-pane' import { EditorProvider } from '../js/shared/context/editor-context' import { ApplicationProvider } from '../js/shared/context/application-context' diff --git a/services/web/frontend/stories/share-project-modal.stories.js b/services/web/frontend/stories/share-project-modal.stories.js index d0e9b82fa4..9652c97e6e 100644 --- a/services/web/frontend/stories/share-project-modal.stories.js +++ b/services/web/frontend/stories/share-project-modal.stories.js @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react' +import { useEffect } from 'react' import ShareProjectModal from '../js/features/share-project-modal/components/share-project-modal' import useFetchMock from './hooks/use-fetch-mock' import { withContextRoot } from './utils/with-context-root' diff --git a/services/web/frontend/stories/symbol-palette.stories.js b/services/web/frontend/stories/symbol-palette.stories.js index f50dcdff7a..0237b99725 100644 --- a/services/web/frontend/stories/symbol-palette.stories.js +++ b/services/web/frontend/stories/symbol-palette.stories.js @@ -1,5 +1,3 @@ -import React from 'react' - import SymbolPalette from '../js/features/symbol-palette/components/symbol-palette' export const Interactive = args => { diff --git a/services/web/frontend/stories/use-expand-collapse.stories.js b/services/web/frontend/stories/use-expand-collapse.stories.js index c28de28fdf..07ba4b77cd 100644 --- a/services/web/frontend/stories/use-expand-collapse.stories.js +++ b/services/web/frontend/stories/use-expand-collapse.stories.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import useExpandCollapse from '../js/shared/hooks/use-expand-collapse' diff --git a/services/web/frontend/stories/utils/with-context-root.js b/services/web/frontend/stories/utils/with-context-root.js index 9b037f058f..31f8db93b3 100644 --- a/services/web/frontend/stories/utils/with-context-root.js +++ b/services/web/frontend/stories/utils/with-context-root.js @@ -1,4 +1,3 @@ -import React from 'react' import { ContextRoot } from '../../js/shared/context/root-context' // Unfortunately, we cannot currently use decorators here, since we need to diff --git a/services/web/frontend/stories/word-count-modal-content.stories.js b/services/web/frontend/stories/word-count-modal-content.stories.js index bbf78137cf..6170ffe85c 100644 --- a/services/web/frontend/stories/word-count-modal-content.stories.js +++ b/services/web/frontend/stories/word-count-modal-content.stories.js @@ -1,5 +1,3 @@ -import React from 'react' - import WordCountModalContent from '../js/features/word-count-modal/components/word-count-modal-content' export const Basic = args => { diff --git a/services/web/frontend/stories/word-count-modal.stories.js b/services/web/frontend/stories/word-count-modal.stories.js index e3cbd1e80b..982b52421b 100644 --- a/services/web/frontend/stories/word-count-modal.stories.js +++ b/services/web/frontend/stories/word-count-modal.stories.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import WordCountModal from '../js/features/word-count-modal/components/word-count-modal' diff --git a/services/web/test/frontend/features/chat/components/chat-pane.test.js b/services/web/test/frontend/features/chat/components/chat-pane.test.js index e2c1b266f6..b010cfd8bc 100644 --- a/services/web/test/frontend/features/chat/components/chat-pane.test.js +++ b/services/web/test/frontend/features/chat/components/chat-pane.test.js @@ -1,4 +1,3 @@ -import React from 'react' import { expect } from 'chai' import { fireEvent, diff --git a/services/web/test/frontend/features/chat/components/message-input.test.js b/services/web/test/frontend/features/chat/components/message-input.test.js index 08de88e452..e7885b7834 100644 --- a/services/web/test/frontend/features/chat/components/message-input.test.js +++ b/services/web/test/frontend/features/chat/components/message-input.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import sinon from 'sinon' import { screen, render, fireEvent } from '@testing-library/react' diff --git a/services/web/test/frontend/features/chat/components/message-list.test.js b/services/web/test/frontend/features/chat/components/message-list.test.js index a750cdc7a6..fa7e62da1c 100644 --- a/services/web/test/frontend/features/chat/components/message-list.test.js +++ b/services/web/test/frontend/features/chat/components/message-list.test.js @@ -1,4 +1,3 @@ -import React from 'react' import sinon from 'sinon' import { expect } from 'chai' import { screen, render, fireEvent } from '@testing-library/react' diff --git a/services/web/test/frontend/features/chat/components/message.test.js b/services/web/test/frontend/features/chat/components/message.test.js index 5fd143c1f1..aa244e49e8 100644 --- a/services/web/test/frontend/features/chat/components/message.test.js +++ b/services/web/test/frontend/features/chat/components/message.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import { render, screen } from '@testing-library/react' import Message from '../../../../../frontend/js/features/chat/components/message' diff --git a/services/web/test/frontend/features/chat/context/chat-context.test.js b/services/web/test/frontend/features/chat/context/chat-context.test.js index da0ae41364..009ac3b7fc 100644 --- a/services/web/test/frontend/features/chat/context/chat-context.test.js +++ b/services/web/test/frontend/features/chat/context/chat-context.test.js @@ -1,7 +1,6 @@ // Disable prop type checks for test harnesses /* eslint-disable react/prop-types */ -import React from 'react' import { renderHook, act } from '@testing-library/react-hooks/dom' import { expect } from 'chai' import fetchMock from 'fetch-mock' diff --git a/services/web/test/frontend/features/clone-project-modal/components/clone-project-modal.test.js b/services/web/test/frontend/features/clone-project-modal/components/clone-project-modal.test.js index a0ca4251fe..9fa0af35ee 100644 --- a/services/web/test/frontend/features/clone-project-modal/components/clone-project-modal.test.js +++ b/services/web/test/frontend/features/clone-project-modal/components/clone-project-modal.test.js @@ -1,4 +1,3 @@ -import React from 'react' import { fireEvent, render, screen, waitFor } from '@testing-library/react' import { expect } from 'chai' import CloneProjectModal from '../../../../../frontend/js/features/clone-project-modal/components/clone-project-modal' diff --git a/services/web/test/frontend/features/editor-navigation-toolbar/components/chat-toggle-button.test.js b/services/web/test/frontend/features/editor-navigation-toolbar/components/chat-toggle-button.test.js index 28b23f2023..76e408d28e 100644 --- a/services/web/test/frontend/features/editor-navigation-toolbar/components/chat-toggle-button.test.js +++ b/services/web/test/frontend/features/editor-navigation-toolbar/components/chat-toggle-button.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import { render, screen } from '@testing-library/react' import ChatToggleButton from '../../../../../frontend/js/features/editor-navigation-toolbar/components/chat-toggle-button' diff --git a/services/web/test/frontend/features/editor-navigation-toolbar/components/online-users-widget.test.js b/services/web/test/frontend/features/editor-navigation-toolbar/components/online-users-widget.test.js index fd22eaa2d7..6292891b4d 100644 --- a/services/web/test/frontend/features/editor-navigation-toolbar/components/online-users-widget.test.js +++ b/services/web/test/frontend/features/editor-navigation-toolbar/components/online-users-widget.test.js @@ -1,6 +1,5 @@ import { expect } from 'chai' import sinon from 'sinon' -import React from 'react' import { fireEvent, render, screen } from '@testing-library/react' import OnlineUsersWidget from '../../../../../frontend/js/features/editor-navigation-toolbar/components/online-users-widget' diff --git a/services/web/test/frontend/features/editor-navigation-toolbar/components/project-name-editable-label.test.js b/services/web/test/frontend/features/editor-navigation-toolbar/components/project-name-editable-label.test.js index 114fee777e..d86060302b 100644 --- a/services/web/test/frontend/features/editor-navigation-toolbar/components/project-name-editable-label.test.js +++ b/services/web/test/frontend/features/editor-navigation-toolbar/components/project-name-editable-label.test.js @@ -1,6 +1,5 @@ import { expect } from 'chai' import sinon from 'sinon' -import React from 'react' import { fireEvent, render, screen } from '@testing-library/react' import ProjectNameEditableLabel from '../../../../../frontend/js/features/editor-navigation-toolbar/components/project-name-editable-label' diff --git a/services/web/test/frontend/features/editor-navigation-toolbar/components/toolbar-header.test.js b/services/web/test/frontend/features/editor-navigation-toolbar/components/toolbar-header.test.js index 9eec283ba0..81ab925d42 100644 --- a/services/web/test/frontend/features/editor-navigation-toolbar/components/toolbar-header.test.js +++ b/services/web/test/frontend/features/editor-navigation-toolbar/components/toolbar-header.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import { render, screen } from '@testing-library/react' import ToolbarHeader from '../../../../../frontend/js/features/editor-navigation-toolbar/components/toolbar-header' diff --git a/services/web/test/frontend/features/file-tree/components/file-tree-create/file-tree-create-name-input.test.js b/services/web/test/frontend/features/file-tree/components/file-tree-create/file-tree-create-name-input.test.js index 796a4ec0ea..a56e05642b 100644 --- a/services/web/test/frontend/features/file-tree/components/file-tree-create/file-tree-create-name-input.test.js +++ b/services/web/test/frontend/features/file-tree/components/file-tree-create/file-tree-create-name-input.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import { screen, render, waitFor, cleanup } from '@testing-library/react' import sinon from 'sinon' diff --git a/services/web/test/frontend/features/file-tree/components/file-tree-create/file-tree-modal-create-file.test.js b/services/web/test/frontend/features/file-tree/components/file-tree-create/file-tree-modal-create-file.test.js index c181425a03..8c532d786c 100644 --- a/services/web/test/frontend/features/file-tree/components/file-tree-create/file-tree-modal-create-file.test.js +++ b/services/web/test/frontend/features/file-tree/components/file-tree-create/file-tree-modal-create-file.test.js @@ -1,6 +1,6 @@ import { expect } from 'chai' import * as sinon from 'sinon' -import React, { useEffect } from 'react' +import { useEffect } from 'react' import { screen, render, diff --git a/services/web/test/frontend/features/file-tree/components/file-tree-doc.test.js b/services/web/test/frontend/features/file-tree/components/file-tree-doc.test.js index 80b8efa51f..df3284dc63 100644 --- a/services/web/test/frontend/features/file-tree/components/file-tree-doc.test.js +++ b/services/web/test/frontend/features/file-tree/components/file-tree-doc.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import { screen, fireEvent } from '@testing-library/react' import renderWithContext from '../helpers/render-with-context' diff --git a/services/web/test/frontend/features/file-tree/components/file-tree-folder-list.test.js b/services/web/test/frontend/features/file-tree/components/file-tree-folder-list.test.js index 220ceb3b19..360a8f5538 100644 --- a/services/web/test/frontend/features/file-tree/components/file-tree-folder-list.test.js +++ b/services/web/test/frontend/features/file-tree/components/file-tree-folder-list.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import { screen, fireEvent } from '@testing-library/react' import renderWithContext from '../helpers/render-with-context' diff --git a/services/web/test/frontend/features/file-tree/components/file-tree-folder.test.js b/services/web/test/frontend/features/file-tree/components/file-tree-folder.test.js index c9a94fbef3..bf8ee52a43 100644 --- a/services/web/test/frontend/features/file-tree/components/file-tree-folder.test.js +++ b/services/web/test/frontend/features/file-tree/components/file-tree-folder.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import { screen, fireEvent } from '@testing-library/react' import renderWithContext from '../helpers/render-with-context' diff --git a/services/web/test/frontend/features/file-tree/components/file-tree-item/file-tree-item-inner.test.js b/services/web/test/frontend/features/file-tree/components/file-tree-item/file-tree-item-inner.test.js index 289cba4850..274635d36a 100644 --- a/services/web/test/frontend/features/file-tree/components/file-tree-item/file-tree-item-inner.test.js +++ b/services/web/test/frontend/features/file-tree/components/file-tree-item/file-tree-item-inner.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import sinon from 'sinon' import { screen, fireEvent } from '@testing-library/react' import renderWithContext from '../../helpers/render-with-context' diff --git a/services/web/test/frontend/features/file-tree/components/file-tree-item/file-tree-item-menu.test.js b/services/web/test/frontend/features/file-tree/components/file-tree-item/file-tree-item-menu.test.js index d92918d630..d1637b621f 100644 --- a/services/web/test/frontend/features/file-tree/components/file-tree-item/file-tree-item-menu.test.js +++ b/services/web/test/frontend/features/file-tree/components/file-tree-item/file-tree-item-menu.test.js @@ -1,4 +1,3 @@ -import React from 'react' import sinon from 'sinon' import { expect } from 'chai' import { screen, fireEvent } from '@testing-library/react' diff --git a/services/web/test/frontend/features/file-tree/components/file-tree-item/file-tree-item-name.test.js b/services/web/test/frontend/features/file-tree/components/file-tree-item/file-tree-item-name.test.js index 9925b9b2aa..2531fb11bf 100644 --- a/services/web/test/frontend/features/file-tree/components/file-tree-item/file-tree-item-name.test.js +++ b/services/web/test/frontend/features/file-tree/components/file-tree-item/file-tree-item-name.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import sinon from 'sinon' import { screen, fireEvent, cleanup } from '@testing-library/react' import renderWithContext from '../../helpers/render-with-context' diff --git a/services/web/test/frontend/features/file-tree/components/file-tree-root.test.js b/services/web/test/frontend/features/file-tree/components/file-tree-root.test.js index e332357db2..2bc5872d81 100644 --- a/services/web/test/frontend/features/file-tree/components/file-tree-root.test.js +++ b/services/web/test/frontend/features/file-tree/components/file-tree-root.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import sinon from 'sinon' import { screen, fireEvent, waitFor } from '@testing-library/react' import fetchMock from 'fetch-mock' diff --git a/services/web/test/frontend/features/file-tree/components/file-tree-toolbar.test.js b/services/web/test/frontend/features/file-tree/components/file-tree-toolbar.test.js index 25a6850155..940ec810a8 100644 --- a/services/web/test/frontend/features/file-tree/components/file-tree-toolbar.test.js +++ b/services/web/test/frontend/features/file-tree/components/file-tree-toolbar.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import { screen } from '@testing-library/react' import renderWithContext from '../helpers/render-with-context' diff --git a/services/web/test/frontend/features/file-tree/flows/context-menu.test.js b/services/web/test/frontend/features/file-tree/flows/context-menu.test.js index 0e6e036184..180a76de89 100644 --- a/services/web/test/frontend/features/file-tree/flows/context-menu.test.js +++ b/services/web/test/frontend/features/file-tree/flows/context-menu.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import sinon from 'sinon' import { screen, fireEvent } from '@testing-library/react' diff --git a/services/web/test/frontend/features/file-tree/flows/create-folder.test.js b/services/web/test/frontend/features/file-tree/flows/create-folder.test.js index 9eab493009..02dd3a9b2a 100644 --- a/services/web/test/frontend/features/file-tree/flows/create-folder.test.js +++ b/services/web/test/frontend/features/file-tree/flows/create-folder.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import sinon from 'sinon' import { screen, fireEvent, waitFor } from '@testing-library/react' import fetchMock from 'fetch-mock' diff --git a/services/web/test/frontend/features/file-tree/flows/delete-entity.test.js b/services/web/test/frontend/features/file-tree/flows/delete-entity.test.js index 743cb5debb..913717aba0 100644 --- a/services/web/test/frontend/features/file-tree/flows/delete-entity.test.js +++ b/services/web/test/frontend/features/file-tree/flows/delete-entity.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import sinon from 'sinon' import { screen, fireEvent, waitFor } from '@testing-library/react' import fetchMock from 'fetch-mock' diff --git a/services/web/test/frontend/features/file-tree/flows/rename-entity.test.js b/services/web/test/frontend/features/file-tree/flows/rename-entity.test.js index 566f59c7d4..08d458e634 100644 --- a/services/web/test/frontend/features/file-tree/flows/rename-entity.test.js +++ b/services/web/test/frontend/features/file-tree/flows/rename-entity.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import sinon from 'sinon' import { screen, fireEvent } from '@testing-library/react' import fetchMock from 'fetch-mock' diff --git a/services/web/test/frontend/features/file-tree/helpers/render-with-context.js b/services/web/test/frontend/features/file-tree/helpers/render-with-context.js index b8be495052..57fd1d9d96 100644 --- a/services/web/test/frontend/features/file-tree/helpers/render-with-context.js +++ b/services/web/test/frontend/features/file-tree/helpers/render-with-context.js @@ -1,4 +1,3 @@ -import React from 'react' import { render } from '@testing-library/react' import FileTreeContext from '../../../../../frontend/js/features/file-tree/components/file-tree-context' diff --git a/services/web/test/frontend/features/file-view/components/file-view-header.test.js b/services/web/test/frontend/features/file-view/components/file-view-header.test.js index fbe703f7a3..6789462a3d 100644 --- a/services/web/test/frontend/features/file-view/components/file-view-header.test.js +++ b/services/web/test/frontend/features/file-view/components/file-view-header.test.js @@ -1,4 +1,3 @@ -import React from 'react' import { screen, fireEvent, diff --git a/services/web/test/frontend/features/file-view/components/file-view-image.test.js b/services/web/test/frontend/features/file-view/components/file-view-image.test.js index 93b5dcb472..b2e6f98a17 100644 --- a/services/web/test/frontend/features/file-view/components/file-view-image.test.js +++ b/services/web/test/frontend/features/file-view/components/file-view-image.test.js @@ -1,4 +1,3 @@ -import React from 'react' import { screen } from '@testing-library/react' import { renderWithEditorContext } from '../../../helpers/render-with-context' diff --git a/services/web/test/frontend/features/file-view/components/file-view-text.test.js b/services/web/test/frontend/features/file-view/components/file-view-text.test.js index 409132b302..fbe139ae5c 100644 --- a/services/web/test/frontend/features/file-view/components/file-view-text.test.js +++ b/services/web/test/frontend/features/file-view/components/file-view-text.test.js @@ -1,4 +1,3 @@ -import React from 'react' import { screen } from '@testing-library/react' import fetchMock from 'fetch-mock' diff --git a/services/web/test/frontend/features/file-view/components/file-view.test.js b/services/web/test/frontend/features/file-view/components/file-view.test.js index e23ad3995d..1fa4854e57 100644 --- a/services/web/test/frontend/features/file-view/components/file-view.test.js +++ b/services/web/test/frontend/features/file-view/components/file-view.test.js @@ -1,4 +1,3 @@ -import React from 'react' import { screen, waitForElementToBeRemoved, diff --git a/services/web/test/frontend/features/hotkeys-modal/components/hotkeys-modal.test.js b/services/web/test/frontend/features/hotkeys-modal/components/hotkeys-modal.test.js index 8565658cea..b7249da797 100644 --- a/services/web/test/frontend/features/hotkeys-modal/components/hotkeys-modal.test.js +++ b/services/web/test/frontend/features/hotkeys-modal/components/hotkeys-modal.test.js @@ -1,4 +1,3 @@ -import React from 'react' import { render, screen } from '@testing-library/react' import HotkeysModal from '../../../../../frontend/js/features/hotkeys-modal/components/hotkeys-modal' import { expect } from 'chai' diff --git a/services/web/test/frontend/features/outline/components/outline-item.test.js b/services/web/test/frontend/features/outline/components/outline-item.test.js index cbe9307c1a..64759cfe45 100644 --- a/services/web/test/frontend/features/outline/components/outline-item.test.js +++ b/services/web/test/frontend/features/outline/components/outline-item.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import sinon from 'sinon' import { screen, render, fireEvent } from '@testing-library/react' diff --git a/services/web/test/frontend/features/outline/components/outline-list.test.js b/services/web/test/frontend/features/outline/components/outline-list.test.js index 2a61eec3ce..b46ab00520 100644 --- a/services/web/test/frontend/features/outline/components/outline-list.test.js +++ b/services/web/test/frontend/features/outline/components/outline-list.test.js @@ -1,4 +1,3 @@ -import React from 'react' import { screen, render } from '@testing-library/react' import OutlineList from '../../../../../frontend/js/features/outline/components/outline-list' diff --git a/services/web/test/frontend/features/outline/components/outline-pane.test.js b/services/web/test/frontend/features/outline/components/outline-pane.test.js index 2ebf37ed29..47189e37f3 100644 --- a/services/web/test/frontend/features/outline/components/outline-pane.test.js +++ b/services/web/test/frontend/features/outline/components/outline-pane.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import sinon from 'sinon' import { screen, fireEvent } from '@testing-library/react' diff --git a/services/web/test/frontend/features/outline/components/outline-root.test.js b/services/web/test/frontend/features/outline/components/outline-root.test.js index 0643b390a7..3114af5fa7 100644 --- a/services/web/test/frontend/features/outline/components/outline-root.test.js +++ b/services/web/test/frontend/features/outline/components/outline-root.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import { screen, render } from '@testing-library/react' import OutlineRoot from '../../../../../frontend/js/features/outline/components/outline-root' diff --git a/services/web/test/frontend/features/preview/components/preview-download-button.test.js b/services/web/test/frontend/features/preview/components/preview-download-button.test.js index 271394e2e9..4632e7931c 100644 --- a/services/web/test/frontend/features/preview/components/preview-download-button.test.js +++ b/services/web/test/frontend/features/preview/components/preview-download-button.test.js @@ -1,4 +1,3 @@ -import React from 'react' import { expect } from 'chai' import { screen, render } from '@testing-library/react' diff --git a/services/web/test/frontend/features/preview/components/preview-download-file-list.test.js b/services/web/test/frontend/features/preview/components/preview-download-file-list.test.js index 47fc70b87c..4b25763488 100644 --- a/services/web/test/frontend/features/preview/components/preview-download-file-list.test.js +++ b/services/web/test/frontend/features/preview/components/preview-download-file-list.test.js @@ -1,4 +1,3 @@ -import React from 'react' import { expect } from 'chai' import { screen, render } from '@testing-library/react' diff --git a/services/web/test/frontend/features/preview/components/preview-logs-pane-entry.test.js b/services/web/test/frontend/features/preview/components/preview-logs-pane-entry.test.js index 0932bdf549..ddc49b9d77 100644 --- a/services/web/test/frontend/features/preview/components/preview-logs-pane-entry.test.js +++ b/services/web/test/frontend/features/preview/components/preview-logs-pane-entry.test.js @@ -1,4 +1,3 @@ -import React from 'react' import { expect } from 'chai' import sinon from 'sinon' import { screen, render, fireEvent } from '@testing-library/react' diff --git a/services/web/test/frontend/features/preview/components/preview-logs-pane.test.js b/services/web/test/frontend/features/preview/components/preview-logs-pane.test.js index e09c49fdbe..e4fec64547 100644 --- a/services/web/test/frontend/features/preview/components/preview-logs-pane.test.js +++ b/services/web/test/frontend/features/preview/components/preview-logs-pane.test.js @@ -1,4 +1,3 @@ -import React from 'react' import { screen, fireEvent } from '@testing-library/react' import PreviewLogsPane from '../../../../../frontend/js/features/preview/components/preview-logs-pane' import sinon from 'sinon' diff --git a/services/web/test/frontend/features/preview/components/preview-logs-toggle-button.test.js b/services/web/test/frontend/features/preview/components/preview-logs-toggle-button.test.js index 0db13d2961..fd74436be6 100644 --- a/services/web/test/frontend/features/preview/components/preview-logs-toggle-button.test.js +++ b/services/web/test/frontend/features/preview/components/preview-logs-toggle-button.test.js @@ -1,4 +1,3 @@ -import React from 'react' import { expect } from 'chai' import { screen, render } from '@testing-library/react' diff --git a/services/web/test/frontend/features/preview/components/preview-pane.test.js b/services/web/test/frontend/features/preview/components/preview-pane.test.js index b552b92aaa..155b52eb30 100644 --- a/services/web/test/frontend/features/preview/components/preview-pane.test.js +++ b/services/web/test/frontend/features/preview/components/preview-pane.test.js @@ -1,4 +1,3 @@ -import React from 'react' import { screen, render, fireEvent } from '@testing-library/react' import PreviewPane from '../../../../../frontend/js/features/preview/components/preview-pane' const { expect } = require('chai') diff --git a/services/web/test/frontend/features/preview/components/preview-recompile-button.test.js b/services/web/test/frontend/features/preview/components/preview-recompile-button.test.js index 7f27eb9ff3..eb0cb1d7e4 100644 --- a/services/web/test/frontend/features/preview/components/preview-recompile-button.test.js +++ b/services/web/test/frontend/features/preview/components/preview-recompile-button.test.js @@ -1,4 +1,3 @@ -import React from 'react' import sinon from 'sinon' import { screen, render, fireEvent } from '@testing-library/react' import PreviewRecompileButton from '../../../../../frontend/js/features/preview/components/preview-recompile-button' diff --git a/services/web/test/frontend/features/preview/components/preview-toolbar.test.js b/services/web/test/frontend/features/preview/components/preview-toolbar.test.js index 08c5df71c4..6bfaf34c64 100644 --- a/services/web/test/frontend/features/preview/components/preview-toolbar.test.js +++ b/services/web/test/frontend/features/preview/components/preview-toolbar.test.js @@ -1,4 +1,3 @@ -import React from 'react' import sinon from 'sinon' import { expect } from 'chai' import { screen, render, fireEvent } from '@testing-library/react' diff --git a/services/web/test/frontend/features/share-project-modal/components/share-project-modal.test.js b/services/web/test/frontend/features/share-project-modal/components/share-project-modal.test.js index fc4a382a36..1c386cb8a1 100644 --- a/services/web/test/frontend/features/share-project-modal/components/share-project-modal.test.js +++ b/services/web/test/frontend/features/share-project-modal/components/share-project-modal.test.js @@ -1,6 +1,5 @@ import { expect } from 'chai' import sinon from 'sinon' -import React from 'react' import { screen, fireEvent, diff --git a/services/web/test/frontend/features/symbol-palette/components/symbol-palette.test.js b/services/web/test/frontend/features/symbol-palette/components/symbol-palette.test.js index da80a313d1..1dc5253e32 100644 --- a/services/web/test/frontend/features/symbol-palette/components/symbol-palette.test.js +++ b/services/web/test/frontend/features/symbol-palette/components/symbol-palette.test.js @@ -1,6 +1,5 @@ import { expect } from 'chai' import sinon from 'sinon' -import React from 'react' import { screen, render, fireEvent, waitFor } from '@testing-library/react' import SymbolPalette from '../../../../../frontend/js/features/symbol-palette/components/symbol-palette' diff --git a/services/web/test/frontend/features/word-count-modal/components/word-count-modal.test.js b/services/web/test/frontend/features/word-count-modal/components/word-count-modal.test.js index 5ec5ede8b5..c34f6933f2 100644 --- a/services/web/test/frontend/features/word-count-modal/components/word-count-modal.test.js +++ b/services/web/test/frontend/features/word-count-modal/components/word-count-modal.test.js @@ -1,4 +1,3 @@ -import React from 'react' import { render, screen, cleanup } from '@testing-library/react' import WordCountModal from '../../../../../frontend/js/features/word-count-modal/components/word-count-modal' import { expect } from 'chai' diff --git a/services/web/test/frontend/helpers/render-with-context.js b/services/web/test/frontend/helpers/render-with-context.js index 229311a954..59504564da 100644 --- a/services/web/test/frontend/helpers/render-with-context.js +++ b/services/web/test/frontend/helpers/render-with-context.js @@ -1,7 +1,6 @@ // Disable prop type checks for test harnesses /* eslint-disable react/prop-types */ -import React from 'react' import { render } from '@testing-library/react' import sinon from 'sinon' import { ApplicationProvider } from '../../../frontend/js/shared/context/application-context' diff --git a/services/web/test/frontend/shared/components/icon.test.js b/services/web/test/frontend/shared/components/icon.test.js index 4e9dd9d41d..19d6377535 100644 --- a/services/web/test/frontend/shared/components/icon.test.js +++ b/services/web/test/frontend/shared/components/icon.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import { screen, render } from '@testing-library/react' import Icon from '../../../../frontend/js/shared/components/icon' diff --git a/services/web/test/frontend/shared/components/pagination.test.js b/services/web/test/frontend/shared/components/pagination.test.js index 07ffb04dc1..c5e6e0e079 100644 --- a/services/web/test/frontend/shared/components/pagination.test.js +++ b/services/web/test/frontend/shared/components/pagination.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import { render, screen } from '@testing-library/react' import Pagination from '../../../../frontend/js/shared/components/pagination' diff --git a/services/web/test/frontend/shared/components/processing.test.js b/services/web/test/frontend/shared/components/processing.test.js index 004fbe2033..a053193721 100644 --- a/services/web/test/frontend/shared/components/processing.test.js +++ b/services/web/test/frontend/shared/components/processing.test.js @@ -1,5 +1,4 @@ import { expect } from 'chai' -import React from 'react' import { render } from '@testing-library/react' import Processing from '../../../../frontend/js/shared/components/processing' diff --git a/services/web/test/frontend/shared/hooks/use-expand-collapse.test.js b/services/web/test/frontend/shared/hooks/use-expand-collapse.test.js index 7b84a1d382..15e08edfae 100644 --- a/services/web/test/frontend/shared/hooks/use-expand-collapse.test.js +++ b/services/web/test/frontend/shared/hooks/use-expand-collapse.test.js @@ -1,4 +1,3 @@ -import React from 'react' import PropTypes from 'prop-types' import { expect } from 'chai' import { render } from '@testing-library/react'