From c8b3f2a8b6123c5085d09a132dc6e70ac28303bf Mon Sep 17 00:00:00 2001 From: lianahus Date: Mon, 29 Apr 2024 17:09:02 +0200 Subject: [PATCH] lint fixes for remix-ui --- .../app/src/lib/remix-app/actions/modals.ts | 2 +- .../remix-app/components/dragbar/dragbar.tsx | 4 +- .../components/modals/dialogViewPlugin.tsx | 10 +- .../remix-app/components/modals/dialogs.tsx | 8 +- .../lib/remix-app/components/modals/enter.tsx | 20 +- .../remix-app/components/modals/matomo.tsx | 12 +- .../components/modals/modal-wrapper.tsx | 14 +- .../components/modals/origin-warning.tsx | 10 +- .../lib/remix-app/components/splashscreen.tsx | 2 +- .../app/src/lib/remix-app/context/context.tsx | 6 +- .../src/lib/remix-app/context/provider.tsx | 34 +- .../app/src/lib/remix-app/interface/index.ts | 2 +- .../app/src/lib/remix-app/reducer/modals.ts | 2 +- .../checkbox/src/lib/remix-ui-checkbox.tsx | 12 +- .../copy-to-clipboard/copy-to-clipboard.tsx | 10 +- .../debugger-ui/src/hooks/extract-data.tsx | 4 +- .../debugger-ui/src/lib/api/debugger-api.ts | 4 +- .../lib/button-navigator/button-navigator.tsx | 32 +- .../debugger-ui/src/lib/debugger-ui.tsx | 26 +- .../debugger-ui/src/lib/slider/slider.tsx | 2 +- .../src/lib/step-manager/step-manager.tsx | 6 +- .../src/lib/tx-browser/tx-browser.tsx | 12 +- .../src/lib/vm-debugger/assembly-items.tsx | 8 +- .../src/lib/vm-debugger/calldata-panel.tsx | 2 +- .../src/lib/vm-debugger/callstack-panel.tsx | 2 +- .../src/lib/vm-debugger/code-list-view.tsx | 2 +- .../src/lib/vm-debugger/dropdown-panel.tsx | 30 +- .../lib/vm-debugger/full-storages-changes.tsx | 2 +- .../src/lib/vm-debugger/function-panel.tsx | 4 +- .../src/lib/vm-debugger/global-variables.tsx | 4 +- .../src/lib/vm-debugger/memory-panel.tsx | 4 +- .../src/lib/vm-debugger/solidity-locals.tsx | 6 +- .../src/lib/vm-debugger/solidity-state.tsx | 8 +- .../src/lib/vm-debugger/stack-panel.tsx | 4 +- .../src/lib/vm-debugger/step-detail.tsx | 2 +- .../src/lib/vm-debugger/storage-panel.tsx | 2 +- .../src/lib/vm-debugger/vm-debugger-head.tsx | 26 +- .../src/lib/vm-debugger/vm-debugger.tsx | 4 +- .../drag-n-drop/src/lib/drag-n-drop.tsx | 10 +- .../remix-ui/editor/src/lib/actions/editor.ts | 2 +- .../src/lib/hardhat-ethers-extension.ts | 2 +- .../src/lib/providers/codeActionProvider.ts | 12 +- .../providers/completion/completionGlobals.ts | 4 - .../src/lib/providers/completionProvider.ts | 12 +- .../src/lib/providers/definitionProvider.ts | 2 +- .../editor/src/lib/providers/hoverProvider.ts | 4 +- .../lib/providers/inlineCompletionProvider.ts | 27 +- .../editor/src/lib/remix-ui-editor.tsx | 64 ++-- libs/remix-ui/editor/src/lib/syntaxes/move.ts | 2 +- libs/remix-ui/editor/src/lib/web-types.ts | 2 +- .../lib/components/file-decoration-icon.tsx | 4 +- .../file-decoration-custom-icon.tsx | 2 +- .../file-decoration-error-icon.tsx | 2 +- .../file-decoration-tooltip.tsx | 6 +- .../file-decoration-warning-icon.tsx | 2 +- .../file-decorators/src/lib/helper/index.tsx | 2 +- .../src/lib/components/customCheckbox.tsx | 2 +- .../grid-view/src/lib/remix-ui-grid-cell.tsx | 13 +- .../grid-view/src/lib/remix-ui-grid-view.tsx | 14 +- libs/remix-ui/helper/src/lib/bleach.ts | 4 +- .../src/lib/components/PluginViewWrapper.tsx | 2 +- .../src/lib/components/custom-dropdown.tsx | 14 +- .../helper/src/lib/components/web3Dialog.tsx | 2 +- .../helper/src/lib/helper-components.tsx | 4 +- .../helper/src/lib/remix-ui-helper.ts | 4 +- .../src/lib/components/customNavButtons.tsx | 4 +- .../src/lib/components/homeTabFeatured.tsx | 52 ++-- .../lib/components/homeTabFeaturedPlugins.tsx | 22 +- .../src/lib/components/homeTabFile.tsx | 6 +- .../src/lib/components/homeTabGetStarted.tsx | 23 +- .../src/lib/components/homeTabLearn.tsx | 34 +- .../src/lib/components/homeTabScamAlert.tsx | 6 +- .../src/lib/components/homeTabTitle.tsx | 16 +- .../src/lib/components/homeTablangOptions.tsx | 8 +- .../src/lib/components/pluginButton.tsx | 12 +- .../src/lib/components/workspaceTemplate.tsx | 12 +- .../home-tab/src/lib/remix-ui-home-tab.tsx | 8 +- .../src/lib/remix-ui-modal-dialog.tsx | 8 +- .../panel/src/lib/dragbar/dragbar.tsx | 4 +- .../panel/src/lib/main/main-panel.tsx | 4 +- .../panel/src/lib/plugins/panel-header.tsx | 6 +- .../panel/src/lib/plugins/panel-plugin.tsx | 2 +- .../panel/src/lib/plugins/remix-ui-panel.tsx | 2 +- .../src/lib/permission-dialog.tsx | 10 +- .../src/lib/components/ActivePluginCard.tsx | 8 +- .../components/ActivePluginCardContainer.tsx | 14 +- .../src/lib/components/InactivePluginCard.tsx | 20 +- .../InactivePluginCardContainer.tsx | 10 +- .../src/lib/components/LocalPluginForm.tsx | 28 +- .../src/lib/components/moduleHeading.tsx | 4 +- .../lib/components/permissionsSettings.tsx | 18 +- .../src/lib/components/rootView.tsx | 12 +- .../src/lib/remix-ui-plugin-manager.tsx | 8 +- .../src/lib/publish-to-storage.tsx | 30 +- .../src/lib/publishOnSwarm.tsx | 10 +- .../src/lib/publishToIPFS.tsx | 8 +- libs/remix-ui/renderer/src/lib/renderer.tsx | 16 +- .../run-tab/src/lib/actions/account.ts | 5 +- .../run-tab/src/lib/actions/deploy.ts | 14 +- .../run-tab/src/lib/actions/events.ts | 19 +- .../remix-ui/run-tab/src/lib/actions/index.ts | 6 +- .../run-tab/src/lib/actions/payload.ts | 4 +- .../run-tab/src/lib/components/account.tsx | 78 ++--- .../src/lib/components/contractDropdownUI.tsx | 2 +- .../src/lib/components/contractGUI.tsx | 48 +-- .../src/lib/components/deployButton.tsx | 16 +- .../src/lib/components/deployInput.tsx | 8 +- .../src/lib/components/environment.tsx | 16 +- .../run-tab/src/lib/components/gasLimit.tsx | 12 +- .../lib/components/instanceContainerUI.tsx | 6 +- .../run-tab/src/lib/components/mainnet.tsx | 32 +- .../src/lib/components/multiDeployInput.tsx | 12 +- .../run-tab/src/lib/components/network.tsx | 2 +- .../run-tab/src/lib/components/passphrase.tsx | 2 +- .../src/lib/components/recorderCardUI.tsx | 24 +- .../run-tab/src/lib/components/scenario.tsx | 2 +- .../run-tab/src/lib/components/settingsUI.tsx | 12 +- .../src/lib/components/universalDappUI.tsx | 58 ++-- .../run-tab/src/lib/components/value.tsx | 12 +- .../run-tab/src/lib/reducers/runTab.ts | 4 +- libs/remix-ui/run-tab/src/lib/run-tab.tsx | 40 +-- .../search/src/lib/components/Exclude.tsx | 10 +- .../search/src/lib/components/Find.tsx | 10 +- .../src/lib/components/FindContainer.tsx | 16 +- .../search/src/lib/components/Include.tsx | 10 +- .../src/lib/components/OverWriteCheck.tsx | 8 +- .../search/src/lib/components/Replace.tsx | 10 +- .../search/src/lib/components/Search.tsx | 14 +- .../search/src/lib/components/StopSearch.tsx | 8 +- .../search/src/lib/components/Undo.tsx | 14 +- .../lib/components/results/ResultFileName.tsx | 6 +- .../src/lib/components/results/ResultItem.tsx | 26 +- .../lib/components/results/ResultSummary.tsx | 24 +- .../src/lib/components/results/Results.tsx | 16 +- .../lib/components/results/SearchHelper.ts | 5 +- .../search/src/lib/context/context.tsx | 8 +- .../search/src/lib/reducers/Reducer.ts | 14 +- libs/remix-ui/search/src/lib/types/index.ts | 2 - .../settings/src/lib/etherscan-settings.tsx | 16 +- .../settings/src/lib/github-settings.tsx | 16 +- .../settings/src/lib/remix-ui-settings.tsx | 48 +-- .../settings/src/lib/settingsReducer.ts | 4 +- .../settings/src/lib/sindri-settings.tsx | 16 +- .../src/lib/components/solidityCompile.tsx | 5 +- .../src/lib/api/compiler-api.ts | 9 +- .../src/lib/compiler-container.tsx | 136 ++++---- .../src/lib/components/compiler-menu.tsx | 2 +- .../src/lib/contract-selection.tsx | 22 +- .../src/lib/logic/compileTabLogic.ts | 12 +- .../src/lib/logic/flattenerUtilities.ts | 28 +- .../src/lib/solidity-compiler.tsx | 5 +- .../solidity-compiler/src/lib/types/index.ts | 1 - .../src/lib/components/UmlDownload.tsx | 12 +- .../src/lib/solidity-uml-gen.tsx | 24 +- .../src/lib/utilities/UmlDownloadStrategy.ts | 2 +- .../solidity-uml-gen/src/types/index.ts | 2 +- .../src/lib/logic/testTabLogic.ts | 8 +- .../src/lib/solidity-unit-testing.tsx | 4 +- .../src/lib/Button/StaticAnalyserButton.tsx | 6 +- .../static-analyser/src/lib/ErrorRenderer.tsx | 8 +- .../src/lib/actions/staticAnalysisActions.ts | 6 +- .../src/lib/components/BasicTitle.tsx | 6 +- .../src/lib/remix-ui-static-analyser.tsx | 30 +- .../static-analyser/src/staticanalyser.d.ts | 1 - libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx | 34 +- .../src/lib/actions/terminalAction.ts | 2 +- .../src/lib/components/ChechTxStatus.tsx | 2 +- .../terminal/src/lib/components/Context.tsx | 6 +- .../src/lib/components/RenderCall.tsx | 16 +- .../components/RenderKnownTransactions.tsx | 16 +- .../components/RenderUnknownTransactions.tsx | 14 +- .../terminal/src/lib/components/Table.tsx | 14 +- .../lib/components/remix-ui-terminal-bar.tsx | 2 +- .../lib/components/remix-ui-terminal-menu.tsx | 2 +- .../src/lib/custom-hooks/useKeyPress.tsx | 4 +- .../src/lib/reducers/terminalReducer.ts | 42 +-- .../terminal/src/lib/remix-ui-terminal.tsx | 20 +- .../terminal/src/lib/terminalWelcome.tsx | 4 +- .../src/lib/remix-ui-theme-module.tsx | 8 +- libs/remix-ui/toaster/src/lib/toaster.tsx | 16 +- .../tooltip-popup/src/lib/tooltip-popup.tsx | 6 +- .../tree-view/src/lib/remix-ui-tree-view.tsx | 4 +- .../src/lib/tree-view-item/tree-view-item.tsx | 6 +- .../src/lib/components/Badge.tsx | 10 +- .../src/lib/components/BasicLogo.tsx | 4 +- .../src/lib/components/Chevron.tsx | 8 +- .../src/lib/components/Home.tsx | 6 +- .../src/lib/components/Icon.tsx | 33 +- .../src/lib/components/IconList.tsx | 8 +- .../src/lib/remix-ui-vertical-icons-panel.tsx | 2 +- .../src/lib/vertical-icons-context-menu.tsx | 8 +- .../src/lib/vyper-compile-details.tsx | 3 +- .../src/lib/vyperCompile.tsx | 4 +- .../workspace/src/lib/actions/events.ts | 10 +- .../workspace/src/lib/actions/index.ts | 18 +- .../workspace/src/lib/actions/workspace.ts | 16 +- .../src/lib/components/electron-menu.tsx | 2 - .../components/electron-workspace-name.tsx | 5 +- .../components/file-explorer-context-menu.tsx | 12 +- .../components/file-explorer-hovericons.tsx | 8 +- .../src/lib/components/file-explorer-menu.tsx | 18 +- .../src/lib/components/file-explorer.tsx | 4 - .../src/lib/components/flat-tree-drop.tsx | 2 - .../lib/components/flat-tree-item-input.tsx | 14 +- .../src/lib/components/upload-file.tsx | 4 +- .../components/workspace-hamburger-item.tsx | 14 +- .../lib/components/workspace-hamburger.tsx | 14 +- .../workspace/src/lib/contexts/index.ts | 3 +- .../src/lib/providers/FileSystemProvider.tsx | 25 +- .../workspace/src/lib/reducers/workspace.ts | 49 ++- .../workspace/src/lib/remix-ui-workspace.tsx | 290 +++++++++--------- .../src/lib/components/remix-ui-xterm.tsx | 18 +- .../lib/components/remix-ui-xterminals.tsx | 6 +- .../src/lib/components/xterm-fit-addOn.ts | 2 - 214 files changed, 1419 insertions(+), 1472 deletions(-) diff --git a/libs/remix-ui/app/src/lib/remix-app/actions/modals.ts b/libs/remix-ui/app/src/lib/remix-app/actions/modals.ts index 7e78c46cd5..4c2e70764d 100644 --- a/libs/remix-ui/app/src/lib/remix-app/actions/modals.ts +++ b/libs/remix-ui/app/src/lib/remix-app/actions/modals.ts @@ -22,7 +22,7 @@ export const enum modalActionTypes { type ModalPayload = { [modalActionTypes.setModal]: AppModal [modalActionTypes.handleHideModal]: any - [modalActionTypes.setToast]: { message: string | JSX.Element, timestamp: number } + [modalActionTypes.setToast]: { message: string | JSX.Element, timestamp: number } [modalActionTypes.handleToaster]: any, [modalActionTypes.processQueue]: any } diff --git a/libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx b/libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx index 46b7f851c2..24c8099606 100644 --- a/libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/components/dragbar/dragbar.tsx @@ -1,4 +1,4 @@ -import React, {useEffect, useState, useRef} from 'react' +import React, { useEffect, useState, useRef } from 'react' import Draggable from 'react-draggable' import './dragbar.css' @@ -77,7 +77,7 @@ const DragBar = (props: IRemixDragBarUi) => { return ( <>
- +
diff --git a/libs/remix-ui/app/src/lib/remix-app/components/modals/dialogViewPlugin.tsx b/libs/remix-ui/app/src/lib/remix-app/components/modals/dialogViewPlugin.tsx index 091795a900..d5610de56c 100644 --- a/libs/remix-ui/app/src/lib/remix-app/components/modals/dialogViewPlugin.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/components/modals/dialogViewPlugin.tsx @@ -1,13 +1,13 @@ -import React, {useContext, useEffect} from 'react' -import {AppContext} from '../../context/context' -import {useDialogDispatchers} from '../../context/provider' +import React, { useContext, useEffect } from 'react' +import { AppContext } from '../../context/context' +import { useDialogDispatchers } from '../../context/provider' const DialogViewPlugin = () => { - const {modal, alert, toast} = useDialogDispatchers() + const { modal, alert, toast } = useDialogDispatchers() const app = useContext(AppContext) useEffect(() => { - app.modal.setDispatcher({modal, alert, toast}) + app.modal.setDispatcher({ modal, alert, toast }) }, []) return <> } diff --git a/libs/remix-ui/app/src/lib/remix-app/components/modals/dialogs.tsx b/libs/remix-ui/app/src/lib/remix-app/components/modals/dialogs.tsx index 052b8661b3..da5cbd8a72 100644 --- a/libs/remix-ui/app/src/lib/remix-app/components/modals/dialogs.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/components/modals/dialogs.tsx @@ -1,11 +1,11 @@ import React from 'react' -import {useDialogDispatchers, useDialogs} from '../../context/provider' -import {Toaster} from '@remix-ui/toaster' +import { useDialogDispatchers, useDialogs } from '../../context/provider' +import { Toaster } from '@remix-ui/toaster' import ModalWrapper from './modal-wrapper' const AppDialogs = () => { - const {handleHideModal, handleToaster} = useDialogDispatchers() - const {focusModal, focusToaster} = useDialogs() + const { handleHideModal, handleToaster } = useDialogDispatchers() + const { focusModal, focusToaster } = useDialogs() return ( <> diff --git a/libs/remix-ui/app/src/lib/remix-app/components/modals/enter.tsx b/libs/remix-ui/app/src/lib/remix-app/components/modals/enter.tsx index 4b95fa1cfc..a514a1f166 100644 --- a/libs/remix-ui/app/src/lib/remix-app/components/modals/enter.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/components/modals/enter.tsx @@ -1,7 +1,7 @@ -import React, {useContext, useEffect, useState} from 'react' -import {FormattedMessage} from 'react-intl' -import {AppContext} from '../../context/context' -import {UsageTypes} from '../../types' +import React, { useContext, useEffect, useState } from 'react' +import { FormattedMessage } from 'react-intl' +import { AppContext } from '../../context/context' +import { UsageTypes } from '../../types' import { type } from 'os' interface EnterDialogProps { @@ -27,7 +27,7 @@ const EnterDialog = (props: EnterDialogProps) => {
{ + onKeyDown={({ keyCode }) => { }} >
@@ -36,14 +36,14 @@ const EnterDialog = (props: EnterDialogProps) => {
- +
- - - - + + + +
diff --git a/libs/remix-ui/app/src/lib/remix-app/components/modals/matomo.tsx b/libs/remix-ui/app/src/lib/remix-app/components/modals/matomo.tsx index daad75b4b2..bdd57d8b11 100644 --- a/libs/remix-ui/app/src/lib/remix-app/components/modals/matomo.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/components/modals/matomo.tsx @@ -1,7 +1,7 @@ -import React, {useContext, useEffect, useState} from 'react' -import {FormattedMessage} from 'react-intl' -import {AppContext} from '../../context/context' -import {useDialogDispatchers} from '../../context/provider' +import React, { useContext, useEffect, useState } from 'react' +import { FormattedMessage } from 'react-intl' +import { AppContext } from '../../context/context' +import { useDialogDispatchers } from '../../context/provider' declare global { interface Window { _paq: any @@ -15,8 +15,8 @@ interface MatomoDialogProps { } const MatomoDialog = (props: MatomoDialogProps) => { - const {settings, showMatamo, appManager} = useContext(AppContext) - const {modal} = useDialogDispatchers() + const { settings, showMatamo, appManager } = useContext(AppContext) + const { modal } = useDialogDispatchers() const [visible, setVisible] = useState(props.hide) const message = () => { diff --git a/libs/remix-ui/app/src/lib/remix-app/components/modals/modal-wrapper.tsx b/libs/remix-ui/app/src/lib/remix-app/components/modals/modal-wrapper.tsx index 07b974d3fe..d0ae6026b2 100644 --- a/libs/remix-ui/app/src/lib/remix-app/components/modals/modal-wrapper.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/components/modals/modal-wrapper.tsx @@ -1,6 +1,6 @@ -import React, {useEffect, useRef, useState} from 'react' -import {ModalDialog, ModalDialogProps, ValidationResult} from '@remix-ui/modal-dialog' -import {ModalTypes} from '../../types' +import React, { useEffect, useRef, useState } from 'react' +import { ModalDialog, ModalDialogProps, ValidationResult } from '@remix-ui/modal-dialog' +import { ModalTypes } from '../../types' interface ModalWrapperProps extends ModalDialogProps { modalType?: ModalTypes @@ -80,7 +80,7 @@ const ModalWrapper = (props: ModalWrapperProps) => { if (props.validationFn) { const validation = props.validationFn(getFormData()) setState((prevState) => { - return {...prevState, message: createForm(validation), validation} + return { ...prevState, message: createForm(validation), validation } }) } } @@ -106,7 +106,7 @@ const ModalWrapper = (props: ModalWrapperProps) => { ...props, okFn: onFinishPrompt, cancelFn: onCancelFn, - message: createModalMessage(props.defaultValue, {valid: true}) + message: createModalMessage(props.defaultValue, { valid: true }) }) break case ModalTypes.form: @@ -114,7 +114,7 @@ const ModalWrapper = (props: ModalWrapperProps) => { ...props, okFn: onFinishPrompt, cancelFn: onCancelFn, - message: createForm({valid: true}) + message: createForm({ valid: true }) }) break default: @@ -137,7 +137,7 @@ const ModalWrapper = (props: ModalWrapperProps) => { // reset the message and input if any, so when the modal is shown again it doesn't show the previous value. const handleHide = () => { setState((prevState) => { - return {...prevState, message: ''} + return { ...prevState, message: '' } }) props.handleHide() } diff --git a/libs/remix-ui/app/src/lib/remix-app/components/modals/origin-warning.tsx b/libs/remix-ui/app/src/lib/remix-app/components/modals/origin-warning.tsx index f36e5f0938..fe9e0ba234 100644 --- a/libs/remix-ui/app/src/lib/remix-app/components/modals/origin-warning.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/components/modals/origin-warning.tsx @@ -1,9 +1,9 @@ -import React, {useEffect, useState} from 'react' -import {ModalDialog} from '@remix-ui/modal-dialog' -import {useDialogDispatchers} from '../../context/provider' +import React, { useEffect, useState } from 'react' +import { ModalDialog } from '@remix-ui/modal-dialog' +import { useDialogDispatchers } from '../../context/provider' const OriginWarning = () => { - const {alert} = useDialogDispatchers() + const { alert } = useDialogDispatchers() const [content, setContent] = useState(null) useEffect(() => { @@ -29,7 +29,7 @@ const OriginWarning = () => { useEffect(() => { if (content) { - alert({id: 'warningOriging', title: null, message: content}) + alert({ id: 'warningOriging', title: null, message: content }) } }, [content]) diff --git a/libs/remix-ui/app/src/lib/remix-app/components/splashscreen.tsx b/libs/remix-ui/app/src/lib/remix-app/components/splashscreen.tsx index 4f013c4761..f110eb66b4 100644 --- a/libs/remix-ui/app/src/lib/remix-app/components/splashscreen.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/components/splashscreen.tsx @@ -4,7 +4,7 @@ const RemixSplashScreen = (props) => { return ( <> {' '} -
+
diff --git a/libs/remix-ui/app/src/lib/remix-app/context/context.tsx b/libs/remix-ui/app/src/lib/remix-app/context/context.tsx index a3cc4b7c9e..9fcf53d4a7 100644 --- a/libs/remix-ui/app/src/lib/remix-app/context/context.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/context/context.tsx @@ -1,6 +1,6 @@ import React from 'react' -import {AlertModal, AppModal} from '../interface' -import {ModalInitialState} from '../state/modals' +import { AlertModal, AppModal } from '../interface' +import { ModalInitialState } from '../state/modals' export type appProviderContextType = { settings: any, @@ -10,7 +10,7 @@ export type appProviderContextType = { modal: any } -export enum appPlatformTypes { +export enum appPlatformTypes { web = 'web', desktop = 'desktop' } diff --git a/libs/remix-ui/app/src/lib/remix-app/context/provider.tsx b/libs/remix-ui/app/src/lib/remix-app/context/provider.tsx index 54a3c1d1b4..5b64e8e5f6 100644 --- a/libs/remix-ui/app/src/lib/remix-app/context/provider.tsx +++ b/libs/remix-ui/app/src/lib/remix-app/context/provider.tsx @@ -1,11 +1,11 @@ -import React, {useReducer} from 'react' -import {useIntl, IntlShape} from 'react-intl' -import {modalActionTypes} from '../actions/modals' -import {AlertModal, AppModal} from '../interface' -import {modalReducer} from '../reducer/modals' -import {ModalInitialState} from '../state/modals' -import {ModalTypes} from '../types' -import {AppContext, dispatchModalContext, modalContext, platformContext, onLineContext} from './context' +import React, { useReducer } from 'react' +import { useIntl, IntlShape } from 'react-intl' +import { modalActionTypes } from '../actions/modals' +import { AlertModal, AppModal } from '../interface' +import { modalReducer } from '../reducer/modals' +import { ModalInitialState } from '../state/modals' +import { ModalTypes } from '../types' +import { AppContext, dispatchModalContext, modalContext, platformContext, onLineContext } from './context' declare global { interface Window { @@ -13,8 +13,8 @@ declare global { } } -export const ModalProvider = ({children = [], reducer = modalReducer, initialState = ModalInitialState} = {}) => { - const [{modals, toasters, focusModal, focusToaster}, dispatch] = useReducer(reducer, initialState) +export const ModalProvider = ({ children = [], reducer = modalReducer, initialState = ModalInitialState } = {}) => { + const [{ modals, toasters, focusModal, focusToaster }, dispatch] = useReducer(reducer, initialState) const onNextFn = async () => { dispatch({ @@ -23,7 +23,7 @@ export const ModalProvider = ({children = [], reducer = modalReducer, initialSta } const modal = (modalData: AppModal) => { - const {id, title, message, validationFn, okLabel, okFn, cancelLabel, cancelFn, modalType, defaultValue, hideFn, data} = modalData + const { id, title, message, validationFn, okLabel, okFn, cancelLabel, cancelFn, modalType, defaultValue, hideFn, data } = modalData return new Promise((resolve, reject) => { dispatch({ type: modalActionTypes.setModal, @@ -50,9 +50,9 @@ export const ModalProvider = ({children = [], reducer = modalReducer, initialSta const alert = (modalData: AlertModal) => { return modal({ id: modalData.id, - title: modalData.title || window._intl.formatMessage({id: 'remixApp.alert'}), + title: modalData.title || window._intl.formatMessage({ id: 'remixApp.alert' }), message: modalData.message || modalData.title, - okLabel: window._intl.formatMessage({id: 'remixApp.ok'}), + okLabel: window._intl.formatMessage({ id: 'remixApp.ok' }), okFn: (value?: any) => {}, cancelLabel: '', cancelFn: () => {} @@ -69,7 +69,7 @@ export const ModalProvider = ({children = [], reducer = modalReducer, initialSta const toast = (message: string | JSX.Element) => { dispatch({ type: modalActionTypes.setToast, - payload: {message, timestamp: Date.now()} + payload: { message, timestamp: Date.now() } }) } @@ -81,13 +81,13 @@ export const ModalProvider = ({children = [], reducer = modalReducer, initialSta } return ( - - {children} + + {children} ) } -export const AppProvider = ({children = [], value = {}} = null) => { +export const AppProvider = ({ children = [], value = {} } = null) => { window._intl = useIntl() return ( diff --git a/libs/remix-ui/app/src/lib/remix-app/interface/index.ts b/libs/remix-ui/app/src/lib/remix-app/interface/index.ts index eb298090ea..17afcc9e35 100644 --- a/libs/remix-ui/app/src/lib/remix-app/interface/index.ts +++ b/libs/remix-ui/app/src/lib/remix-app/interface/index.ts @@ -35,7 +35,7 @@ export interface ModalState { modals: AppModal[], toasters: {message: (string | JSX.Element), timestamp: number }[], focusModal: AppModal, - focusToaster: {message: (string | JSX.Element), timestamp: number } + focusToaster: {message: (string | JSX.Element), timestamp: number } } export interface forceChoiceModal { diff --git a/libs/remix-ui/app/src/lib/remix-app/reducer/modals.ts b/libs/remix-ui/app/src/lib/remix-app/reducer/modals.ts index 4330d967a6..4578170385 100644 --- a/libs/remix-ui/app/src/lib/remix-app/reducer/modals.ts +++ b/libs/remix-ui/app/src/lib/remix-app/reducer/modals.ts @@ -76,7 +76,7 @@ export const modalReducer = (state: ModalState = ModalInitialState, action: Moda const toaster = toasterList[0] return { ...state, toasters: toasterList, focusToaster: toaster } } else { - return { ...state, toasters: [] } + return { ...state, toasters: []} } } } diff --git a/libs/remix-ui/checkbox/src/lib/remix-ui-checkbox.tsx b/libs/remix-ui/checkbox/src/lib/remix-ui-checkbox.tsx index 5c11d96b0f..25253b0302 100644 --- a/libs/remix-ui/checkbox/src/lib/remix-ui-checkbox.tsx +++ b/libs/remix-ui/checkbox/src/lib/remix-ui-checkbox.tsx @@ -1,7 +1,7 @@ -import {CustomTooltip} from '@remix-ui/helper' +import { CustomTooltip } from '@remix-ui/helper' import React, {CSSProperties} from 'react' //eslint-disable-line import './remix-ui-checkbox.css' -import {Placement} from 'react-bootstrap/esm/Overlay' +import { Placement } from 'react-bootstrap/esm/Overlay' /* eslint-disable-next-line */ export interface RemixUiCheckboxProps { @@ -52,8 +52,8 @@ export const RemixUiCheckbox = ({ } onClick={onClick} > - -
{itemName}
: ''} {label} @@ -72,8 +72,8 @@ export const RemixUiCheckbox = ({ } onClick={onClick} > - -
-
+
This call has reverted, state changes made during the call will be reverted. - + This call will run out of gas. { }) debuggerModule.onBreakpointAdded((fileName, row) => { - if (state.debugger) state.debugger.breakPointManager.add({fileName: fileName, row: row}) + if (state.debugger) state.debugger.breakPointManager.add({ fileName: fileName, row: row }) }) debuggerModule.onEditorContentChanged(() => { @@ -107,7 +107,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => { debuggerModule.onEnvChanged((provider) => { setState((prevState) => { const isLocalNodeUsed = !provider.startsWith('vm') && !provider.startsWith('injected') - return {...prevState, isLocalNodeUsed: isLocalNodeUsed} + return { ...prevState, isLocalNodeUsed: isLocalNodeUsed } }) }) } @@ -121,7 +121,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => { debuggerInstance.event.register('debuggerStatus', async (isActive) => { await debuggerModule.discardHighlight() setState((prevState) => { - return {...prevState, isActive} + return { ...prevState, isActive } }) }) @@ -129,14 +129,14 @@ export const DebuggerUI = (props: DebuggerUIProps) => { setState((prevState) => { return { ...prevState, - sourceLocationStatus: intl.formatMessage({id: 'debugger.sourceLocationStatus1'}) + sourceLocationStatus: intl.formatMessage({ id: 'debugger.sourceLocationStatus1' }) } }) }) debuggerInstance.event.register('noBreakpointHit', async (isActive) => { setState((prevState) => { - return {...prevState, sourceLocationStatus: ''} + return { ...prevState, sourceLocationStatus: '' } }) }) @@ -146,7 +146,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => { setState((prevState) => { return { ...prevState, - sourceLocationStatus: intl.formatMessage({id: 'debugger.sourceLocationStatus2'}) + sourceLocationStatus: intl.formatMessage({ id: 'debugger.sourceLocationStatus2' }) } }) return @@ -175,7 +175,7 @@ export const DebuggerUI = (props: DebuggerUIProps) => { } if (path) { setState((prevState) => { - return {...prevState, sourceLocationStatus: ''} + return { ...prevState, sourceLocationStatus: '' } }) await debuggerModule.discardHighlight() await debuggerModule.highlight(lineColumnPos, path, rawLocation, stepDetail, lineGasCost) @@ -381,11 +381,11 @@ export const DebuggerUI = (props: DebuggerUIProps) => { { + onChange={({ target: { checked } }) => { setState((prevState) => { return { ...prevState, - opt: {...prevState.opt, debugWithGeneratedSources: checked} + opt: { ...prevState.opt, debugWithGeneratedSources: checked } } }) }} @@ -413,11 +413,11 @@ export const DebuggerUI = (props: DebuggerUIProps) => { { + onChange={({ target: { checked } }) => { setState((prevState) => { return { ...prevState, - opt: {...prevState.opt, debugWithLocalNode: checked} + opt: { ...prevState.opt, debugWithLocalNode: checked } } }) }} diff --git a/libs/remix-ui/debugger-ui/src/lib/slider/slider.tsx b/libs/remix-ui/debugger-ui/src/lib/slider/slider.tsx index 517bbfe87a..7610531373 100644 --- a/libs/remix-ui/debugger-ui/src/lib/slider/slider.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/slider/slider.tsx @@ -1,6 +1,6 @@ import React, {useState, useEffect, useRef} from 'react' // eslint-disable-line -export const Slider = ({jumpTo, sliderValue, traceLength}) => { +export const Slider = ({ jumpTo, sliderValue, traceLength }) => { const onChangeId = useRef(null) const slider = useRef(null) diff --git a/libs/remix-ui/debugger-ui/src/lib/step-manager/step-manager.tsx b/libs/remix-ui/debugger-ui/src/lib/step-manager/step-manager.tsx index 1fc85769cc..7b9ddfc84c 100644 --- a/libs/remix-ui/debugger-ui/src/lib/step-manager/step-manager.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/step-manager/step-manager.tsx @@ -31,16 +31,16 @@ export const StepManager = ({ const setRevertWarning = (warning) => { setState((prevState) => { - return {...prevState, revertWarning: warning} + return { ...prevState, revertWarning: warning } }) } const updateStep = (step, stepState, jumpOutDisabled) => { setState((prevState) => { - return {...prevState, sliderValue: step, stepState, jumpOutDisabled} + return { ...prevState, sliderValue: step, stepState, jumpOutDisabled } }) } - const {sliderValue, revertWarning, stepState, jumpOutDisabled} = state + const { sliderValue, revertWarning, stepState, jumpOutDisabled } = state return (
diff --git a/libs/remix-ui/debugger-ui/src/lib/tx-browser/tx-browser.tsx b/libs/remix-ui/debugger-ui/src/lib/tx-browser/tx-browser.tsx index 2e07121534..e5c4a534dd 100644 --- a/libs/remix-ui/debugger-ui/src/lib/tx-browser/tx-browser.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/tx-browser/tx-browser.tsx @@ -1,9 +1,9 @@ -import {CustomTooltip, isValidHash} from '@remix-ui/helper' +import { CustomTooltip, isValidHash } from '@remix-ui/helper' import React, {useState, useEffect, useRef} from 'react' //eslint-disable-line -import {useIntl, FormattedMessage} from 'react-intl' +import { useIntl, FormattedMessage } from 'react-intl' import './tx-browser.css' -export const TxBrowser = ({requestDebug, updateTxNumberFlag, unloadRequested, transactionNumber, debugging}) => { +export const TxBrowser = ({ requestDebug, updateTxNumberFlag, unloadRequested, transactionNumber, debugging }) => { const [state, setState] = useState({ txNumber: '', isTxNumberValid: false @@ -63,7 +63,7 @@ export const TxBrowser = ({requestDebug, updateTxNumberFlag, unloadRequested, tr onClick={handleSubmit} data-id="debuggerTransactionStartButton" disabled={!state.txNumber || !state.isTxNumberValid} - style={{pointerEvents: 'none', color: 'white'}} + style={{ pointerEvents: 'none', color: 'white' }} > @@ -81,9 +81,9 @@ export const TxBrowser = ({requestDebug, updateTxNumberFlag, unloadRequested, tr className="form-control m-0 txinput" id="txinput" type="text" - onChange={({target: {value}}) => txInputChanged(value)} + onChange={({ target: { value } }) => txInputChanged(value)} onInput={txInputOnInput} - placeholder={intl.formatMessage({id: 'debugger.placeholder'})} + placeholder={intl.formatMessage({ id: 'debugger.placeholder' })} data-id="debuggerTransactionInput" disabled={debugging} /> diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/assembly-items.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/assembly-items.tsx index 96c194e93f..2330257708 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/assembly-items.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/assembly-items.tsx @@ -1,9 +1,9 @@ import React, {useState, useRef, useEffect, useReducer} from 'react' // eslint-disable-line -import {FormattedMessage} from 'react-intl' -import {initialState, reducer} from '../../reducers/assembly-items' +import { FormattedMessage } from 'react-intl' +import { initialState, reducer } from '../../reducers/assembly-items' import './styles/assembly-items.css' -export const AssemblyItems = ({registerEvent}) => { +export const AssemblyItems = ({ registerEvent }) => { const [assemblyItems, dispatch] = useReducer(reducer, initialState) const [absoluteSelectedIndex, setAbsoluteSelectedIndex] = useState(0) const [selectedItem, setSelectedItem] = useState(0) @@ -34,7 +34,7 @@ export const AssemblyItems = ({registerEvent}) => { registerEvent('lineGasCostChanged', (instructionsIndexes: number[], line: []) => { dispatch({ type: 'FETCH_INDEXES_FOR_NEW_LINE', - payload: {currentLineIndexes: instructionsIndexes || [], line} + payload: { currentLineIndexes: instructionsIndexes || [], line } }) }) }, []) diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/calldata-panel.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/calldata-panel.tsx index a7b01c5cc5..71c29247bc 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/calldata-panel.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/calldata-panel.tsx @@ -1,7 +1,7 @@ import React from 'react' // eslint-disable-line import DropdownPanel from './dropdown-panel' // eslint-disable-line -export const CalldataPanel = ({calldata, className = ''}) => { +export const CalldataPanel = ({ calldata, className = '' }) => { return (
diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/callstack-panel.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/callstack-panel.tsx index 1636fdf67d..3554c1f9b2 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/callstack-panel.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/callstack-panel.tsx @@ -1,7 +1,7 @@ import React from 'react' // eslint-disable-line import DropdownPanel from './dropdown-panel' // eslint-disable-line -export const CallstackPanel = ({calldata, className}) => { +export const CallstackPanel = ({ calldata, className }) => { return (
diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/code-list-view.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/code-list-view.tsx index da2b6b0b7d..12e891061e 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/code-list-view.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/code-list-view.tsx @@ -1,7 +1,7 @@ import React, {useState, useEffect} from 'react' // eslint-disable-line import AssemblyItems from './assembly-items' // eslint-disable-line -export const CodeListView = ({registerEvent, className = ''}) => { +export const CodeListView = ({ registerEvent, className = '' }) => { return (
diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/dropdown-panel.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/dropdown-panel.tsx index 55174aee9b..bdcce84a11 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/dropdown-panel.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/dropdown-panel.tsx @@ -1,10 +1,10 @@ import React, {useState, useEffect, useReducer} from 'react' // eslint-disable-line -import {useIntl} from 'react-intl' +import { useIntl } from 'react-intl' import {TreeView, TreeViewItem} from '@remix-ui/tree-view' // eslint-disable-line import {DropdownPanelProps, ExtractData, ExtractFunc} from '../../types' // eslint-disable-line import {CopyToClipboard} from '@remix-ui/clipboard' // eslint-disable-line -import {initialState, reducer} from '../../reducers/calldata' -import {isBigInt} from 'web3-validator' +import { initialState, reducer } from '../../reducers/calldata' +import { isBigInt } from 'web3-validator' import './styles/dropdown-panel.css' export const DropdownPanel = (props: DropdownPanelProps) => { @@ -34,14 +34,14 @@ export const DropdownPanel = (props: DropdownPanelProps) => { if (item instanceof Array) { ret.children = item.map((item, index) => { - return {key: index, value: item} + return { key: index, value: item } }) ret.self = 'Array' ret.isNode = true ret.isLeaf = false } else if (item instanceof Object) { ret.children = Object.keys(item).map((key) => { - return {key: key, value: item[key]} + return { key: key, value: item[key] } }) ret.self = 'Object' ret.isNode = true @@ -90,7 +90,7 @@ export const DropdownPanel = (props: DropdownPanelProps) => { header: '', toggleDropdown: true, message: { - innerText: intl.formatMessage({id: 'debugger.noDataAvailable'}), + innerText: intl.formatMessage({ id: 'debugger.noDataAvailable' }), display: 'block' }, dropdownContent: { @@ -110,12 +110,12 @@ export const DropdownPanel = (props: DropdownPanelProps) => { useEffect(() => { registerEvent && registerEvent(loadMoreCompletedEvent, (updatedCalldata) => { - dispatch({type: 'UPDATE_CALLDATA_SUCCESS', payload: updatedCalldata}) + dispatch({ type: 'UPDATE_CALLDATA_SUCCESS', payload: updatedCalldata }) }) }, []) useEffect(() => { - dispatch({type: 'FETCH_CALLDATA_SUCCESS', payload: calldata}) + dispatch({ type: 'FETCH_CALLDATA_SUCCESS', payload: calldata }) }, [calldata]) useEffect(() => { @@ -199,7 +199,7 @@ export const DropdownPanel = (props: DropdownPanelProps) => { // replace 0xNaN with 0x0 copiableContent, message: { - innerText: isEmpty ? intl.formatMessage({id: 'debugger.noDataAvailable'}) : '', + innerText: isEmpty ? intl.formatMessage({ id: 'debugger.noDataAvailable' }) : '', display: isEmpty ? 'block' : 'none' }, updating: false, @@ -232,7 +232,7 @@ export const DropdownPanel = (props: DropdownPanelProps) => { id={'treeViewLoadMore'} data-id={'treeViewLoadMore'} className="cursor_pointer" - label={intl.formatMessage({id: 'debugger.loadMore'})} + label={intl.formatMessage({ id: 'debugger.loadMore' })} onClick={() => { triggerEvent(loadMoreEvent, [data.cursor]) }} @@ -267,17 +267,17 @@ export const DropdownPanel = (props: DropdownPanelProps) => { {header} - +
-
- -
+
+ +
{state.data && {Object.keys(state.data).map((innerkey) => renderData(state.data[innerkey], state.data, innerkey, innerkey))}}
-
+
{state.message.innerText}
diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/full-storages-changes.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/full-storages-changes.tsx index 46ef22dbbd..b053d932be 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/full-storages-changes.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/full-storages-changes.tsx @@ -1,7 +1,7 @@ import React from 'react' // eslint-disable-line import {DropdownPanel} from './dropdown-panel' // eslint-disable-line -export const FullStoragesChanges = ({calldata, className = ''}) => { +export const FullStoragesChanges = ({ calldata, className = '' }) => { return (
diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/function-panel.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/function-panel.tsx index d2106977ed..9c76bd1649 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/function-panel.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/function-panel.tsx @@ -2,7 +2,7 @@ import React, {useState, useEffect} from 'react' // eslint-disable-line import DropdownPanel from './dropdown-panel' // eslint-disable-line import {default as deepequal} from 'deep-equal' // eslint-disable-line -export const FunctionPanel = ({data, className, stepManager}) => { +export const FunctionPanel = ({ data, className, stepManager }) => { const [functionData, setFunctionData] = useState(null) useEffect(() => { @@ -24,7 +24,7 @@ export const FunctionPanel = ({data, className, stepManager}) => { } return ( - +
diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/global-variables.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/global-variables.tsx index a649cc73b3..33d9e6c1f8 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/global-variables.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/global-variables.tsx @@ -2,7 +2,7 @@ import React from 'react' // eslint-disable-line import DropdownPanel from './dropdown-panel' // eslint-disable-line import {toBigInt} from 'web3-utils' // eslint-disable-line -export const GlobalVariables = ({block, receipt, tx, className}) => { +export const GlobalVariables = ({ block, receipt, tx, className }) => { // see https://docs.soliditylang.org/en/latest/units-and-global-variables.html#block-and-transaction-properties const globals = { 'block.chainid': tx && tx.chainId, @@ -22,7 +22,7 @@ export const GlobalVariables = ({block, receipt, tx, className}) => { return (
- +
) } diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/memory-panel.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/memory-panel.tsx index b92df380ed..7fcb07766f 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/memory-panel.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/memory-panel.tsx @@ -1,10 +1,10 @@ import React from 'react' // eslint-disable-line import DropdownPanel from './dropdown-panel' // eslint-disable-line -export const MemoryPanel = ({calldata, className}) => { +export const MemoryPanel = ({ calldata, className }) => { return (
- +
) } diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/solidity-locals.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/solidity-locals.tsx index d2864200a3..e5abd074c0 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/solidity-locals.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/solidity-locals.tsx @@ -3,7 +3,7 @@ import DropdownPanel from './dropdown-panel' // eslint-disable-line import {extractData} from '../../utils/solidityTypeFormatter' // eslint-disable-line import {ExtractData} from '../../types' // eslint-disable-line -export const SolidityLocals = ({data, message, registerEvent, triggerEvent, className = ''}) => { +export const SolidityLocals = ({ data, message, registerEvent, triggerEvent, className = '' }) => { const [calldata, setCalldata] = useState(null) useEffect(() => { @@ -34,10 +34,10 @@ export const SolidityLocals = ({data, message, registerEvent, triggerEvent, clas }} > {' ' + key}: - ) } diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/solidity-state.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/solidity-state.tsx index 0032208953..0b19a5e256 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/solidity-state.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/solidity-state.tsx @@ -1,9 +1,9 @@ import React from 'react' // eslint-disable-line import DropdownPanel from './dropdown-panel' // eslint-disable-line -import {extractData} from '../../utils/solidityTypeFormatter' +import { extractData } from '../../utils/solidityTypeFormatter' import {ExtractData} from '../../types' // eslint-disable-line -export const SolidityState = ({calldata, message, className}) => { +export const SolidityState = ({ calldata, message, className }) => { const formatSelf = (key: string, data: ExtractData) => { try { let color = 'var(--primary)' @@ -26,10 +26,10 @@ export const SolidityState = ({calldata, message, className}) => { }} > {' ' + key}: - ) } catch (e) { diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/stack-panel.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/stack-panel.tsx index 12dcf502cc..8a4db54de1 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/stack-panel.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/stack-panel.tsx @@ -1,10 +1,10 @@ import React from 'react' // eslint-disable-line import DropdownPanel from './dropdown-panel' // eslint-disable-line -export const StackPanel = ({calldata, className}) => { +export const StackPanel = ({ calldata, className }) => { return (
- +
) } diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/step-detail.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/step-detail.tsx index e64bad1005..ba38925d18 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/step-detail.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/step-detail.tsx @@ -1,7 +1,7 @@ import React from 'react' // eslint-disable-line import DropdownPanel from './dropdown-panel' // eslint-disable-line -export const StepDetail = ({stepDetail, className = ''}) => { +export const StepDetail = ({ stepDetail, className = '' }) => { return (
diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/storage-panel.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/storage-panel.tsx index 7514ab633f..06009a4dfc 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/storage-panel.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/storage-panel.tsx @@ -1,7 +1,7 @@ import React from 'react' // eslint-disable-line import DropdownPanel from './dropdown-panel' // eslint-disable-line -export const StoragePanel = ({calldata, header, className}) => { +export const StoragePanel = ({ calldata, header, className }) => { return (
diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/vm-debugger-head.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/vm-debugger-head.tsx index 035d5f619a..a2ef485944 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/vm-debugger-head.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/vm-debugger-head.tsx @@ -5,7 +5,7 @@ import StepDetail from './step-detail' // eslint-disable-line import SolidityState from './solidity-state' // eslint-disable-line import SolidityLocals from './solidity-locals' // eslint-disable-line -export const VmDebuggerHead = ({vmDebugger: {registerEvent, triggerEvent}, debugging, stepManager}) => { +export const VmDebuggerHead = ({ vmDebugger: { registerEvent, triggerEvent }, debugging, stepManager }) => { const [functionPanel, setFunctionPanel] = useState(null) const [stepDetail, setStepDetail] = useState({ 'vm trace step': '-', @@ -69,73 +69,73 @@ export const VmDebuggerHead = ({vmDebugger: {registerEvent, triggerEvent}, debug registerEvent && registerEvent('traceCurrentStepUpdate', (error, step) => { setStepDetail((prevState) => { - return {...prevState, 'execution step': error ? '-' : step} + return { ...prevState, 'execution step': error ? '-' : step } }) }) registerEvent && registerEvent('traceMemExpandUpdate', (error, addmem) => { setStepDetail((prevState) => { - return {...prevState, 'add memory': error ? '-' : addmem} + return { ...prevState, 'add memory': error ? '-' : addmem } }) }) registerEvent && registerEvent('traceStepCostUpdate', (error, gas) => { setStepDetail((prevState) => { - return {...prevState, gas: error ? '-' : gas} + return { ...prevState, gas: error ? '-' : gas } }) }) registerEvent && registerEvent('traceCurrentCalledAddressAtUpdate', (error, address) => { setStepDetail((prevState) => { - return {...prevState, 'loaded address': error ? '-' : address} + return { ...prevState, 'loaded address': error ? '-' : address } }) }) registerEvent && registerEvent('traceRemainingGasUpdate', (error, remainingGas) => { setStepDetail((prevState) => { - return {...prevState, 'remaining gas': error ? '-' : remainingGas} + return { ...prevState, 'remaining gas': error ? '-' : remainingGas } }) }) registerEvent && registerEvent('indexUpdate', (index) => { setStepDetail((prevState) => { - return {...prevState, 'vm trace step': index} + return { ...prevState, 'vm trace step': index } }) }) registerEvent && registerEvent('solidityState', (calldata) => { setSolidityState(() => { - return {...solidityState, calldata} + return { ...solidityState, calldata } }) }) registerEvent && registerEvent('solidityStateMessage', (message) => { setSolidityState(() => { - return {...solidityState, message} + return { ...solidityState, message } }) }) registerEvent && registerEvent('solidityLocals', (calldata) => { setSolidityLocals(() => { - return {...solidityLocals, calldata} + return { ...solidityLocals, calldata } }) }) registerEvent && registerEvent('solidityLocalsMessage', (message) => { setSolidityLocals(() => { - return {...solidityLocals, message} + return { ...solidityLocals, message } }) }) }, [debugging]) return (
-
+
-
+
diff --git a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/vm-debugger.tsx b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/vm-debugger.tsx index 3231e18bcb..442c692ae3 100644 --- a/libs/remix-ui/debugger-ui/src/lib/vm-debugger/vm-debugger.tsx +++ b/libs/remix-ui/debugger-ui/src/lib/vm-debugger/vm-debugger.tsx @@ -8,7 +8,7 @@ import ReturnValuesPanel from './dropdown-panel' // eslint-disable-line import FullStoragesChangesPanel from './full-storages-changes' // eslint-disable-line import GlobalVariables from './global-variables' // eslint-disable-line -export const VmDebugger = ({vmDebugger: {registerEvent}, currentBlock, currentReceipt, currentTransaction, debugging}) => { +export const VmDebugger = ({ vmDebugger: { registerEvent }, currentBlock, currentReceipt, currentTransaction, debugging }) => { const [calldataPanel, setCalldataPanel] = useState(null) const [memoryPanel, setMemoryPanel] = useState(null) const [callStackPanel, setCallStackPanel] = useState(null) @@ -40,7 +40,7 @@ export const VmDebugger = ({vmDebugger: {registerEvent}, currentBlock, currentRe registerEvent && registerEvent('traceManagerStorageUpdate', (calldata, header) => { setStoragePanel(() => { - return {calldata, header} + return { calldata, header } }) }) registerEvent && diff --git a/libs/remix-ui/drag-n-drop/src/lib/drag-n-drop.tsx b/libs/remix-ui/drag-n-drop/src/lib/drag-n-drop.tsx index 5549a5ef33..d03a3ac8b2 100644 --- a/libs/remix-ui/drag-n-drop/src/lib/drag-n-drop.tsx +++ b/libs/remix-ui/drag-n-drop/src/lib/drag-n-drop.tsx @@ -1,7 +1,7 @@ -import {extractParentFromKey} from '@remix-ui/helper' -import React, {useContext, useRef, useState} from 'react' -import {MoveContext} from './context/moveContext' -import {DraggableType, DragType} from './types' +import { extractParentFromKey } from '@remix-ui/helper' +import React, { useContext, useRef, useState } from 'react' +import { MoveContext } from './context/moveContext' +import { DraggableType, DragType } from './types' export const Drag = (props: DragType) => { const [dragged, setDragged] = useState<{path: string; isDirectory: boolean}>({} as {path: string; isDirectory: boolean}) @@ -56,7 +56,7 @@ export const Draggable = (props: DraggableType) => { const handleDragover = (event: React.DragEvent) => { //Checks if the folder is opened event.preventDefault() - if (destination.isDirectory && !props.expandedPath.includes(destination.path) && folderToOpen !== destination.path && props.handleClickFolder) { + if (destination.isDirectory && !props.expandedPath.includes(destination.path) && folderToOpen !== destination.path && props.handleClickFolder) { setFolderToOpen(destination.path) timer && clearTimeout(timer) setTimer( diff --git a/libs/remix-ui/editor/src/lib/actions/editor.ts b/libs/remix-ui/editor/src/lib/actions/editor.ts index f6d82dc757..d533823af1 100644 --- a/libs/remix-ui/editor/src/lib/actions/editor.ts +++ b/libs/remix-ui/editor/src/lib/actions/editor.ts @@ -87,7 +87,7 @@ export const reducerActions = (models = initialState, action: Action) => { const size = action.payload.size if (size === 1) { editor.trigger('keyboard', 'editor.action.fontZoomIn', {}); - } else{ + } else { editor.trigger('keyboard', 'editor.action.fontZoomOut', {}); } return models diff --git a/libs/remix-ui/editor/src/lib/hardhat-ethers-extension.ts b/libs/remix-ui/editor/src/lib/hardhat-ethers-extension.ts index 13cfaf0066..0dd3974406 100644 --- a/libs/remix-ui/editor/src/lib/hardhat-ethers-extension.ts +++ b/libs/remix-ui/editor/src/lib/hardhat-ethers-extension.ts @@ -1,4 +1,4 @@ -export const hardhatEthersExtension = +export const hardhatEthersExtension = ` interface Libraries { [libraryName: string]: string; diff --git a/libs/remix-ui/editor/src/lib/providers/codeActionProvider.ts b/libs/remix-ui/editor/src/lib/providers/codeActionProvider.ts index 9670282e9f..3596ce6f16 100644 --- a/libs/remix-ui/editor/src/lib/providers/codeActionProvider.ts +++ b/libs/remix-ui/editor/src/lib/providers/codeActionProvider.ts @@ -1,7 +1,7 @@ -import {Monaco} from '@monaco-editor/react' +import { Monaco } from '@monaco-editor/react' import monaco from '../../types/monaco' -import {EditorUIProps} from '../remix-ui-editor' -import {default as fixesList} from './quickfixes' +import { EditorUIProps } from '../remix-ui-editor' +import { default as fixesList } from './quickfixes' export class RemixCodeActionProvider implements monaco.languages.CodeActionProvider { props: EditorUIProps @@ -75,7 +75,7 @@ export class RemixCodeActionProvider implements monaco.languages.CodeActionProvi case 9.1: case 9.2: case 10.1: - case 10.2: + case 10.2: case 10.3: case 11.1: case 11.2: { @@ -115,7 +115,7 @@ export class RemixCodeActionProvider implements monaco.languages.CodeActionProvi * @param fix details of quick fix to apply */ addQuickFix(actions: monaco.languages.CodeAction[], error: monaco.editor.IMarkerData, uri: monaco.Uri, fix: Record) { - const {id, title, range, text} = fix + const { id, title, range, text } = fix actions.push({ title, diagnostics: [error], @@ -124,7 +124,7 @@ export class RemixCodeActionProvider implements monaco.languages.CodeActionProvi edits: [ { resource: uri, - textEdit: {range, text}, + textEdit: { range, text }, versionId: undefined } ] diff --git a/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts b/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts index 1b89b72af7..cd8fc48e67 100644 --- a/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts +++ b/libs/remix-ui/editor/src/lib/providers/completion/completionGlobals.ts @@ -33,7 +33,6 @@ export function getBytesCompletionItems(range: monacoTypes.IRange, monaco): mona ] } - export function getBlockCompletionItems(range: monacoTypes.IRange, monaco): monacoTypes.languages.CompletionItem[] { return [ { @@ -442,7 +441,6 @@ export function getAbiCompletionItems(range: monacoTypes.IRange, monaco): monaco ]; } - export function GetCompletionTypes(range: monacoTypes.IRange, monaco): monacoTypes.languages.CompletionItem[] { const completionItems = []; const types = ['address', 'string', 'bytes', 'byte', 'int', 'uint', 'bool', 'hash']; @@ -510,7 +508,6 @@ export function GetCompletionKeywords(range: monacoTypes.IRange, monaco): monaco return completionItems; } - export function GeCompletionUnits(range: monacoTypes.IRange, monaco): monacoTypes.languages.CompletionItem[] { const completionItems = []; const etherUnits = ['wei', 'gwei', 'finney', 'szabo', 'ether']; @@ -557,7 +554,6 @@ export function GetImports(range: monacoTypes.IRange } })] - list = [...list, ...data.files .filter((item) => item.startsWith(word)) diff --git a/libs/remix-ui/editor/src/lib/providers/completionProvider.ts b/libs/remix-ui/editor/src/lib/providers/completionProvider.ts index d375748413..66fbe8a10e 100644 --- a/libs/remix-ui/editor/src/lib/providers/completionProvider.ts +++ b/libs/remix-ui/editor/src/lib/providers/completionProvider.ts @@ -158,7 +158,6 @@ export class RemixCompletionProvider implements monacoTypes.languages.Completion return variableDeclaration } - for (const node of Object.values(filteredNodes) as any[]) { if (!node.name) continue if (node.nodeType === 'VariableDeclaration') { @@ -282,7 +281,7 @@ export class RemixCompletionProvider implements monacoTypes.languages.Completion } else { // we use the block info from the nodesAtPosition const contractNodes = fileNodes.contracts[node.name].contractNodes for (const contractNode of Object.values(contractNodes)) { - if((contractNode as any).nodeType === 'Block'){ + if ((contractNode as any).nodeType === 'Block'){ const nodeOfScope = await this.props.plugin.call('codeParser', 'getNodesWithScope', (contractNode as any).id) nodes = [...nodes, ...nodeOfScope] } @@ -348,7 +347,6 @@ export class RemixCompletionProvider implements monacoTypes.languages.Completion }) } - for (const nodeOfScope of contractCompletions) { if (nodeOfScope.name === nameOfLastTypedExpression) { if (nodeOfScope.typeName && nodeOfScope.typeName.nodeType === 'UserDefinedTypeName') { @@ -373,8 +371,6 @@ export class RemixCompletionProvider implements monacoTypes.languages.Completion } - - return { nodes, suggestions } } @@ -392,9 +388,9 @@ export class RemixCompletionProvider implements monacoTypes.languages.Completion } /** - * - * @param lineTextBeforeCursor - * @returns + * + * @param lineTextBeforeCursor + * @returns */ private async getLastNodeInExpression(lineTextBeforeCursor: string) { diff --git a/libs/remix-ui/editor/src/lib/providers/definitionProvider.ts b/libs/remix-ui/editor/src/lib/providers/definitionProvider.ts index 247a215eab..d74a5a0750 100644 --- a/libs/remix-ui/editor/src/lib/providers/definitionProvider.ts +++ b/libs/remix-ui/editor/src/lib/providers/definitionProvider.ts @@ -77,7 +77,7 @@ export class RemixDefinitionProvider implements monaco.languages.DefinitionProvi return pos } } - const lastCompilationResult = await this.props.plugin.call('codeParser', 'getLastCompilationResult') // await this.props.plugin.call('compilerArtefacts', 'getLastCompilationResult') + const lastCompilationResult = await this.props.plugin.call('codeParser', 'getLastCompilationResult') // await this.props.plugin.call('compilerArtefacts', 'getLastCompilationResult') if (lastCompilationResult && lastCompilationResult.languageversion.indexOf('soljson') === 0 && lastCompilationResult.data) { const lineColumn = await this.props.plugin.call('codeParser', 'getLineColumnOfPosition', position) diff --git a/libs/remix-ui/editor/src/lib/providers/hoverProvider.ts b/libs/remix-ui/editor/src/lib/providers/hoverProvider.ts index 035eca6f4f..60523bdeac 100644 --- a/libs/remix-ui/editor/src/lib/providers/hoverProvider.ts +++ b/libs/remix-ui/editor/src/lib/providers/hoverProvider.ts @@ -46,7 +46,6 @@ export class RemixHoverProvider implements monacoTypes.languages.HoverProvider { return await this.props.plugin.call('codeParser', 'getVariableDeclaration', node) } - const getParamaters = async (node: any) => { return await this.props.plugin.call('codeParser', 'getFunctionParamaters', node) } @@ -55,7 +54,6 @@ export class RemixHoverProvider implements monacoTypes.languages.HoverProvider { return await this.props.plugin.call('codeParser', 'getFunctionReturnParameters', node) } - const getOverrides = async (node: any) => { if (node.overrides) { const overrides = [] @@ -179,7 +177,7 @@ export class RemixHoverProvider implements monacoTypes.languages.HoverProvider { try { const decodedVar = await this.props.plugin.call('debugger', 'decodeStateVariable', nodeAtPosition.id) - if (decodedVar !== null && decodedVar.type) { + if (decodedVar !== null && decodedVar.type) { contents.push({ value: `STATE VARIABLE ${nodeAtPosition.name}: ${typeof(decodedVar.value) === 'string' ? decodedVar.value : JSON.stringify(decodedVar.value, null, '\t')}` }) diff --git a/libs/remix-ui/editor/src/lib/providers/inlineCompletionProvider.ts b/libs/remix-ui/editor/src/lib/providers/inlineCompletionProvider.ts index 601a5513e3..92c79914b5 100644 --- a/libs/remix-ui/editor/src/lib/providers/inlineCompletionProvider.ts +++ b/libs/remix-ui/editor/src/lib/providers/inlineCompletionProvider.ts @@ -2,7 +2,7 @@ import { EditorUIProps, monacoTypes } from '@remix-ui/editor'; import { CompletionTimer } from './completionTimer'; -import axios, {AxiosResponse} from 'axios' +import axios, { AxiosResponse } from 'axios' import { slice } from 'lodash'; const _paq = (window._paq = window._paq || []) @@ -20,7 +20,6 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli this.completionEnabled = true } - async provideInlineCompletions(model: monacoTypes.editor.ITextModel, position: monacoTypes.Position, context: monacoTypes.languages.InlineCompletionContext, token: monacoTypes.CancellationToken): Promise> { if (context.selectedSuggestionInfo) { return; @@ -28,7 +27,7 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli const getTextAtLine = (lineNumber) => { const lineRange = model.getFullModelRange().setStartPosition(lineNumber, 1).setEndPosition(lineNumber + 1, 1); return model.getValueInRange(lineRange); - } + } // get text before the position of the completion const word = model.getValueInRange({ startLineNumber: 1, @@ -46,13 +45,13 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli }); if (!word.endsWith(' ') && - !word.endsWith('.') && + !word.endsWith('.') && !word.endsWith('(')) { return; } try { - const isActivate = await await this.props.plugin.call('settings', 'get', 'settings/copilot/suggest/activate') + const isActivate = await await this.props.plugin.call('settings', 'get', 'settings/copilot/suggest/activate') if (!isActivate) return } catch (err) { return; @@ -63,8 +62,8 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli if (split.length < 2) return const ask = split[split.length - 2].trimStart() if (split[split.length - 1].trim() === '' && ask.startsWith('///')) { - // use the code generation model, only take max 1000 word as context - this.props.plugin.call('terminal', 'log', {type: 'aitypewriterwarning', value: 'Solcoder - generating code for following comment: ' + ask.replace('///', '')}) + // use the code generation model, only take max 1000 word as context + this.props.plugin.call('terminal', 'log', { type: 'aitypewriterwarning', value: 'Solcoder - generating code for following comment: ' + ask.replace('///', '') }) const data = await this.props.plugin.call('solcoder', 'code_generation', word) _paq.push(['trackEvent', 'ai', 'solcoder', 'code_generation']) @@ -81,17 +80,17 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli } catch (e) { console.error(e) return - } + } - if (word.split('\n').at(-1).trimStart().startsWith('//') || + if (word.split('\n').at(-1).trimStart().startsWith('//') || word.split('\n').at(-1).trimStart().startsWith('/*') || word.split('\n').at(-1).trimStart().startsWith('*') || word.split('\n').at(-1).trimStart().startsWith('*/') || - word.split('\n').at(-1).endsWith(';') + word.split('\n').at(-1).endsWith(';') ){ return; // do not do completion on single and multiline comment } - + // abort if there is a signal if (token.isCancellationRequested) { return @@ -104,10 +103,10 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli if (word.replace(/ +$/, '').endsWith('\n')){ // Code insertion - try{ + try { const output = await this.props.plugin.call('solcoder', 'code_insertion', word, word_after) _paq.push(['trackEvent', 'ai', 'solcoder', 'code_insertion']) - const generatedText = output[0] // no need to clean it. should already be + const generatedText = output[0] // no need to clean it. should already be const item: monacoTypes.languages.InlineCompletion = { insertText: generatedText @@ -166,7 +165,7 @@ export class RemixInLineCompletionProvider implements monacoTypes.languages.Inli if (clean.startsWith('//') || clean.startsWith('/*') || clean.startsWith('*') || clean.startsWith('*/')){ return "" } - // remove comment inline + // remove comment inline clean = clean.split('//')[0].trimEnd() return clean } diff --git a/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx b/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx index 16bd12b1cf..b43b97fe6d 100644 --- a/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx +++ b/libs/remix-ui/editor/src/lib/remix-ui-editor.tsx @@ -152,16 +152,16 @@ export const EditorUI = (props: EditorUIProps) => { \t\t\t\t\t\t\t| |_) | | _| | |\\/| | | | \\ / | | | | | | | _| \t\t\t\t\t\t\t| _ < | |___ | | | | | | / \\ | | | |_| | | |___ \t\t\t\t\t\t\t|_| \\_\\ |_____| |_| |_| |___| /_/\\_\\ |___| |____/ |_____|\n\n - \t\t\t\t\t\t\t${intl.formatMessage({id: 'editor.keyboardShortcuts'})}:\n - \t\t\t\t\t\t\t\tCTRL + S: ${intl.formatMessage({id: 'editor.keyboardShortcuts.text1'})}\n - \t\t\t\t\t\t\t\tCTRL + Shift + F : ${intl.formatMessage({id: 'editor.keyboardShortcuts.text2'})}\n - \t\t\t\t\t\t\t\tCTRL + Shift + A : ${intl.formatMessage({id: 'editor.keyboardShortcuts.text3'})}\n - \t\t\t\t\t\t\t\tCTRL + SHIFT + S: ${intl.formatMessage({id: 'editor.keyboardShortcuts.text4'})}\n - \t\t\t\t\t\t\t${intl.formatMessage({id: 'editor.editorKeyboardShortcuts'})}:\n - \t\t\t\t\t\t\t\tCTRL + Alt + F : ${intl.formatMessage({id: 'editor.editorKeyboardShortcuts.text1'})}\n - \t\t\t\t\t\t\t${intl.formatMessage({id: 'editor.importantLinks'})}:\n - \t\t\t\t\t\t\t\t${intl.formatMessage({id: 'editor.importantLinks.text1'})}: https://remix-project.org/\n - \t\t\t\t\t\t\t\t${intl.formatMessage({id: 'editor.importantLinks.text2'})}: https://remix-ide.readthedocs.io/en/latest/\n + \t\t\t\t\t\t\t${intl.formatMessage({ id: 'editor.keyboardShortcuts' })}:\n + \t\t\t\t\t\t\t\tCTRL + S: ${intl.formatMessage({ id: 'editor.keyboardShortcuts.text1' })}\n + \t\t\t\t\t\t\t\tCTRL + Shift + F : ${intl.formatMessage({ id: 'editor.keyboardShortcuts.text2' })}\n + \t\t\t\t\t\t\t\tCTRL + Shift + A : ${intl.formatMessage({ id: 'editor.keyboardShortcuts.text3' })}\n + \t\t\t\t\t\t\t\tCTRL + SHIFT + S: ${intl.formatMessage({ id: 'editor.keyboardShortcuts.text4' })}\n + \t\t\t\t\t\t\t${intl.formatMessage({ id: 'editor.editorKeyboardShortcuts' })}:\n + \t\t\t\t\t\t\t\tCTRL + Alt + F : ${intl.formatMessage({ id: 'editor.editorKeyboardShortcuts.text1' })}\n + \t\t\t\t\t\t\t${intl.formatMessage({ id: 'editor.importantLinks' })}:\n + \t\t\t\t\t\t\t\t${intl.formatMessage({ id: 'editor.importantLinks.text1' })}: https://remix-project.org/\n + \t\t\t\t\t\t\t\t${intl.formatMessage({ id: 'editor.importantLinks.text2' })}: https://remix-ide.readthedocs.io/en/latest/\n \t\t\t\t\t\t\t\tGithub: https://github.com/ethereum/remix-project\n \t\t\t\t\t\t\t\tGitter: https://gitter.im/ethereum/remix\n \t\t\t\t\t\t\t\tMedium: https://medium.com/remix-ide\n @@ -472,7 +472,7 @@ export const EditorUI = (props: EditorUIProps) => { const addDecoration = (decoration: sourceAnnotation | sourceMarker, filePath: string, typeOfDecoration: string) => { const model = editorModelsState[filePath]?.model - if (!model) return { currentDecorations: [] } + if (!model) return { currentDecorations: []} const monacoDecoration = convertToMonacoDecoration(decoration, typeOfDecoration) return { currentDecorations: model.deltaDecorations([], [monacoDecoration]), @@ -629,7 +629,7 @@ export const EditorUI = (props: EditorUIProps) => { if (!pasteCodeRef.current && e && e.range && e.range.startLineNumber >= 0 && e.range.endLineNumber >= 0 && e.range.endLineNumber - e.range.startLineNumber > 10) { const modalContent: AlertModal = { id: 'newCodePasted', - title: intl.formatMessage({id: 'editor.title1'}), + title: intl.formatMessage({ id: 'editor.title1' }), message: (
{' '} @@ -638,7 +638,7 @@ export const EditorUI = (props: EditorUIProps) => {
- {chunks}}} /> + {chunks} }} />
@@ -670,7 +670,7 @@ export const EditorUI = (props: EditorUIProps) => { // add context menu items const zoominAction = { id: 'zoomIn', - label: intl.formatMessage({id: 'editor.zoomIn'}), + label: intl.formatMessage({ id: 'editor.zoomIn' }), contextMenuOrder: 0, // choose the order contextMenuGroupId: 'zooming', // create a new grouping keybindings: [ @@ -683,7 +683,7 @@ export const EditorUI = (props: EditorUIProps) => { } const zoomOutAction = { id: 'zoomOut', - label: intl.formatMessage({id: 'editor.zoomOut'}), + label: intl.formatMessage({ id: 'editor.zoomOut' }), contextMenuOrder: 0, // choose the order contextMenuGroupId: 'zooming', // create a new grouping keybindings: [ @@ -696,7 +696,7 @@ export const EditorUI = (props: EditorUIProps) => { } const formatAction = { id: 'autoFormat', - label: intl.formatMessage({id: 'editor.formatCode'}), + label: intl.formatMessage({ id: 'editor.formatCode' }), contextMenuOrder: 0, // choose the order contextMenuGroupId: 'formatting', // create a new grouping keybindings: [ @@ -712,14 +712,14 @@ export const EditorUI = (props: EditorUIProps) => { let gptGenerateDocumentationAction const executeGptGenerateDocumentationAction = { id: 'generateDocumentation', - label: intl.formatMessage({id: 'editor.generateDocumentation'}), + label: intl.formatMessage({ id: 'editor.generateDocumentation' }), contextMenuOrder: 0, // choose the order contextMenuGroupId: 'gtp', // create a new grouping keybindings: [], run: async () => { const file = await props.plugin.call('fileManager', 'getCurrentFile') const content = await props.plugin.call('fileManager', 'readFile', file) - const message = intl.formatMessage({id: 'editor.generateDocumentationByAI'}, {content, currentFunction: currentFunction.current}) + const message = intl.formatMessage({ id: 'editor.generateDocumentationByAI' }, { content, currentFunction: currentFunction.current }) await props.plugin.call('openaigpt', 'message', message) _paq.push(['trackEvent', 'ai', 'openai', 'generateDocumentation']) }, @@ -728,14 +728,14 @@ export const EditorUI = (props: EditorUIProps) => { let gptExplainFunctionAction const executegptExplainFunctionAction = { id: 'explainFunction', - label: intl.formatMessage({id: 'editor.explainFunction'}), + label: intl.formatMessage({ id: 'editor.explainFunction' }), contextMenuOrder: 1, // choose the order contextMenuGroupId: 'gtp', // create a new grouping keybindings: [], run: async () => { const file = await props.plugin.call('fileManager', 'getCurrentFile') const content = await props.plugin.call('fileManager', 'readFile', file) - const message = intl.formatMessage({id: 'editor.explainFunctionByAI'}, {content, currentFunction: currentFunction.current}) + const message = intl.formatMessage({ id: 'editor.explainFunctionByAI' }, { content, currentFunction: currentFunction.current }) await props.plugin.call('openaigpt', 'message', message) _paq.push(['trackEvent', 'ai', 'openai', 'explainFunction']) }, @@ -744,7 +744,7 @@ export const EditorUI = (props: EditorUIProps) => { let solgptExplainFunctionAction const executeSolgptExplainFunctionAction = { id: 'solExplainFunction', - label: intl.formatMessage({id: 'editor.explainFunctionSol'}), + label: intl.formatMessage({ id: 'editor.explainFunctionSol' }), contextMenuOrder: 1, // choose the order contextMenuGroupId: 'sol-gtp', // create a new grouping keybindings: [], @@ -758,12 +758,11 @@ export const EditorUI = (props: EditorUIProps) => { }, } - const freeFunctionCondition = editor.createContextKey('freeFunctionCondition', false) let freeFunctionAction const executeFreeFunctionAction = { id: 'executeFreeFunction', - label: intl.formatMessage({id: 'editor.executeFreeFunction'}), + label: intl.formatMessage({ id: 'editor.executeFreeFunction' }), contextMenuOrder: 0, // choose the order contextMenuGroupId: 'execute', // create a new grouping precondition: 'freeFunctionCondition', @@ -780,10 +779,10 @@ export const EditorUI = (props: EditorUIProps) => { const file = await props.plugin.call('fileManager', 'getCurrentFile') props.plugin.call('solidity-script', 'execute', file, freeFunctionNode.name) } else { - props.plugin.call('notification', 'toast', intl.formatMessage({id: 'editor.toastText1'})) + props.plugin.call('notification', 'toast', intl.formatMessage({ id: 'editor.toastText1' })) } } else { - props.plugin.call('notification', 'toast', intl.formatMessage({id: 'editor.toastText2'})) + props.plugin.call('notification', 'toast', intl.formatMessage({ id: 'editor.toastText2' })) } }, } @@ -824,27 +823,26 @@ export const EditorUI = (props: EditorUIProps) => { return } - const { nodesAtPosition } = await retrieveNodesAtPosition(props.editorAPI, props.plugin) const freeFunctionNode = nodesAtPosition.find((node) => node.kind === 'freeFunction') if (freeFunctionNode) { - executeFreeFunctionAction.label = intl.formatMessage({id: 'editor.executeFreeFunction2'}, {name: freeFunctionNode.name}) + executeFreeFunctionAction.label = intl.formatMessage({ id: 'editor.executeFreeFunction2' }, { name: freeFunctionNode.name }) freeFunctionAction = editor.addAction(executeFreeFunctionAction) } const functionImpl = nodesAtPosition.find((node) => node.kind === 'function') if (functionImpl) { currentFunction.current = functionImpl.name - executeGptGenerateDocumentationAction.label = intl.formatMessage({id: 'editor.generateDocumentation2'}, {name: functionImpl.name}) + executeGptGenerateDocumentationAction.label = intl.formatMessage({ id: 'editor.generateDocumentation2' }, { name: functionImpl.name }) gptGenerateDocumentationAction = editor.addAction(executeGptGenerateDocumentationAction) - executegptExplainFunctionAction.label = intl.formatMessage({id: 'editor.explainFunction2'}, {name: functionImpl.name}) + executegptExplainFunctionAction.label = intl.formatMessage({ id: 'editor.explainFunction2' }, { name: functionImpl.name }) gptExplainFunctionAction = editor.addAction(executegptExplainFunctionAction) - executeSolgptExplainFunctionAction.label = intl.formatMessage({id: 'editor.explainFunctionSol'}) + executeSolgptExplainFunctionAction.label = intl.formatMessage({ id: 'editor.explainFunctionSol' }) solgptExplainFunctionAction = editor.addAction(executeSolgptExplainFunctionAction) - }else{ + } else { // do not allow single character explaining if (editor.getModel().getValueInRange(editor.getSelection()).length <=1){ return} - executeSolgptExplainFunctionAction.label = intl.formatMessage({id: 'editor.explainFunctionSol'}) + executeSolgptExplainFunctionAction.label = intl.formatMessage({ id: 'editor.explainFunctionSol' }) solgptExplainFunctionAction = editor.addAction(executeSolgptExplainFunctionAction) } freeFunctionCondition.set(!!freeFunctionNode) @@ -892,7 +890,7 @@ export const EditorUI = (props: EditorUIProps) => { monacoRef.current.languages.register({ id: 'remix-circom' }) // Allow JSON schema requests - monacoRef.current.languages.json.jsonDefaults.setDiagnosticsOptions({enableSchemaRequest: true}) + monacoRef.current.languages.json.jsonDefaults.setDiagnosticsOptions({ enableSchemaRequest: true }) // Register a tokens provider for the language monacoRef.current.languages.setMonarchTokensProvider('remix-solidity', solidityTokensProvider as any) diff --git a/libs/remix-ui/editor/src/lib/syntaxes/move.ts b/libs/remix-ui/editor/src/lib/syntaxes/move.ts index f89188589e..f55d1dfc38 100644 --- a/libs/remix-ui/editor/src/lib/syntaxes/move.ts +++ b/libs/remix-ui/editor/src/lib/syntaxes/move.ts @@ -13,7 +13,7 @@ export const moveLanguageConfig = { { open: "[", close: "]" }, { open: "{", close: "}" }, { open: "(", close: ")" }, - { open: '"', close: '"', notIn: ["string"] }, + { open: '"', close: '"', notIn: ["string"]}, ], surroundingPairs: [ { open: "{", close: "}" }, diff --git a/libs/remix-ui/editor/src/lib/web-types.ts b/libs/remix-ui/editor/src/lib/web-types.ts index ae8253f65f..4dddad6159 100644 --- a/libs/remix-ui/editor/src/lib/web-types.ts +++ b/libs/remix-ui/editor/src/lib/web-types.ts @@ -28,7 +28,7 @@ export const loadTypes = async (monaco) => { const ethersBase64 = await import('raw-loader!@ethersproject/base64/lib/index.d.ts') const ethersBase64Default = ethersBase64.default.replace(/@ethersproject\//g, '@ethersproject_') monaco.languages.typescript.typescriptDefaults.addExtraLib(ethersBase64Default, `file:///node_modules/@types/@ethersproject_base64/index.d.ts`) - + // @ts-ignore const ethersBasex = await import('raw-loader!@ethersproject/basex/lib/index.d.ts') const ethersBasexDefault = ethersBasex.default.replace(/@ethersproject\//g, '@ethersproject_') diff --git a/libs/remix-ui/file-decorators/src/lib/components/file-decoration-icon.tsx b/libs/remix-ui/file-decorators/src/lib/components/file-decoration-icon.tsx index b7506bc0c9..fdbeb4081c 100644 --- a/libs/remix-ui/file-decorators/src/lib/components/file-decoration-icon.tsx +++ b/libs/remix-ui/file-decorators/src/lib/components/file-decoration-icon.tsx @@ -1,7 +1,7 @@ // eslint-disable-next-line no-use-before-define -import React, {useEffect, useState} from 'react' +import React, { useEffect, useState } from 'react' -import {fileDecoration, fileDecorationType, FileType} from '../types' +import { fileDecoration, fileDecorationType, FileType } from '../types' import FileDecorationCustomIcon from './filedecorationicons/file-decoration-custom-icon' import FileDecorationErrorIcon from './filedecorationicons/file-decoration-error-icon' import FileDecorationTooltip from './filedecorationicons/file-decoration-tooltip' diff --git a/libs/remix-ui/file-decorators/src/lib/components/filedecorationicons/file-decoration-custom-icon.tsx b/libs/remix-ui/file-decorators/src/lib/components/filedecorationicons/file-decoration-custom-icon.tsx index af36c9c49e..59bc29823f 100644 --- a/libs/remix-ui/file-decorators/src/lib/components/filedecorationicons/file-decoration-custom-icon.tsx +++ b/libs/remix-ui/file-decorators/src/lib/components/filedecorationicons/file-decoration-custom-icon.tsx @@ -1,6 +1,6 @@ // eslint-disable-next-line no-use-before-define import React from 'react' -import {fileDecoration} from '../../types' +import { fileDecoration } from '../../types' const FileDecorationCustomIcon = (props: {fileDecoration: fileDecoration}) => { return ( diff --git a/libs/remix-ui/file-decorators/src/lib/components/filedecorationicons/file-decoration-error-icon.tsx b/libs/remix-ui/file-decorators/src/lib/components/filedecorationicons/file-decoration-error-icon.tsx index 1aeebf0cf0..1d95295fec 100644 --- a/libs/remix-ui/file-decorators/src/lib/components/filedecorationicons/file-decoration-error-icon.tsx +++ b/libs/remix-ui/file-decorators/src/lib/components/filedecorationicons/file-decoration-error-icon.tsx @@ -1,7 +1,7 @@ // eslint-disable-next-line no-use-before-define import React from 'react' -import {fileDecoration} from '../../types' +import { fileDecoration } from '../../types' const FileDecorationErrorIcon = (props: {fileDecoration: fileDecoration}) => { return ( diff --git a/libs/remix-ui/file-decorators/src/lib/components/filedecorationicons/file-decoration-tooltip.tsx b/libs/remix-ui/file-decorators/src/lib/components/filedecorationicons/file-decoration-tooltip.tsx index 7eaf905a84..72a31f9817 100644 --- a/libs/remix-ui/file-decorators/src/lib/components/filedecorationicons/file-decoration-tooltip.tsx +++ b/libs/remix-ui/file-decorators/src/lib/components/filedecorationicons/file-decoration-tooltip.tsx @@ -1,6 +1,6 @@ import React from 'react' -import {OverlayTrigger, Popover} from 'react-bootstrap' -import {fileDecoration} from '../../types' +import { OverlayTrigger, Popover } from 'react-bootstrap' +import { fileDecoration } from '../../types' const FileDecorationTooltip = (props: {fileDecoration: fileDecoration; icon: JSX.Element; index: number}) => { const getComments = function (fileDecoration: fileDecoration) { @@ -22,7 +22,7 @@ const FileDecorationTooltip = (props: {fileDecoration: fileDecoration; icon: JSX placement="auto" overlay={ - +
{getComments(props.fileDecoration)}
diff --git a/libs/remix-ui/file-decorators/src/lib/components/filedecorationicons/file-decoration-warning-icon.tsx b/libs/remix-ui/file-decorators/src/lib/components/filedecorationicons/file-decoration-warning-icon.tsx index d8a574b926..3a5f601e35 100644 --- a/libs/remix-ui/file-decorators/src/lib/components/filedecorationicons/file-decoration-warning-icon.tsx +++ b/libs/remix-ui/file-decorators/src/lib/components/filedecorationicons/file-decoration-warning-icon.tsx @@ -1,6 +1,6 @@ // eslint-disable-next-line no-use-before-define import React from 'react' -import {fileDecoration} from '../../types' +import { fileDecoration } from '../../types' const FileDecorationWarningIcon = (props: {fileDecoration: fileDecoration}) => { return ( diff --git a/libs/remix-ui/file-decorators/src/lib/helper/index.tsx b/libs/remix-ui/file-decorators/src/lib/helper/index.tsx index 92a0a448c2..8091eec8de 100644 --- a/libs/remix-ui/file-decorators/src/lib/helper/index.tsx +++ b/libs/remix-ui/file-decorators/src/lib/helper/index.tsx @@ -1,5 +1,5 @@ import React from 'react' -import {fileDecoration} from '../types' +import { fileDecoration } from '../types' export const getComments = function (fileDecoration: fileDecoration) { if (fileDecoration.comment) { diff --git a/libs/remix-ui/grid-view/src/lib/components/customCheckbox.tsx b/libs/remix-ui/grid-view/src/lib/components/customCheckbox.tsx index bd08f4d59a..102b80d72d 100644 --- a/libs/remix-ui/grid-view/src/lib/components/customCheckbox.tsx +++ b/libs/remix-ui/grid-view/src/lib/components/customCheckbox.tsx @@ -16,7 +16,7 @@ export const CustomCheckbox = (props: CustomCheckboxProps) => { if (!textColor || textColor == '') textColor = filterCon.keyValueMap[props.label].color return ( -
+
{ useEffect(() => { if (props.tagList) setAnyEnabled(props.tagList.some((key) => filterCon.keyValueMap[key]?.enabled)) - else setAnyEnabled(filterCon.showUntagged) + else setAnyEnabled(filterCon.showUntagged) }, [filterCon, props.tagList]) return ( @@ -39,11 +38,11 @@ export const RemixUIGridCell = (props: RemixUIGridCellProps) => { { anyEnabled &&
-
- { props.logo && } +
+ { props.logo && } { props.title && } @@ -75,7 +74,7 @@ export const RemixUIGridCell = (props: RemixUIGridCellProps) => { ) )) }
} - { !props.tagList && }
} diff --git a/libs/remix-ui/grid-view/src/lib/remix-ui-grid-view.tsx b/libs/remix-ui/grid-view/src/lib/remix-ui-grid-view.tsx index 19fdfe452c..4184de4967 100644 --- a/libs/remix-ui/grid-view/src/lib/remix-ui-grid-view.tsx +++ b/libs/remix-ui/grid-view/src/lib/remix-ui-grid-view.tsx @@ -1,7 +1,7 @@ import React, {useState, useEffect, useContext, useRef, ReactNode} from 'react' // eslint-disable-line import './remix-ui-grid-view.css' -import {ThemeContext, themes} from './themeContext' +import { ThemeContext, themes } from './themeContext' import CustomCheckbox from './components/customCheckbox' import FiltersContext from "./filtersContext" @@ -35,7 +35,7 @@ export const RemixUIGridView = (props: RemixUIGridViewProps) => { if (!color || color === '') color = setKeyValueMap[key].color setKeyValueMap((prevMap) => ({ ...prevMap, - [key]: {color, enabled}, + [key]: { color, enabled }, })) } @@ -52,7 +52,7 @@ export const RemixUIGridView = (props: RemixUIGridViewProps) => { })) } - const {plugin} = props.plugin + const { plugin } = props.plugin const searchInputRef = useRef(null) const [state, setState] = useState<{ @@ -65,13 +65,13 @@ export const RemixUIGridView = (props: RemixUIGridViewProps) => { useEffect(() => { if (props.tagList && Array.isArray(props.tagList)) { const initialKeyValueMap: Record = {}; - + // Limit to first 8 elements, ignoring the rest for (let i = 0; i < props.tagList.length; i++) { const [key, color] = props.tagList[i] - initialKeyValueMap[key] = { enabled: true, color } + initialKeyValueMap[key] = { enabled: true, color } } - if (showUntagged) initialKeyValueMap['no tag'] = { enabled: true, color: 'primary' } + if (showUntagged) initialKeyValueMap['no tag'] = { enabled: true, color: 'primary' } setKeyValueMap(initialKeyValueMap) } }, []) @@ -121,7 +121,7 @@ export const RemixUIGridView = (props: RemixUIGridViewProps) => { } > - + )} @@ -102,7 +102,7 @@ export const CustomMenu = React.forwardRef( const height = window.innerHeight * 0.6 return (
-
    +
      {children}
@@ -143,8 +143,8 @@ export const ProxyAddressToggle = React.forwardRef( }} className="udapp_input form-control" value={address} - placeholder={intl.formatMessage({id: 'udapp.enterProxyAddress'})} - style={{width: '100%'}} + placeholder={intl.formatMessage({ id: 'udapp.enterProxyAddress' })} + style={{ width: '100%' }} data-id="ERC1967AddressInput" />
diff --git a/libs/remix-ui/helper/src/lib/components/web3Dialog.tsx b/libs/remix-ui/helper/src/lib/components/web3Dialog.tsx index 234bbe5a5f..b313fb6c78 100644 --- a/libs/remix-ui/helper/src/lib/components/web3Dialog.tsx +++ b/libs/remix-ui/helper/src/lib/components/web3Dialog.tsx @@ -47,7 +47,7 @@ export function Web3ProviderDialog(props: web3ProviderDialogProps) { type="text" name="prompt_text" id="prompt_text" - style={{width: '100%'}} + style={{ width: '100%' }} className="form-control" defaultValue={props.externalEndpoint} data-id="modalDialogCustomPromptText" diff --git a/libs/remix-ui/helper/src/lib/helper-components.tsx b/libs/remix-ui/helper/src/lib/helper-components.tsx index ea7d833d64..663955414e 100644 --- a/libs/remix-ui/helper/src/lib/helper-components.tsx +++ b/libs/remix-ui/helper/src/lib/helper-components.tsx @@ -1,4 +1,4 @@ -import {LayoutCompatibilityReport} from '@openzeppelin/upgrades-core/dist/storage/report' +import { LayoutCompatibilityReport } from '@openzeppelin/upgrades-core/dist/storage/report' import React from 'react' export const fileChangedToastMsg = (from: string, path: string) => ( @@ -123,7 +123,7 @@ export const upgradeReportMsg = (report: LayoutCompatibilityReport) => (
- +
The storage layout of new implementation is NOT diff --git a/libs/remix-ui/helper/src/lib/remix-ui-helper.ts b/libs/remix-ui/helper/src/lib/remix-ui-helper.ts index 68ea85b72d..ac51759f6a 100644 --- a/libs/remix-ui/helper/src/lib/remix-ui-helper.ts +++ b/libs/remix-ui/helper/src/lib/remix-ui-helper.ts @@ -113,7 +113,7 @@ export const isHexadecimal = (value) => { return /^[0-9a-fA-F]+$/.test(value) && (value.length % 2 === 0) } -export const isValidHash = (hash) => { // 0x prefixed, hexadecimal, 64digit +export const isValidHash = (hash) => { // 0x prefixed, hexadecimal, 64digit const hexValue = hash.slice(2, hash.length) return is0XPrefixed(hash) && /^[0-9a-fA-F]{64}$/.test(hexValue) } @@ -138,6 +138,6 @@ export const shortenProxyAddress = (address: string) => { export const shortenDate = (dateString: string) => { const date = new Date(dateString) - + return date.toLocaleDateString(undefined, { month: "short", day: "numeric" }) + ', ' + date.toLocaleTimeString(undefined, { hour: '2-digit', minute: '2-digit' }) } diff --git a/libs/remix-ui/home-tab/src/lib/components/customNavButtons.tsx b/libs/remix-ui/home-tab/src/lib/components/customNavButtons.tsx index f7c611a0f3..d2725f5dc6 100644 --- a/libs/remix-ui/home-tab/src/lib/components/customNavButtons.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/customNavButtons.tsx @@ -1,9 +1,9 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import React from 'react' -const CustomNavButtons = ({parent, next, previous, goToSlide, ...rest}) => { +const CustomNavButtons = ({ parent, next, previous, goToSlide, ...rest }) => { const { - carouselState: {currentSlide, totalItems, containerWidth, transform} + carouselState: { currentSlide, totalItems, containerWidth, transform } } = rest return (
diff --git a/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx b/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx index 4478818e27..766dd494fc 100644 --- a/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx +++ b/libs/remix-ui/home-tab/src/lib/components/homeTabFeatured.tsx @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import React, {useEffect, useState, useRef, useContext} from 'react' -import {FormattedMessage} from 'react-intl' -import {ThemeContext, themes} from '../themeContext' +import React, { useEffect, useState, useRef, useContext } from 'react' +import { FormattedMessage } from 'react-intl' +import { ThemeContext, themes } from '../themeContext' import Carousel from 'react-multi-carousel' import 'react-multi-carousel/lib/styles.css' import * as releaseDetails from './../../../../../../releaseDetails.json' @@ -13,11 +13,11 @@ function HomeTabFeatured() { return (
-