From ed896ee6fc5c081b98939615e34b6b43a869c451 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Mon, 4 Nov 2024 13:49:45 +0100 Subject: [PATCH] linting --- .../src/app/components/popup-panel.tsx | 4 +- .../src/app/plugins/remixAIPlugin.tsx | 2 +- libs/remix-ui/app/src/index.ts | 2 +- .../app/src/lib/remix-app/reducer/app.ts | 50 +++++++++---------- .../src/lib/components/PluginViewWrapper.tsx | 2 +- .../remix-ai/src/lib/components/Default.tsx | 4 +- .../statusbar/src/lib/components/aiStatus.tsx | 6 +-- .../src/lib/remixui-statusbar-panel.tsx | 4 +- 8 files changed, 37 insertions(+), 37 deletions(-) diff --git a/apps/remix-ide/src/app/components/popup-panel.tsx b/apps/remix-ide/src/app/components/popup-panel.tsx index f45a9f3d3f..363d89d2cf 100644 --- a/apps/remix-ide/src/app/components/popup-panel.tsx +++ b/apps/remix-ide/src/app/components/popup-panel.tsx @@ -4,8 +4,8 @@ import { PluginRecord, RemixPluginPanel } from '@remix-ui/panel' import packageJson from '../../../../../package.json' import { PluginViewWrapper } from '@remix-ui/helper' import { EventEmitter } from 'events' -import { AppState } from 'libs/remix-ui/app/src/lib/remix-app/interface' -import { AppAction, appActionTypes } from '@remix-ui/app' + +import { AppAction, appActionTypes, AppState } from '@remix-ui/app' const profile = { name: 'popupPanel', diff --git a/apps/remix-ide/src/app/plugins/remixAIPlugin.tsx b/apps/remix-ide/src/app/plugins/remixAIPlugin.tsx index 5bb7ac7e93..34a3a15298 100644 --- a/apps/remix-ide/src/app/plugins/remixAIPlugin.tsx +++ b/apps/remix-ide/src/app/plugins/remixAIPlugin.tsx @@ -62,7 +62,7 @@ export class RemixAIPlugin extends ViewPlugin { this.initialize() } } - + async initialize(model1?:IModel, model2?:IModel, remoteModel?:IRemoteModel, useRemote?:boolean){ if (this.isOnDesktop && !this.useRemoteInferencer) { // on desktop use remote inferencer -> false diff --git a/libs/remix-ui/app/src/index.ts b/libs/remix-ui/app/src/index.ts index 31dea89385..4602431686 100644 --- a/libs/remix-ui/app/src/index.ts +++ b/libs/remix-ui/app/src/index.ts @@ -2,6 +2,6 @@ export { default as RemixApp } from './lib/remix-app/remix-app' export { dispatchModalContext, dispatchModalInterface, AppContext, appProviderContextType, appPlatformTypes, platformContext, onLineContext } from './lib/remix-app/context/context' export { ModalProvider, useDialogDispatchers } from './lib/remix-app/context/provider' export { AppModal } from './lib/remix-app/interface/index' -export { AlertModal } from './lib/remix-app/interface/index' +export { AlertModal, AppState } from './lib/remix-app/interface/index' export { ModalTypes, AppModalCancelTypes } from './lib/remix-app/types/index' export { AppAction, appActionTypes } from './lib/remix-app/actions/app' diff --git a/libs/remix-ui/app/src/lib/remix-app/reducer/app.ts b/libs/remix-ui/app/src/lib/remix-app/reducer/app.ts index 5abe07626c..39d61cab75 100644 --- a/libs/remix-ui/app/src/lib/remix-app/reducer/app.ts +++ b/libs/remix-ui/app/src/lib/remix-app/reducer/app.ts @@ -3,36 +3,36 @@ import { AppState } from "../interface"; export const appReducer = (state: AppState, action: AppAction): AppState => { switch (action.type) { - case appActionTypes.setGitHubUser: { - return { - ...state, - gitHubUser: action.payload - } + case appActionTypes.setGitHubUser: { + return { + ...state, + gitHubUser: action.payload } - case appActionTypes.setCurrentBranch: { - return { - ...state, - currentBranch: action.payload - } + } + case appActionTypes.setCurrentBranch: { + return { + ...state, + currentBranch: action.payload } - case appActionTypes.setNeedsGitInit: { - return { - ...state, - needsGitInit: action.payload - } + } + case appActionTypes.setNeedsGitInit: { + return { + ...state, + needsGitInit: action.payload } - case appActionTypes.setCanUseGit: { - return { - ...state, - canUseGit: action.payload - } + } + case appActionTypes.setCanUseGit: { + return { + ...state, + canUseGit: action.payload } + } - case appActionTypes.setShowPopupPanel: { - return { - ...state, - showPopupPanel: action.payload - } + case appActionTypes.setShowPopupPanel: { + return { + ...state, + showPopupPanel: action.payload } } + } } \ No newline at end of file diff --git a/libs/remix-ui/helper/src/lib/components/PluginViewWrapper.tsx b/libs/remix-ui/helper/src/lib/components/PluginViewWrapper.tsx index 168f1095f2..c29f58d4dc 100644 --- a/libs/remix-ui/helper/src/lib/components/PluginViewWrapper.tsx +++ b/libs/remix-ui/helper/src/lib/components/PluginViewWrapper.tsx @@ -14,7 +14,7 @@ export const PluginViewWrapper = (props: IPluginViewWrapperProps) => { if (props.plugin.setDispatch) { props.plugin.setDispatch(setState) } - if(props.plugin.setAppStateDispatch) { + if (props.plugin.setAppStateDispatch) { props.plugin.setAppStateDispatch(appContext.appStateDispatch) } }, []) diff --git a/libs/remix-ui/remix-ai/src/lib/components/Default.tsx b/libs/remix-ui/remix-ai/src/lib/components/Default.tsx index 1f1ce48323..bdeaacbea7 100644 --- a/libs/remix-ui/remix-ai/src/lib/components/Default.tsx +++ b/libs/remix-ui/remix-ai/src/lib/components/Default.tsx @@ -42,8 +42,8 @@ export const Default = (props) => { }; ChatApi = useAiChatApi(); const conversationStarters: ConversationStarter[] = [ - { prompt: 'Explain what is a solidity contract!'}, - { prompt: 'Explain briefly the current file in Editor'}] + { prompt: 'Explain what is a solidity contract!' }, + { prompt: 'Explain briefly the current file in Editor' }] // Define initial messages const initialMessages: ChatItem[] = [ diff --git a/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx b/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx index 48864811a2..53f3de6325 100644 --- a/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx +++ b/libs/remix-ui/statusbar/src/lib/components/aiStatus.tsx @@ -15,13 +15,13 @@ export default function AIStatus(props: AIStatusProps) { const [copilotActive, setCopilotActive] = useState(false) const appContext = useContext(AppContext) useEffect(() => { - + const run = async () => { const aiActivate = await props.plugin.call('settings', 'get', 'settings/copilot/suggest/activate') setCopilotActive(aiActivate) } run() - + }, []) useEffect(() => { @@ -40,7 +40,7 @@ export default function AIStatus(props: AIStatusProps) { tooltipText={copilotActive ? "Disable RemixAI Copilot" : "Enable RemixAI Copilot. Switch to .sol file to try it."} > { await props.plugin.call('settings' as any, 'updateCopilotChoice', !copilotActive) diff --git a/libs/remix-ui/statusbar/src/lib/remixui-statusbar-panel.tsx b/libs/remix-ui/statusbar/src/lib/remixui-statusbar-panel.tsx index a295239a10..22b1dac390 100644 --- a/libs/remix-ui/statusbar/src/lib/remixui-statusbar-panel.tsx +++ b/libs/remix-ui/statusbar/src/lib/remixui-statusbar-panel.tsx @@ -89,8 +89,8 @@ export function RemixUIStatusBar({ statusBarPlugin }: RemixUIStatusBarProps) { )}
{ (platform !== appPlatformTypes.desktop) &&
- -
} + +
}