From 732594a164a886b98856c9ee92f8f0ccecc59642 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 4 Jul 2020 18:46:09 -0700 Subject: [PATCH] Remove unused imports --- resources/scripts/.eslintrc.yml | 1 - .../components/auth/LoginContainer.tsx | 3 +- .../auth/ResetPasswordContainer.tsx | 1 - .../dashboard/AccountApiContainer.tsx | 5 +-- .../components/dashboard/ServerRow.tsx | 7 +-- .../dashboard/forms/UpdatePasswordForm.tsx | 2 +- .../dashboard/search/SearchContainer.tsx | 2 +- .../components/elements/DropdownMenu.tsx | 1 - .../scripts/components/elements/Field.tsx | 6 +-- .../elements/FormikFieldWrapper.tsx | 1 - .../scripts/components/elements/Input.tsx | 1 - .../components/elements/InputSpinner.tsx | 1 - .../scripts/components/elements/Modal.tsx | 2 +- .../components/screens/ServerError.tsx | 1 - .../components/server/ServerConsole.tsx | 6 +-- .../scripts/components/server/StatGraphs.tsx | 3 +- .../components/server/StopOrKillButton.tsx | 1 - .../server/backups/BackupContextMenu.tsx | 5 +-- .../components/server/backups/BackupRow.tsx | 3 +- .../server/backups/CreateBackupButton.tsx | 2 +- .../server/databases/DatabaseRow.tsx | 5 +-- .../server/databases/DatabasesContainer.tsx | 4 +- .../server/files/FileDropdownMenu.tsx | 15 ++++--- .../components/server/files/FileObjectRow.tsx | 4 +- .../server/schedules/DeleteScheduleButton.tsx | 1 + .../server/schedules/ScheduleRow.tsx | 5 +-- .../server/schedules/ScheduleTaskRow.tsx | 6 +-- .../server/settings/SettingsContainer.tsx | 2 +- .../server/users/AddSubuserButton.tsx | 2 +- .../server/users/RemoveSubuserButton.tsx | 2 +- .../components/server/users/UserRow.tsx | 4 +- resources/scripts/easy-peasy.d.ts | 1 + yarn.lock | 45 ++++++++++++++----- 33 files changed, 69 insertions(+), 81 deletions(-) diff --git a/resources/scripts/.eslintrc.yml b/resources/scripts/.eslintrc.yml index 9ecd57a7a..0b0d552f6 100644 --- a/resources/scripts/.eslintrc.yml +++ b/resources/scripts/.eslintrc.yml @@ -45,7 +45,6 @@ rules: "@typescript-eslint/explicit-function-return-type": 0 "@typescript-eslint/explicit-member-accessibility": 0 "@typescript-eslint/ban-ts-ignore": 0 - "@typescript-eslint/no-unused-vars": 0 "@typescript-eslint/no-explicit-any": 0 "@typescript-eslint/no-non-null-assertion": 0 "@typescript-eslint/ban-ts-comment": 0 diff --git a/resources/scripts/components/auth/LoginContainer.tsx b/resources/scripts/components/auth/LoginContainer.tsx index 7b25c36d7..b520dd7e7 100644 --- a/resources/scripts/components/auth/LoginContainer.tsx +++ b/resources/scripts/components/auth/LoginContainer.tsx @@ -10,7 +10,6 @@ import Field from '@/components/elements/Field'; import { httpErrorToHuman } from '@/api/http'; import { FlashMessage } from '@/state/flashes'; import ReCAPTCHA from 'react-google-recaptcha'; -import Spinner from '@/components/elements/Spinner'; import tw from 'twin.macro'; import Button from '@/components/elements/Button'; @@ -87,7 +86,7 @@ const LoginContainer = ({ isSubmitting, setFieldValue, values, submitForm, handl const EnhancedForm = withFormik({ displayName: 'LoginContainerForm', - mapPropsToValues: (props) => ({ + mapPropsToValues: () => ({ username: '', password: '', recaptchaData: null, diff --git a/resources/scripts/components/auth/ResetPasswordContainer.tsx b/resources/scripts/components/auth/ResetPasswordContainer.tsx index 92bba53ab..6a6f61f12 100644 --- a/resources/scripts/components/auth/ResetPasswordContainer.tsx +++ b/resources/scripts/components/auth/ResetPasswordContainer.tsx @@ -7,7 +7,6 @@ import { httpErrorToHuman } from '@/api/http'; import LoginFormContainer from '@/components/auth/LoginFormContainer'; import { Actions, useStoreActions } from 'easy-peasy'; import { ApplicationStore } from '@/state'; -import Spinner from '@/components/elements/Spinner'; import { Formik, FormikHelpers } from 'formik'; import { object, ref, string } from 'yup'; import Field from '@/components/elements/Field'; diff --git a/resources/scripts/components/dashboard/AccountApiContainer.tsx b/resources/scripts/components/dashboard/AccountApiContainer.tsx index d478f26ac..f3ceb66f0 100644 --- a/resources/scripts/components/dashboard/AccountApiContainer.tsx +++ b/resources/scripts/components/dashboard/AccountApiContainer.tsx @@ -4,15 +4,14 @@ import CreateApiKeyForm from '@/components/dashboard/forms/CreateApiKeyForm'; import getApiKeys, { ApiKey } from '@/api/account/getApiKeys'; import SpinnerOverlay from '@/components/elements/SpinnerOverlay'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faKey } from '@fortawesome/free-solid-svg-icons/faKey'; -import { faTrashAlt } from '@fortawesome/free-solid-svg-icons/faTrashAlt'; +import { faKey, faTrashAlt } from '@fortawesome/free-solid-svg-icons'; import ConfirmationModal from '@/components/elements/ConfirmationModal'; import deleteApiKey from '@/api/account/deleteApiKey'; import { Actions, useStoreActions } from 'easy-peasy'; import { ApplicationStore } from '@/state'; import FlashMessageRender from '@/components/FlashMessageRender'; import { httpErrorToHuman } from '@/api/http'; -import format from 'date-fns/format'; +import { format } from 'date-fns'; import PageContentBlock from '@/components/elements/PageContentBlock'; import tw from 'twin.macro'; import GreyRowBox from '@/components/elements/GreyRowBox'; diff --git a/resources/scripts/components/dashboard/ServerRow.tsx b/resources/scripts/components/dashboard/ServerRow.tsx index 63866467c..481d85317 100644 --- a/resources/scripts/components/dashboard/ServerRow.tsx +++ b/resources/scripts/components/dashboard/ServerRow.tsx @@ -1,16 +1,11 @@ import React, { useEffect, useRef, useState } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faServer } from '@fortawesome/free-solid-svg-icons/faServer'; -import { faEthernet } from '@fortawesome/free-solid-svg-icons/faEthernet'; -import { faMicrochip } from '@fortawesome/free-solid-svg-icons/faMicrochip'; -import { faMemory } from '@fortawesome/free-solid-svg-icons/faMemory'; -import { faHdd } from '@fortawesome/free-solid-svg-icons/faHdd'; +import { faServer, faEthernet, faMicrochip, faMemory, faHdd } from '@fortawesome/free-solid-svg-icons'; import { Link } from 'react-router-dom'; import { Server } from '@/api/server/getServer'; import SpinnerOverlay from '@/components/elements/SpinnerOverlay'; import getServerResourceUsage, { ServerStats } from '@/api/server/getServerResourceUsage'; import { bytesToHuman } from '@/helpers'; -import classNames from 'classnames'; import tw from 'twin.macro'; import GreyRowBox from '@/components/elements/GreyRowBox'; diff --git a/resources/scripts/components/dashboard/forms/UpdatePasswordForm.tsx b/resources/scripts/components/dashboard/forms/UpdatePasswordForm.tsx index 72a95b200..7dec924a5 100644 --- a/resources/scripts/components/dashboard/forms/UpdatePasswordForm.tsx +++ b/resources/scripts/components/dashboard/forms/UpdatePasswordForm.tsx @@ -32,7 +32,7 @@ export default () => { return null; } - const submit = (values: Values, { resetForm, setSubmitting }: FormikHelpers) => { + const submit = (values: Values, { setSubmitting }: FormikHelpers) => { clearFlashes('account:password'); updateAccountPassword({ ...values }) .then(() => { diff --git a/resources/scripts/components/dashboard/search/SearchContainer.tsx b/resources/scripts/components/dashboard/search/SearchContainer.tsx index ef3ae48db..d552d2c1d 100644 --- a/resources/scripts/components/dashboard/search/SearchContainer.tsx +++ b/resources/scripts/components/dashboard/search/SearchContainer.tsx @@ -1,6 +1,6 @@ import React, { useState } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faSearch } from '@fortawesome/free-solid-svg-icons/faSearch'; +import { faSearch } from '@fortawesome/free-solid-svg-icons'; import useEventListener from '@/plugins/useEventListener'; import SearchModal from '@/components/dashboard/search/SearchModal'; diff --git a/resources/scripts/components/elements/DropdownMenu.tsx b/resources/scripts/components/elements/DropdownMenu.tsx index 74492f0c3..8637fa8ec 100644 --- a/resources/scripts/components/elements/DropdownMenu.tsx +++ b/resources/scripts/components/elements/DropdownMenu.tsx @@ -1,5 +1,4 @@ import React, { useEffect, useRef, useState } from 'react'; -import { CSSTransition } from 'react-transition-group'; import styled from 'styled-components/macro'; import tw from 'twin.macro'; import Fade from '@/components/elements/Fade'; diff --git a/resources/scripts/components/elements/Field.tsx b/resources/scripts/components/elements/Field.tsx index f89b01343..0c76f285c 100644 --- a/resources/scripts/components/elements/Field.tsx +++ b/resources/scripts/components/elements/Field.tsx @@ -13,11 +13,11 @@ interface OwnProps { type Props = OwnProps & Omit, 'name'>; -const Field = forwardRef(({ id, name, light = false, label, description, validate, className, ...props }, ref) => ( +const Field = forwardRef(({ id, name, light = false, label, description, validate, ...props }, ref) => ( { ({ field, form: { errors, touched } }: FieldProps) => ( - + <> {label && } @@ -35,7 +35,7 @@ const Field = forwardRef(({ id, name, light = false, la : description ?

{description}

: null } -
+ ) }
diff --git a/resources/scripts/components/elements/FormikFieldWrapper.tsx b/resources/scripts/components/elements/FormikFieldWrapper.tsx index aeaf1b6d0..30214d18e 100644 --- a/resources/scripts/components/elements/FormikFieldWrapper.tsx +++ b/resources/scripts/components/elements/FormikFieldWrapper.tsx @@ -3,7 +3,6 @@ import { Field, FieldProps } from 'formik'; import classNames from 'classnames'; import InputError from '@/components/elements/InputError'; import Label from '@/components/elements/Label'; -import tw from 'twin.macro'; interface Props { id?: string; diff --git a/resources/scripts/components/elements/Input.tsx b/resources/scripts/components/elements/Input.tsx index 4615ab14b..c548aad3e 100644 --- a/resources/scripts/components/elements/Input.tsx +++ b/resources/scripts/components/elements/Input.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import styled, { css } from 'styled-components/macro'; import tw from 'twin.macro'; diff --git a/resources/scripts/components/elements/InputSpinner.tsx b/resources/scripts/components/elements/InputSpinner.tsx index 32f1b18d9..d1273435f 100644 --- a/resources/scripts/components/elements/InputSpinner.tsx +++ b/resources/scripts/components/elements/InputSpinner.tsx @@ -1,6 +1,5 @@ import React from 'react'; import Spinner from '@/components/elements/Spinner'; -import { CSSTransition } from 'react-transition-group'; import Fade from '@/components/elements/Fade'; import tw from 'twin.macro'; diff --git a/resources/scripts/components/elements/Modal.tsx b/resources/scripts/components/elements/Modal.tsx index 9e968b0db..672333ecf 100644 --- a/resources/scripts/components/elements/Modal.tsx +++ b/resources/scripts/components/elements/Modal.tsx @@ -1,6 +1,6 @@ import React, { useEffect, useMemo, useState } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faTimes } from '@fortawesome/free-solid-svg-icons/faTimes'; +import { faTimes } from '@fortawesome/free-solid-svg-icons'; import Spinner from '@/components/elements/Spinner'; import tw from 'twin.macro'; import styled from 'styled-components/macro'; diff --git a/resources/scripts/components/screens/ServerError.tsx b/resources/scripts/components/screens/ServerError.tsx index 7851cf72f..b05dd3f14 100644 --- a/resources/scripts/components/screens/ServerError.tsx +++ b/resources/scripts/components/screens/ServerError.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import styled from 'styled-components/macro'; import ScreenBlock from '@/components/screens/ScreenBlock'; interface Props { diff --git a/resources/scripts/components/server/ServerConsole.tsx b/resources/scripts/components/server/ServerConsole.tsx index d2f7d5f95..bda6c403d 100644 --- a/resources/scripts/components/server/ServerConsole.tsx +++ b/resources/scripts/components/server/ServerConsole.tsx @@ -1,12 +1,8 @@ import React, { lazy, useEffect, useState } from 'react'; import { ServerContext } from '@/state/server'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faServer } from '@fortawesome/free-solid-svg-icons/faServer'; -import { faCircle } from '@fortawesome/free-solid-svg-icons/faCircle'; +import { faCircle, faHdd, faMemory, faMicrochip, faServer } from '@fortawesome/free-solid-svg-icons'; import classNames from 'classnames'; -import { faMemory } from '@fortawesome/free-solid-svg-icons/faMemory'; -import { faMicrochip } from '@fortawesome/free-solid-svg-icons/faMicrochip'; -import { faHdd } from '@fortawesome/free-solid-svg-icons/faHdd'; import { bytesToHuman } from '@/helpers'; import SuspenseSpinner from '@/components/elements/SuspenseSpinner'; import TitledGreyBox from '@/components/elements/TitledGreyBox'; diff --git a/resources/scripts/components/server/StatGraphs.tsx b/resources/scripts/components/server/StatGraphs.tsx index e404a8475..6a162ee05 100644 --- a/resources/scripts/components/server/StatGraphs.tsx +++ b/resources/scripts/components/server/StatGraphs.tsx @@ -4,8 +4,7 @@ import { ServerContext } from '@/state/server'; import { bytesToMegabytes } from '@/helpers'; import merge from 'lodash-es/merge'; import TitledGreyBox from '@/components/elements/TitledGreyBox'; -import { faMemory } from '@fortawesome/free-solid-svg-icons/faMemory'; -import { faMicrochip } from '@fortawesome/free-solid-svg-icons/faMicrochip'; +import { faMemory, faMicrochip } from '@fortawesome/free-solid-svg-icons'; import tw from 'twin.macro'; const chartDefaults: ChartConfiguration = { diff --git a/resources/scripts/components/server/StopOrKillButton.tsx b/resources/scripts/components/server/StopOrKillButton.tsx index 0d8b3db2e..b9daed85b 100644 --- a/resources/scripts/components/server/StopOrKillButton.tsx +++ b/resources/scripts/components/server/StopOrKillButton.tsx @@ -1,6 +1,5 @@ import React, { useEffect, useState } from 'react'; import { ServerContext } from '@/state/server'; -import tw from 'twin.macro'; import { PowerAction } from '@/components/server/ServerConsole'; import Button from '@/components/elements/Button'; diff --git a/resources/scripts/components/server/backups/BackupContextMenu.tsx b/resources/scripts/components/server/backups/BackupContextMenu.tsx index 3dbcd2ace..54a45b9d3 100644 --- a/resources/scripts/components/server/backups/BackupContextMenu.tsx +++ b/resources/scripts/components/server/backups/BackupContextMenu.tsx @@ -1,11 +1,8 @@ import React, { useState } from 'react'; import { ServerBackup } from '@/api/server/backups/getServerBackups'; -import { faEllipsisH } from '@fortawesome/free-solid-svg-icons/faEllipsisH'; +import { faCloudDownloadAlt, faEllipsisH, faLock, faTrashAlt } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import DropdownMenu, { DropdownButtonRow } from '@/components/elements/DropdownMenu'; -import { faCloudDownloadAlt } from '@fortawesome/free-solid-svg-icons/faCloudDownloadAlt'; -import { faTrashAlt } from '@fortawesome/free-solid-svg-icons/faTrashAlt'; -import { faLock } from '@fortawesome/free-solid-svg-icons/faLock'; import getBackupDownloadUrl from '@/api/server/backups/getBackupDownloadUrl'; import { httpErrorToHuman } from '@/api/http'; import useFlash from '@/plugins/useFlash'; diff --git a/resources/scripts/components/server/backups/BackupRow.tsx b/resources/scripts/components/server/backups/BackupRow.tsx index 3f96a7c7f..2a7b625bc 100644 --- a/resources/scripts/components/server/backups/BackupRow.tsx +++ b/resources/scripts/components/server/backups/BackupRow.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { ServerBackup } from '@/api/server/backups/getServerBackups'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faArchive } from '@fortawesome/free-solid-svg-icons/faArchive'; +import { faArchive, faEllipsisH } from '@fortawesome/free-solid-svg-icons'; import { format, formatDistanceToNow } from 'date-fns'; import Spinner from '@/components/elements/Spinner'; import { bytesToHuman } from '@/helpers'; @@ -9,7 +9,6 @@ import Can from '@/components/elements/Can'; import useWebsocketEvent from '@/plugins/useWebsocketEvent'; import { ServerContext } from '@/state/server'; import BackupContextMenu from '@/components/server/backups/BackupContextMenu'; -import { faEllipsisH } from '@fortawesome/free-solid-svg-icons/faEllipsisH'; import tw from 'twin.macro'; import GreyRowBox from '@/components/elements/GreyRowBox'; diff --git a/resources/scripts/components/server/backups/CreateBackupButton.tsx b/resources/scripts/components/server/backups/CreateBackupButton.tsx index 8da01dcaf..7a04f1041 100644 --- a/resources/scripts/components/server/backups/CreateBackupButton.tsx +++ b/resources/scripts/components/server/backups/CreateBackupButton.tsx @@ -12,7 +12,7 @@ import FlashMessageRender from '@/components/FlashMessageRender'; import { ServerContext } from '@/state/server'; import Button from '@/components/elements/Button'; import tw from 'twin.macro'; -import Input, { Textarea } from '@/components/elements/Input'; +import { Textarea } from '@/components/elements/Input'; interface Values { name: string; diff --git a/resources/scripts/components/server/databases/DatabaseRow.tsx b/resources/scripts/components/server/databases/DatabaseRow.tsx index 68559e6ca..4cad11611 100644 --- a/resources/scripts/components/server/databases/DatabaseRow.tsx +++ b/resources/scripts/components/server/databases/DatabaseRow.tsx @@ -1,9 +1,6 @@ import React, { useState } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faDatabase } from '@fortawesome/free-solid-svg-icons/faDatabase'; -import { faTrashAlt } from '@fortawesome/free-solid-svg-icons/faTrashAlt'; -import { faEye } from '@fortawesome/free-solid-svg-icons/faEye'; -import classNames from 'classnames'; +import { faDatabase, faTrashAlt, faEye } from '@fortawesome/free-solid-svg-icons'; import Modal from '@/components/elements/Modal'; import { Form, Formik, FormikHelpers } from 'formik'; import Field from '@/components/elements/Field'; diff --git a/resources/scripts/components/server/databases/DatabasesContainer.tsx b/resources/scripts/components/server/databases/DatabasesContainer.tsx index 90db7c27c..164f2edef 100644 --- a/resources/scripts/components/server/databases/DatabasesContainer.tsx +++ b/resources/scripts/components/server/databases/DatabasesContainer.tsx @@ -5,7 +5,6 @@ import { httpErrorToHuman } from '@/api/http'; import FlashMessageRender from '@/components/FlashMessageRender'; import DatabaseRow from '@/components/server/databases/DatabaseRow'; import Spinner from '@/components/elements/Spinner'; -import { CSSTransition } from 'react-transition-group'; import CreateDatabaseButton from '@/components/server/databases/CreateDatabaseButton'; import Can from '@/components/elements/Can'; import useFlash from '@/plugins/useFlash'; @@ -63,7 +62,8 @@ export default () => { {(featureLimits.databases > 0 && databases.length > 0) &&

- {databases.length} of {featureLimits.databases} databases have been allocated to this server. + {databases.length} of {featureLimits.databases} databases have been allocated to this + server.

} {featureLimits.databases > 0 && featureLimits.databases !== databases.length && diff --git a/resources/scripts/components/server/files/FileDropdownMenu.tsx b/resources/scripts/components/server/files/FileDropdownMenu.tsx index b16fd1b20..53b817d0e 100644 --- a/resources/scripts/components/server/files/FileDropdownMenu.tsx +++ b/resources/scripts/components/server/files/FileDropdownMenu.tsx @@ -1,12 +1,13 @@ import React, { createRef, useEffect, useState } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faEllipsisH } from '@fortawesome/free-solid-svg-icons/faEllipsisH'; -import { CSSTransition } from 'react-transition-group'; -import { faPencilAlt } from '@fortawesome/free-solid-svg-icons/faPencilAlt'; -import { faTrashAlt } from '@fortawesome/free-solid-svg-icons/faTrashAlt'; -import { faFileDownload } from '@fortawesome/free-solid-svg-icons/faFileDownload'; -import { faCopy } from '@fortawesome/free-solid-svg-icons/faCopy'; -import { faLevelUpAlt } from '@fortawesome/free-solid-svg-icons/faLevelUpAlt'; +import { + faCopy, + faEllipsisH, + faFileDownload, + faLevelUpAlt, + faPencilAlt, + faTrashAlt, +} from '@fortawesome/free-solid-svg-icons'; import RenameFileModal from '@/components/server/files/RenameFileModal'; import { ServerContext } from '@/state/server'; import { join } from 'path'; diff --git a/resources/scripts/components/server/files/FileObjectRow.tsx b/resources/scripts/components/server/files/FileObjectRow.tsx index 45abd046c..3494af817 100644 --- a/resources/scripts/components/server/files/FileObjectRow.tsx +++ b/resources/scripts/components/server/files/FileObjectRow.tsx @@ -1,7 +1,5 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faFileImport } from '@fortawesome/free-solid-svg-icons/faFileImport'; -import { faFileAlt } from '@fortawesome/free-solid-svg-icons/faFileAlt'; -import { faFolder } from '@fortawesome/free-solid-svg-icons/faFolder'; +import { faFileAlt, faFileImport, faFolder } from '@fortawesome/free-solid-svg-icons'; import { bytesToHuman, cleanDirectoryPath } from '@/helpers'; import { differenceInHours, format, formatDistanceToNow } from 'date-fns'; import React from 'react'; diff --git a/resources/scripts/components/server/schedules/DeleteScheduleButton.tsx b/resources/scripts/components/server/schedules/DeleteScheduleButton.tsx index 1b6ec5a39..26d86652d 100644 --- a/resources/scripts/components/server/schedules/DeleteScheduleButton.tsx +++ b/resources/scripts/components/server/schedules/DeleteScheduleButton.tsx @@ -39,6 +39,7 @@ export default ({ scheduleId, onDeleted }: Props) => { return ( <> ( diff --git a/resources/scripts/components/server/schedules/ScheduleTaskRow.tsx b/resources/scripts/components/server/schedules/ScheduleTaskRow.tsx index 8b6cd346d..fb1136f73 100644 --- a/resources/scripts/components/server/schedules/ScheduleTaskRow.tsx +++ b/resources/scripts/components/server/schedules/ScheduleTaskRow.tsx @@ -1,19 +1,15 @@ import React, { useState } from 'react'; import { Schedule, Task } from '@/api/server/schedules/getServerSchedules'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faTrashAlt } from '@fortawesome/free-solid-svg-icons/faTrashAlt'; -import { faCode } from '@fortawesome/free-solid-svg-icons/faCode'; -import { faToggleOn } from '@fortawesome/free-solid-svg-icons/faToggleOn'; +import { faCode, faFileArchive, faPencilAlt, faToggleOn, faTrashAlt } from '@fortawesome/free-solid-svg-icons'; import deleteScheduleTask from '@/api/server/schedules/deleteScheduleTask'; import { httpErrorToHuman } from '@/api/http'; import SpinnerOverlay from '@/components/elements/SpinnerOverlay'; import TaskDetailsModal from '@/components/server/schedules/TaskDetailsModal'; -import { faPencilAlt } from '@fortawesome/free-solid-svg-icons/faPencilAlt'; import Can from '@/components/elements/Can'; import useServer from '@/plugins/useServer'; import useFlash from '@/plugins/useFlash'; import { ServerContext } from '@/state/server'; -import { faFileArchive } from '@fortawesome/free-solid-svg-icons/faFileArchive'; import tw from 'twin.macro'; import ConfirmationModal from '@/components/elements/ConfirmationModal'; diff --git a/resources/scripts/components/server/settings/SettingsContainer.tsx b/resources/scripts/components/server/settings/SettingsContainer.tsx index 5697ca824..2be5a8b93 100644 --- a/resources/scripts/components/server/settings/SettingsContainer.tsx +++ b/resources/scripts/components/server/settings/SettingsContainer.tsx @@ -12,7 +12,7 @@ import PageContentBlock from '@/components/elements/PageContentBlock'; import tw from 'twin.macro'; import Input from '@/components/elements/Input'; import Label from '@/components/elements/Label'; -import Button, { LinkButton } from '@/components/elements/Button'; +import { LinkButton } from '@/components/elements/Button'; export default () => { const user = useStoreState(state => state.user.data!); diff --git a/resources/scripts/components/server/users/AddSubuserButton.tsx b/resources/scripts/components/server/users/AddSubuserButton.tsx index 5903088cb..210578bb9 100644 --- a/resources/scripts/components/server/users/AddSubuserButton.tsx +++ b/resources/scripts/components/server/users/AddSubuserButton.tsx @@ -1,6 +1,6 @@ import React, { useState } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faUserPlus } from '@fortawesome/free-solid-svg-icons/faUserPlus'; +import { faUserPlus } from '@fortawesome/free-solid-svg-icons'; import EditSubuserModal from '@/components/server/users/EditSubuserModal'; import Button from '@/components/elements/Button'; import tw from 'twin.macro'; diff --git a/resources/scripts/components/server/users/RemoveSubuserButton.tsx b/resources/scripts/components/server/users/RemoveSubuserButton.tsx index b8020f705..976c64170 100644 --- a/resources/scripts/components/server/users/RemoveSubuserButton.tsx +++ b/resources/scripts/components/server/users/RemoveSubuserButton.tsx @@ -2,7 +2,7 @@ import React, { useState } from 'react'; import ConfirmationModal from '@/components/elements/ConfirmationModal'; import { ServerContext } from '@/state/server'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faTrashAlt } from '@fortawesome/free-solid-svg-icons/faTrashAlt'; +import { faTrashAlt } from '@fortawesome/free-solid-svg-icons'; import { Subuser } from '@/state/server/subusers'; import deleteSubuser from '@/api/server/users/deleteSubuser'; import { Actions, useStoreActions } from 'easy-peasy'; diff --git a/resources/scripts/components/server/users/UserRow.tsx b/resources/scripts/components/server/users/UserRow.tsx index a5b0097b1..eba830467 100644 --- a/resources/scripts/components/server/users/UserRow.tsx +++ b/resources/scripts/components/server/users/UserRow.tsx @@ -1,11 +1,9 @@ import React, { useState } from 'react'; import { Subuser } from '@/state/server/subusers'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faPencilAlt } from '@fortawesome/free-solid-svg-icons/faPencilAlt'; +import { faPencilAlt, faUnlockAlt, faUserLock } from '@fortawesome/free-solid-svg-icons'; import RemoveSubuserButton from '@/components/server/users/RemoveSubuserButton'; import EditSubuserModal from '@/components/server/users/EditSubuserModal'; -import { faUnlockAlt } from '@fortawesome/free-solid-svg-icons/faUnlockAlt'; -import { faUserLock } from '@fortawesome/free-solid-svg-icons/faUserLock'; import classNames from 'classnames'; import Can from '@/components/elements/Can'; import { useStoreState } from 'easy-peasy'; diff --git a/resources/scripts/easy-peasy.d.ts b/resources/scripts/easy-peasy.d.ts index 999ea2f56..6b052ee11 100644 --- a/resources/scripts/easy-peasy.d.ts +++ b/resources/scripts/easy-peasy.d.ts @@ -1,4 +1,5 @@ // noinspection ES6UnusedImports +// eslint-disable-next-line @typescript-eslint/no-unused-vars import EasyPeasy, { Actions, State } from 'easy-peasy'; import { ApplicationStore } from '@/state'; diff --git a/yarn.lock b/yarn.lock index e05197279..b096db93a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2349,6 +2349,7 @@ constants-browserify@^1.0.0: contains-path@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" + integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= content-disposition@0.5.3: version "0.5.3" @@ -2928,6 +2929,7 @@ dns-txt@^2.0.2: doctrine@1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + integrity sha1-N53Ocw9hZvds76TmcHoVmwLFpvo= dependencies: esutils "^2.0.2" isarray "^1.0.0" @@ -3642,6 +3644,7 @@ find-cache-dir@^3.3.1: find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= dependencies: locate-path "^2.0.0" @@ -4128,8 +4131,9 @@ hoopy@^0.1.4: integrity sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ== hosted-git-info@^2.1.4: - version "2.7.1" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047" + version "2.8.8" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.8.tgz#7539bd4bc1e0e0a895815a2e0262420b12858488" + integrity sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg== hpack.js@^2.1.6: version "2.1.6" @@ -4867,6 +4871,7 @@ lines-and-columns@^1.1.6: load-json-file@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= dependencies: graceful-fs "^4.1.2" parse-json "^2.2.0" @@ -4915,6 +4920,7 @@ loader-utils@^2.0.0, loader-utils@~2.0.0: locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= dependencies: p-locate "^2.0.0" path-exists "^3.0.0" @@ -5514,6 +5520,7 @@ nopt@^4.0.1: normalize-package-data@^2.3.2: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== dependencies: hosted-git-info "^2.1.4" resolve "^1.10.0" @@ -5747,8 +5754,9 @@ p-finally@^1.0.0: resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" p-limit@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c" + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== dependencies: p-try "^1.0.0" @@ -5775,6 +5783,7 @@ p-limit@^3.0.1: p-locate@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= dependencies: p-limit "^1.1.0" @@ -5811,6 +5820,7 @@ p-retry@^3.0.1: p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= p-try@^2.0.0: version "2.0.0" @@ -5853,6 +5863,7 @@ parse-asn1@^5.0.0: parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= dependencies: error-ex "^1.2.0" @@ -5936,6 +5947,7 @@ path-to-regexp@^1.7.0: path-type@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= dependencies: pify "^2.0.0" @@ -5991,6 +6003,7 @@ pinkie@^2.0.0: pkg-dir@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= dependencies: find-up "^2.1.0" @@ -6985,6 +6998,7 @@ read-cache@^1.0.0: read-pkg-up@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= dependencies: find-up "^2.0.0" read-pkg "^2.0.0" @@ -6992,6 +7006,7 @@ read-pkg-up@^2.0.0: read-pkg@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= dependencies: load-json-file "^2.0.0" normalize-package-data "^2.3.2" @@ -7635,26 +7650,30 @@ source-map@^0.7.3: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" spdx-correct@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" + version "3.1.1" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" + integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== dependencies: spdx-expression-parse "^3.0.0" spdx-license-ids "^3.0.0" spdx-exceptions@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== spdx-expression-parse@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== dependencies: spdx-exceptions "^2.1.0" spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz#75ecd1a88de8c184ef015eafb51b5b48bfd11bb1" + version "3.0.5" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" + integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== spdy-transport@^3.0.0: version "3.0.0" @@ -7852,6 +7871,7 @@ strip-ansi@^6.0.0: strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= strip-eof@^1.0.0: version "1.0.0" @@ -8460,6 +8480,7 @@ v8-compile-cache@^2.0.3, v8-compile-cache@^2.1.1: validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== dependencies: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0"