From 8eaeea531ccd5caf899158f7b2111dd053527dda Mon Sep 17 00:00:00 2001 From: Sina Date: Wed, 7 Aug 2024 12:26:22 +0200 Subject: [PATCH] [chore] eslint upgrade to version 9 (#287) --- .eslintrc.cjs | 436 ----- .storybook/InnerBasicProviders.tsx | 13 +- .storybook/WithProviders.tsx | 14 +- .storybook/preview.tsx | 17 +- eslint.config.mjs | 512 +++++ package.json | 71 +- src/Main.tsx | 2 +- .../panel/PanelInitialMessageHandler.tsx | 14 +- src/core/auth/AuthGuard.tsx | 2 +- src/core/auth/WorkspaceGuard.tsx | 8 +- src/core/events/WebSocketEvents.tsx | 4 +- src/core/snackbar/SnackbarProvider.tsx | 11 +- src/core/snackbar/useSnackbar.ts | 1 - src/locales/de-DE/messages.po | 30 +- src/locales/en-US/messages.po | 30 +- .../forgot-password/ForgotPasswordPage.tsx | 2 +- .../InventoryAdvanceSearchInfo.tsx | 6 +- .../InventoryFormFilterRowProperty.tsx | 2 +- .../InventoryFormFilterRowStringValue.tsx | 2 +- .../InventoryFormFilterRowValues.tsx | 4 +- .../inventory-form/InventoryFormMore.tsx | 3 +- .../utils/InventoryTableKindRenderCell.tsx | 2 +- .../ResourceDetailFailedChecks.tsx | 2 +- .../UserSettingsApiTokensAddToken.tsx | 2 +- .../UserSettingsApiTokensRow.tsx | 2 +- .../user-settings/UserSettingsFormEmail.tsx | 2 +- .../UserSettingsFormPassword.tsx | 11 +- .../UserSettingsNotification.tsx | 2 +- .../UserSettingsSocialNetworkDeleteButton.tsx | 2 +- .../UserSettingsTotpActivationModal.tsx | 10 +- .../UserSettingsTotpDeactivationModal.tsx | 8 +- .../UserSettingsTotpRecoveryCodesModal.tsx | 2 +- .../ExternalId.tsx | 2 +- .../SetupTemplateButton.tsx | 2 +- .../WorkspaceId.tsx | 2 +- ...aceSettingsAccountsSetupCloudAzureForm.tsx | 4 +- ...SettingsAccountsSetupCloudGCPUploadKey.tsx | 2 +- .../WorkspaceSettingsAccountRow.tsx | 10 +- .../ChangeProductTierModal.tsx | 8 +- .../ChangeProductTierToFreeModal.tsx | 8 +- .../ConfirmChangePaymentModal.tsx | 6 +- .../InviteExternalUser.tsx | 6 +- .../WorkspaceSettingsUserInvitationRow.tsx | 2 +- .../WorkspaceSettingsUserRoles.tsx | 4 +- .../WorkspaceSettingsUserRow.tsx | 2 +- .../WorkspaceSettingsForm.tsx | 8 +- .../WorkspaceAlertingSettings.tsx | 2 +- .../WorkspaceSettingsConnectedServices.tsx | 4 +- ...orkspaceSettingsDisconnectServiceModal.tsx | 2 +- .../WorkspaceSettingsEmailService.tsx | 2 +- .../WorkspaceSettingsOpsgenieService.tsx | 2 +- .../WorkspaceSettingsPagerdutyService.tsx | 2 +- .../WorkspaceSettingsTeamsService.tsx | 2 +- .../choose-workspace/ChooseWorkspacePage.tsx | 10 +- src/reportWebVitals.ts | 2 +- src/shared/absolute-navigate/index.ts | 1 + src/shared/charts/NetworkDiagram.tsx | 1 - src/shared/charts/PieChart.stories.tsx | 3 +- .../ErrorBoundaryFallback.stories.tsx | 2 +- src/shared/error-boundary-fallback/index.ts | 3 - .../{ErrorBoundaryFallback.tsx => index.tsx} | 5 +- src/shared/event-button/EventButton.tsx | 28 +- src/shared/fix-query-parser/lexer.ts | 1 - src/shared/fix-query-parser/parser.test.ts | 1 - .../FullscreenAbleContainer.tsx | 5 +- .../layouts/panel-layout/PanelBottom.tsx | 2 +- .../layouts/panel-layout/PanelHeader.tsx | 2 +- .../panel-layout/UserProfileButton.tsx | 4 +- src/shared/secret-field/SecretField.tsx | 2 +- src/shared/types/global/trackjs.d.ts | 2 +- src/shared/utils/useFullscreen.ts | 2 +- yarn.lock | 1699 ++++++++++------- 72 files changed, 1709 insertions(+), 1377 deletions(-) delete mode 100644 .eslintrc.cjs create mode 100644 eslint.config.mjs delete mode 100644 src/shared/error-boundary-fallback/index.ts rename src/shared/error-boundary-fallback/{ErrorBoundaryFallback.tsx => index.tsx} (93%) diff --git a/.eslintrc.cjs b/.eslintrc.cjs deleted file mode 100644 index d78cd84a..00000000 --- a/.eslintrc.cjs +++ /dev/null @@ -1,436 +0,0 @@ -module.exports = { - root: true, - env: { browser: true, es2020: true }, - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:@typescript-eslint/recommended-type-checked', - 'plugin:react-hooks/recommended', - 'plugin:storybook/recommended', - ], - ignorePatterns: ['!.storybook', '__mocks__/*', 'index.html', 'public/*.min.js', 'src/locales/**/*', 'dist', '.eslintrc.cjs'], - parser: '@typescript-eslint/parser', - parserOptions: { - project: './tsconfig.json', - tsconfigRootDir: __dirname, - }, - plugins: ['prettier', '@typescript-eslint', 'react-refresh'], - overrides: [ - { - files: ['*.js'], - extends: ['plugin:@typescript-eslint/disable-type-checked'], - }, - { - files: ['lingui.config.ts', 'src/locales/*/messages.d.ts', '.storybook/*.ts', 'mock-apis/**/*.ts'], - parserOptions: { - project: './tsconfig.eslint.json', - }, - }, - { - files: ['vite.config.ts', 'vite.config.test.ts'], - parserOptions: { - project: './tsconfig.node.json', - }, - }, - ], - rules: { - 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }], - 'prettier/prettier': ['warn'], - '@typescript-eslint/no-unused-vars': [ - 'warn', - { - argsIgnorePattern: '^_', - varsIgnorePattern: '^_', - caughtErrorsIgnorePattern: '^_', - }, - ], - 'no-console': [ - 'warn', - { - allow: ['warn', 'error', 'info'], - }, - ], - 'no-restricted-imports': [ - 'error', - { - patterns: [ - { - group: [ - '@mui/material/*', - '!@mui/material/locale', - '@mui/lab/*', - '@mui/x-date-pickers/*', - '!@mui/x-date-pickers/locales', - '!@mui/x-date-pickers/AdapterDayjs', - '@mui/x-tree-view/*', - '!@mui/x-tree-view/locales', - '@mui/x-data-grid/*', - '!@mui/x-data-grid/locales', - '@mui/base*', - '@mui/system*', - '@mui/types*', - '@mui/utils*', - '@mui/core-downloads-tracker*', - '@mui/private-theming*', - '@mui/styled-engine*', - '@emotion*', - ], - message: 'Only import usage of @mui/material, @mui/lab, @mui/x-date-pickers, @mui/x-data-grid and @mui/x-tree-view is allowed.', - }, - { - group: ['../*'], - message: 'Relative import is not allowed.', - }, - { - group: [ - 'src/*/*/*', - '!src/pages/panel/shared', - 'src/pages/panel/shared/*/*', - '!src/shared/utils/*', - '!src/shared/types/shared', - '!src/shared/types/server', - '!src/shared/types/server-shared', - 'src/shared/types/server/*', - '!src/shared/layouts/*', - 'src/shared/layouts/*/*', - ], - message: - 'Every components in shared should have index.ts for re-export and import from top folder of shared is only allowed with the exception of layouts/parent, types/parent, utils/util', - }, - ], - paths: [ - { - name: '@mui/icons-material', - message: 'Only import usage of @mui/icons-material/Icon is allowed (do not named import icons).', - }, - { - name: '.', - message: - "No import should be getting from '.' (index.ts). This makes so sense, the import should point to the file in the same folder EG. './Component'", - }, - ], - }, - ], - 'no-restricted-globals': [ - 'error', - 'document', - 'name', - 'location', - 'customElements', - 'history', - 'navigation', - 'locationbar', - 'menubar', - 'personalbar', - 'scrollbars', - 'statusbar', - 'toolbar', - 'status', - 'closed', - 'frames', - 'length', - 'top', - 'opener', - 'parent', - 'frameElement', - 'navigator', - 'origin', - 'external', - 'screen', - 'innerWidth', - 'innerHeight', - 'scrollX', - 'pageXOffset', - 'scrollY', - 'pageYOffset', - 'visualViewport', - 'screenX', - 'screenY', - 'outerWidth', - 'outerHeight', - 'devicePixelRatio', - 'clientInformation', - 'screenLeft', - 'screenTop', - 'styleMedia', - 'onsearch', - 'isSecureContext', - 'trustedTypes', - 'performance', - 'onappinstalled', - 'onbeforeinstallprompt', - 'crypto', - 'indexedDB', - 'sessionStorage', - 'localStorage', - 'onbeforexrselect', - 'onabort', - 'onbeforeinput', - 'onbeforetoggle', - 'onblur', - 'oncancel', - 'oncanplay', - 'oncanplaythrough', - 'onchange', - 'onclick', - 'onclose', - 'oncontextlost', - 'oncontextmenu', - 'oncontextrestored', - 'oncuechange', - 'ondblclick', - 'ondrag', - 'ondragend', - 'ondragenter', - 'ondragleave', - 'ondragover', - 'ondragstart', - 'ondrop', - 'ondurationchange', - 'onemptied', - 'onended', - 'onerror', - 'onfocus', - 'onformdata', - 'oninput', - 'oninvalid', - 'onkeydown', - 'onkeypress', - 'onkeyup', - 'onload', - 'onloadeddata', - 'onloadedmetadata', - 'onloadstart', - 'onmousedown', - 'onmouseenter', - 'onmouseleave', - 'onmousemove', - 'onmouseout', - 'onmouseover', - 'onmouseup', - 'onmousewheel', - 'onpause', - 'onplay', - 'onplaying', - 'onprogress', - 'onratechange', - 'onreset', - 'onresize', - 'onscroll', - 'onsecuritypolicyviolation', - 'onseeked', - 'onseeking', - 'onselect', - 'onslotchange', - 'onstalled', - 'onsubmit', - 'onsuspend', - 'ontimeupdate', - 'ontoggle', - 'onvolumechange', - 'onwaiting', - 'onwebkitanimationend', - 'onwebkitanimationiteration', - 'onwebkitanimationstart', - 'onwebkittransitionend', - 'onwheel', - 'onauxclick', - 'ongotpointercapture', - 'onlostpointercapture', - 'onpointerdown', - 'onpointermove', - 'onpointerrawupdate', - 'onpointerup', - 'onpointercancel', - 'onpointerover', - 'onpointerout', - 'onpointerenter', - 'onpointerleave', - 'onselectstart', - 'onselectionchange', - 'onanimationend', - 'onanimationiteration', - 'onanimationstart', - 'ontransitionrun', - 'ontransitionstart', - 'ontransitionend', - 'ontransitioncancel', - 'onafterprint', - 'onbeforeprint', - 'onbeforeunload', - 'onhashchange', - 'onlanguagechange', - 'onmessage', - 'onmessageerror', - 'onoffline', - 'ononline', - 'onpagehide', - 'onpageshow', - 'onpopstate', - 'onrejectionhandled', - 'onstorage', - 'onunhandledrejection', - 'onunload', - 'crossOriginIsolated', - 'scheduler', - 'alert', - 'atob', - 'blur', - 'btoa', - 'cancelAnimationFrame', - 'cancelIdleCallback', - 'captureEvents', - 'clearInterval', - 'clearTimeout', - 'close', - 'confirm', - 'createImageBitmap', - 'fetch', - 'find', - 'focus', - 'getComputedStyle', - 'getSelection', - 'matchMedia', - 'moveBy', - 'moveTo', - 'open', - 'postMessage', - 'print', - 'prompt', - 'queueMicrotask', - 'releaseEvents', - 'reportError', - 'requestAnimationFrame', - 'requestIdleCallback', - 'resizeBy', - 'resizeTo', - 'scroll', - 'scrollBy', - 'scrollTo', - 'setInterval', - 'setTimeout', - 'stop', - 'structuredClone', - 'webkitCancelAnimationFrame', - 'webkitRequestAnimationFrame', - 'chrome', - 'fence', - 'caches', - 'cookieStore', - 'ondevicemotion', - 'ondeviceorientation', - 'ondeviceorientationabsolute', - 'launchQueue', - 'sharedStorage', - 'documentPictureInPicture', - 'onbeforematch', - 'getScreenDetails', - 'queryLocalFonts', - 'showDirectoryPicker', - 'showOpenFilePicker', - 'showSaveFilePicker', - 'originAgentCluster', - 'credentialless', - 'speechSynthesis', - 'oncontentvisibilityautostatechange', - 'onscrollend', - 'webkitRequestFileSystem', - 'webkitResolveLocalFileSystemURL', - 'webpackChunk', - 'IncludeFragmentElement', - 'ActionBarElement', - 'DetailsMenuElement', - 'AnchoredPositionElement', - 'FocusGroupElement', - 'ImageCropElement', - 'ModalDialogElement', - 'NavListElement', - 'SegmentedControlElement', - 'ToggleSwitchElement', - 'ToolTipElement', - 'XBannerElement', - 'AutocompleteElement', - 'ClipboardCopyElement', - 'RelativeTimeElement', - 'TabContainerElement', - 'PrimerMultiInputElement', - 'AutoCheckElement', - 'PrimerTextFieldElement', - 'ToggleSwitchInputElement', - 'ActionMenuElement', - 'DetailsDialogElement', - 'FileAttachmentElement', - 'FilterInputElement', - 'GEmojiElement', - 'MarkdownHeaderButtonElement', - 'MarkdownBoldButtonElement', - 'MarkdownItalicButtonElement', - 'MarkdownQuoteButtonElement', - 'MarkdownCodeButtonElement', - 'MarkdownLinkButtonElement', - 'MarkdownImageButtonElement', - 'MarkdownUnorderedListButtonElement', - 'MarkdownOrderedListButtonElement', - 'MarkdownTaskListButtonElement', - 'MarkdownMentionButtonElement', - 'MarkdownRefButtonElement', - 'MarkdownStrikethroughButtonElement', - 'MarkdownToolbarElement', - 'RemoteInputElement', - 'TaskListsElement', - 'TextExpanderElement', - 'TypingEffectElement', - 'FuzzyListElement', - 'GitCloneHelpElement', - 'MarkedTextElement', - 'PasswordStrengthElement', - 'PollIncludeFragmentElement', - 'SlashCommandExpanderElement', - 'TextSuggesterElement', - 'VirtualFilterInputElement', - 'VirtualListElement', - 'VisiblePasswordElement', - 'BatchDeferredContentElement', - 'Turbo', - 'litHtmlVersions', - 'WebauthnGetElement', - 'SudoCredentialOptionsElement', - 'CollapsibleSidebarWidgetElement', - 'SidebarMemexInputElement', - 'NotificationsListSubscriptionFormElement', - 'NotificationsTeamSubscriptionFormElement', - 'NotificationsDialogLabelItemElement', - 'NotificationsListSubscriptionFormDialogElement', - 'CommentActionsContainerElement', - 'DiscussionSpotlightPreviewElement', - 'DiscussionSpotlightContainerElement', - 'CommandPaletteModeElement', - 'CommandPaletteTipElement', - 'CommandPaletteScopeElement', - 'CommandPaletteTokenElement', - 'CommandPaletteItemGroupElement', - 'ClientDefinedProviderElement', - 'commandPalette', - 'CommandPalette', - 'ServerDefinedProviderElement', - 'CommandPaletteHelpElement', - 'CommandPaletteInputElement', - 'EditHistoryElement', - 'ExperimentalActionMenuElement', - 'InlineMachineTranslationElement', - 'CommandPaletteItemElement', - 'CommandPalettePageElement', - 'NotificationShelfWatcherElement', - 'CommandPalettePageStackElement', - 'CustomScopesElement', - 'DeferredSidePanelElement', - 'UserDrawerSidePanelElement', - 'SlashCommandToolbarButtonElement', - 'SiteHeaderLoggedInUserMenuElement', - 'NotificationIndicatorElement', - 'QueryBuilderElement', - 'QbsearchInputElement', - 'ReactionsMenuElement', - ], - }, -} diff --git a/.storybook/InnerBasicProviders.tsx b/.storybook/InnerBasicProviders.tsx index d605bd62..ac8695d9 100644 --- a/.storybook/InnerBasicProviders.tsx +++ b/.storybook/InnerBasicProviders.tsx @@ -1,11 +1,11 @@ -import { StoryContext } from '@storybook/react' +import { StoryContext, StrictArgs } from '@storybook/react' import { FC, useEffect } from 'react' import { BrowserRouter } from 'react-router-dom' import { useThemeMode } from 'src/core/theme' -import { AbsoluteNavigateProvider } from 'src/shared/absolute-navigate' +import { AbsoluteNavigateContext } from 'src/shared/absolute-navigate' import { i18n } from 'src/shared/providers' -export const InnerBasicProviders = ({ Story, context }: { Story: FC; context: StoryContext }) => { +export const InnerBasicProviders = ({ Story, context }: { Story: FC; context: StoryContext }) => { const { theme: themeKey, lang } = context.globals as { theme: 'light' | 'dark'; lang: string } const { toggleColorMode } = useThemeMode() @@ -16,11 +16,12 @@ export const InnerBasicProviders = ({ Story, context }: { Story: FC; context: St useEffect(() => { toggleColorMode(themeKey) }, [toggleColorMode, themeKey]) + return ( - - - + {}}> + + ) } diff --git a/.storybook/WithProviders.tsx b/.storybook/WithProviders.tsx index 15c91e3c..b2f34ee6 100644 --- a/.storybook/WithProviders.tsx +++ b/.storybook/WithProviders.tsx @@ -1,12 +1,10 @@ -import { StoryContext } from '@storybook/react' +import { StoryContext, StrictArgs } from '@storybook/react' import { FC } from 'react' import { BasicProviders } from 'src/shared/providers' import { InnerBasicProviders } from './InnerBasicProviders' -export const WithProviders = ({ Story, context }: { Story: FC; context: StoryContext }) => { - return ( - - - - ) -} +export const WithProviders = ({ Story, context }: { Story: FC; context: StoryContext }) => ( + + + +) diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index 8838d600..5688c47d 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -3,15 +3,14 @@ import { langs } from 'src/shared/constants' import { WithProviders } from './WithProviders' const preview: Preview = { - parameters: { - actions: { argTypesRegex: '^on.*' }, - controls: { - matchers: { - color: /(background|color)$/i, - date: /Date$/i, - }, - }, - }, + // parameters: { + // controls: { + // matchers: { + // color: /(background|color)$/i, + // date: /Date$/i, + // }, + // }, + // }, globalTypes: { theme: { name: 'Theme', diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 00000000..97c8e0c1 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,512 @@ +import { fixupConfigRules, fixupPluginRules } from '@eslint/compat' +import { FlatCompat } from '@eslint/eslintrc' +import js from '@eslint/js' +import prettier from 'eslint-plugin-prettier' +import reactHooks from 'eslint-plugin-react-hooks' +import reactRefresh from 'eslint-plugin-react-refresh' +import globals from 'globals' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import tsEslint from 'typescript-eslint' + +const __filename = fileURLToPath(import.meta.url) +const __dirname = path.dirname(__filename) +const compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + ...tsEslint.configs.recommended, + allConfig: js.configs.all, +}) + +export default tsEslint.config( + { + ignores: [ + '__mocks__', + '**/index.html', + 'public/*.min.js', + 'dist', + 'storybook-static', + 'vite.config.ts', + 'vite.config.test.ts', + 'coverage', + 'src/locales/**/messages.ts', + 'node_modules', + ], + }, + { + extends: [js.configs.recommended, ...tsEslint.configs.recommended], + ignores: ['**/*.stories.{ts,tsx}'], + files: ['**/*.{ts,tsx}'], + languageOptions: { + ecmaVersion: 2020, + globals: globals.browser, + }, + plugins: { + prettier, + 'react-hooks': fixupPluginRules(reactHooks), + 'react-refresh': reactRefresh, + }, + rules: { + ...reactHooks.configs.recommended.rules, + 'react-refresh/only-export-components': [ + 'warn', + { + allowConstantExport: true, + }, + ], + + 'prettier/prettier': ['warn'], + + '@typescript-eslint/no-unused-vars': [ + 'warn', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_', + }, + ], + + 'no-console': [ + 'warn', + { + allow: ['warn', 'error', 'info'], + }, + ], + + 'no-restricted-imports': [ + 'error', + { + patterns: [ + { + group: [ + '@mui/material/*', + '!@mui/material/locale', + '@mui/lab/*', + '@mui/x-date-pickers/*', + '!@mui/x-date-pickers/locales', + '!@mui/x-date-pickers/AdapterDayjs', + '@mui/x-tree-view/*', + '!@mui/x-tree-view/locales', + '@mui/x-data-grid/*', + '!@mui/x-data-grid/locales', + '@mui/base*', + '@mui/system*', + '@mui/types*', + '@mui/utils*', + '@mui/core-downloads-tracker*', + '@mui/private-theming*', + '@mui/styled-engine*', + '@emotion*', + ], + + message: + 'Only import usage of @mui/material, @mui/lab, @mui/x-date-pickers, @mui/x-data-grid and @mui/x-tree-view is allowed.', + }, + { + group: ['../*'], + message: 'Relative import is not allowed.', + }, + { + group: [ + 'src/*/*/*', + '!src/pages/panel/shared', + 'src/pages/panel/shared/*/*', + '!src/shared/utils/*', + '!src/shared/types/shared', + '!src/shared/types/server', + '!src/shared/types/server-shared', + 'src/shared/types/server/*', + '!src/shared/layouts/*', + 'src/shared/layouts/*/*', + ], + + message: + 'Every components in shared should have index.ts for re-export and import from top folder of shared is only allowed with the exception of layouts/parent, types/parent, utils/util', + }, + ], + + paths: [ + { + name: '@mui/icons-material', + message: 'Only import usage of @mui/icons-material/Icon is allowed (do not named import icons).', + }, + { + name: '.', + message: + 'No import should be getting from "." (index.ts). This makes so sense, the import should point to the file in the same folder EG. "./Component"', + }, + ], + }, + ], + + 'no-restricted-globals': [ + 'error', + 'document', + 'name', + 'location', + 'customElements', + 'history', + 'navigation', + 'locationbar', + 'menubar', + 'personalbar', + 'scrollbars', + 'statusbar', + 'toolbar', + 'status', + 'closed', + 'frames', + 'length', + 'top', + 'opener', + 'parent', + 'frameElement', + 'navigator', + 'origin', + 'external', + 'screen', + 'innerWidth', + 'innerHeight', + 'scrollX', + 'pageXOffset', + 'scrollY', + 'pageYOffset', + 'visualViewport', + 'screenX', + 'screenY', + 'outerWidth', + 'outerHeight', + 'devicePixelRatio', + 'clientInformation', + 'screenLeft', + 'screenTop', + 'styleMedia', + 'onsearch', + 'isSecureContext', + 'trustedTypes', + 'performance', + 'onappinstalled', + 'onbeforeinstallprompt', + 'crypto', + 'indexedDB', + 'sessionStorage', + 'localStorage', + 'onbeforexrselect', + 'onabort', + 'onbeforeinput', + 'onbeforetoggle', + 'onblur', + 'oncancel', + 'oncanplay', + 'oncanplaythrough', + 'onchange', + 'onclick', + 'onclose', + 'oncontextlost', + 'oncontextmenu', + 'oncontextrestored', + 'oncuechange', + 'ondblclick', + 'ondrag', + 'ondragend', + 'ondragenter', + 'ondragleave', + 'ondragover', + 'ondragstart', + 'ondrop', + 'ondurationchange', + 'onemptied', + 'onended', + 'onerror', + 'onfocus', + 'onformdata', + 'oninput', + 'oninvalid', + 'onkeydown', + 'onkeypress', + 'onkeyup', + 'onload', + 'onloadeddata', + 'onloadedmetadata', + 'onloadstart', + 'onmousedown', + 'onmouseenter', + 'onmouseleave', + 'onmousemove', + 'onmouseout', + 'onmouseover', + 'onmouseup', + 'onmousewheel', + 'onpause', + 'onplay', + 'onplaying', + 'onprogress', + 'onratechange', + 'onreset', + 'onresize', + 'onscroll', + 'onsecuritypolicyviolation', + 'onseeked', + 'onseeking', + 'onselect', + 'onslotchange', + 'onstalled', + 'onsubmit', + 'onsuspend', + 'ontimeupdate', + 'ontoggle', + 'onvolumechange', + 'onwaiting', + 'onwebkitanimationend', + 'onwebkitanimationiteration', + 'onwebkitanimationstart', + 'onwebkittransitionend', + 'onwheel', + 'onauxclick', + 'ongotpointercapture', + 'onlostpointercapture', + 'onpointerdown', + 'onpointermove', + 'onpointerrawupdate', + 'onpointerup', + 'onpointercancel', + 'onpointerover', + 'onpointerout', + 'onpointerenter', + 'onpointerleave', + 'onselectstart', + 'onselectionchange', + 'onanimationend', + 'onanimationiteration', + 'onanimationstart', + 'ontransitionrun', + 'ontransitionstart', + 'ontransitionend', + 'ontransitioncancel', + 'onafterprint', + 'onbeforeprint', + 'onbeforeunload', + 'onhashchange', + 'onlanguagechange', + 'onmessage', + 'onmessageerror', + 'onoffline', + 'ononline', + 'onpagehide', + 'onpageshow', + 'onpopstate', + 'onrejectionhandled', + 'onstorage', + 'onunhandledrejection', + 'onunload', + 'crossOriginIsolated', + 'scheduler', + 'alert', + 'atob', + 'blur', + 'btoa', + 'cancelAnimationFrame', + 'cancelIdleCallback', + 'captureEvents', + 'clearInterval', + 'clearTimeout', + 'close', + 'confirm', + 'createImageBitmap', + 'fetch', + 'find', + 'focus', + 'getComputedStyle', + 'getSelection', + 'matchMedia', + 'moveBy', + 'moveTo', + 'open', + 'postMessage', + 'print', + 'prompt', + 'queueMicrotask', + 'releaseEvents', + 'reportError', + 'requestAnimationFrame', + 'requestIdleCallback', + 'resizeBy', + 'resizeTo', + 'scroll', + 'scrollBy', + 'scrollTo', + 'setInterval', + 'setTimeout', + 'stop', + 'structuredClone', + 'webkitCancelAnimationFrame', + 'webkitRequestAnimationFrame', + 'chrome', + 'fence', + 'caches', + 'cookieStore', + 'ondevicemotion', + 'ondeviceorientation', + 'ondeviceorientationabsolute', + 'launchQueue', + 'sharedStorage', + 'documentPictureInPicture', + 'onbeforematch', + 'getScreenDetails', + 'queryLocalFonts', + 'showDirectoryPicker', + 'showOpenFilePicker', + 'showSaveFilePicker', + 'originAgentCluster', + 'credentialless', + 'speechSynthesis', + 'oncontentvisibilityautostatechange', + 'onscrollend', + 'webkitRequestFileSystem', + 'webkitResolveLocalFileSystemURL', + 'webpackChunk', + 'IncludeFragmentElement', + 'ActionBarElement', + 'DetailsMenuElement', + 'AnchoredPositionElement', + 'FocusGroupElement', + 'ImageCropElement', + 'ModalDialogElement', + 'NavListElement', + 'SegmentedControlElement', + 'ToggleSwitchElement', + 'ToolTipElement', + 'XBannerElement', + 'AutocompleteElement', + 'ClipboardCopyElement', + 'RelativeTimeElement', + 'TabContainerElement', + 'PrimerMultiInputElement', + 'AutoCheckElement', + 'PrimerTextFieldElement', + 'ToggleSwitchInputElement', + 'ActionMenuElement', + 'DetailsDialogElement', + 'FileAttachmentElement', + 'FilterInputElement', + 'GEmojiElement', + 'MarkdownHeaderButtonElement', + 'MarkdownBoldButtonElement', + 'MarkdownItalicButtonElement', + 'MarkdownQuoteButtonElement', + 'MarkdownCodeButtonElement', + 'MarkdownLinkButtonElement', + 'MarkdownImageButtonElement', + 'MarkdownUnorderedListButtonElement', + 'MarkdownOrderedListButtonElement', + 'MarkdownTaskListButtonElement', + 'MarkdownMentionButtonElement', + 'MarkdownRefButtonElement', + 'MarkdownStrikethroughButtonElement', + 'MarkdownToolbarElement', + 'RemoteInputElement', + 'TaskListsElement', + 'TextExpanderElement', + 'TypingEffectElement', + 'FuzzyListElement', + 'GitCloneHelpElement', + 'MarkedTextElement', + 'PasswordStrengthElement', + 'PollIncludeFragmentElement', + 'SlashCommandExpanderElement', + 'TextSuggesterElement', + 'VirtualFilterInputElement', + 'VirtualListElement', + 'VisiblePasswordElement', + 'BatchDeferredContentElement', + 'Turbo', + 'litHtmlVersions', + 'WebauthnGetElement', + 'SudoCredentialOptionsElement', + 'CollapsibleSidebarWidgetElement', + 'SidebarMemexInputElement', + 'NotificationsListSubscriptionFormElement', + 'NotificationsTeamSubscriptionFormElement', + 'NotificationsDialogLabelItemElement', + 'NotificationsListSubscriptionFormDialogElement', + 'CommentActionsContainerElement', + 'DiscussionSpotlightPreviewElement', + 'DiscussionSpotlightContainerElement', + 'CommandPaletteModeElement', + 'CommandPaletteTipElement', + 'CommandPaletteScopeElement', + 'CommandPaletteTokenElement', + 'CommandPaletteItemGroupElement', + 'ClientDefinedProviderElement', + 'commandPalette', + 'CommandPalette', + 'ServerDefinedProviderElement', + 'CommandPaletteHelpElement', + 'CommandPaletteInputElement', + 'EditHistoryElement', + 'ExperimentalActionMenuElement', + 'InlineMachineTranslationElement', + 'CommandPaletteItemElement', + 'CommandPalettePageElement', + 'NotificationShelfWatcherElement', + 'CommandPalettePageStackElement', + 'CustomScopesElement', + 'DeferredSidePanelElement', + 'UserDrawerSidePanelElement', + 'SlashCommandToolbarButtonElement', + 'SiteHeaderLoggedInUserMenuElement', + 'NotificationIndicatorElement', + 'QueryBuilderElement', + 'QbsearchInputElement', + 'ReactionsMenuElement', + ], + }, + }, + ...fixupConfigRules(tsEslint.configs.disableTypeChecked).map((config) => ({ + ...config, + files: ['**/*.{js,jsx}', '**/eslint.config.mjs'], + })), + { + extends: [js.configs.recommended, ...tsEslint.configs.recommended, ...fixupConfigRules(compat.extends('plugin:storybook/recommended'))], + files: ['**/*.stories.{ts,tsx}'], + plugins: { + prettier, + 'react-refresh': reactRefresh, + }, + + languageOptions: { + globals: globals.browser, + ecmaVersion: 2020, + sourceType: 'script', + + parserOptions: { + project: './tsconfig.json', + tsconfigRootDir: '.', + }, + }, + }, + { + files: ['**/lingui.config.ts', 'src/locales/*/messages.d.ts', '.storybook/*.ts', 'mock-apis/**/*.ts'], + + languageOptions: { + ecmaVersion: 5, + sourceType: 'script', + + parserOptions: { + project: './tsconfig.eslint.json', + }, + }, + }, + { + files: ['**/vite.config.ts', '**/vite.config.test.ts'], + + languageOptions: { + ecmaVersion: 5, + sourceType: 'script', + + parserOptions: { + project: './tsconfig.node.json', + }, + }, + }, +) diff --git a/package.json b/package.json index 967d64b6..1d490c40 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "i18n:extract": "lingui extract", "lint:tsc": "tsc --noEmit", "lint:tsc:files": "tsc-files --noEmit", - "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", + "lint": "eslint . --max-warnings 0", "postinstall": "shx cp ./node_modules/trackjs/t.js ./public/t.min.js", "prebuild": "yarn i18n:compile", "prepare": "husky", @@ -33,22 +33,23 @@ }, "dependencies": { "@dagrejs/dagre": "^1.1.3", + "@emotion/cache": "11.13.1", "@emotion/react": "^11.13.0", "@emotion/styled": "^11.13.0", "@fontsource-variable/plus-jakarta-sans": "^5.0.21", "@lingui/macro": "^4.11.2", "@lingui/react": "^4.11.2", - "@mui/icons-material": "^5.16.5", + "@mui/icons-material": "^5.16.6", "@mui/lab": "^5.0.0-alpha.173", - "@mui/material": "^5.16.5", - "@mui/system": "^5.16.5", - "@mui/x-charts": "^7.11.1", - "@mui/x-data-grid-premium": "^7.11.1", - "@mui/x-date-pickers-pro": "^7.11.1", - "@mui/x-tree-view": "^7.11.1", - "@tanstack/react-query": "^5.51.15", + "@mui/material": "^5.16.6", + "@mui/system": "^5.16.6", + "@mui/x-charts": "^7.12.0", + "@mui/x-data-grid-premium": "^7.12.0", + "@mui/x-date-pickers-pro": "^7.12.0", + "@mui/x-tree-view": "^7.12.0", + "@tanstack/react-query": "^5.51.21", "@uidotdev/usehooks": "^2.4.1", - "axios": "^1.7.2", + "axios": "^1.7.3", "d3": "^7.9.0", "dayjs": "^1.11.12", "diff": "^5.2.0", @@ -59,13 +60,13 @@ "js-cookie": "^3.0.5", "lowlight": "^3.1.0", "mustache": "^4.2.0", - "posthog-js": "^1.150.1", - "qrcode": "^1.5.3", + "posthog-js": "^1.154.5", + "qrcode": "^1.5.4", "react": "^18.3.1", "react-dom": "^18.3.1", "react-error-boundary": "^4.0.13", "react-lazy-load-image-component": "^1.6.2", - "react-router-dom": "^6.25.1", + "react-router-dom": "^6.26.0", "react-transition-group": "^4.4.5", "react-window": "^1.8.10", "recharts": "^2.12.7", @@ -75,15 +76,18 @@ }, "devDependencies": { "@emotion/styled": "^11.13.0", + "@eslint/compat": "^1.1.1", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "^9.8.0", "@lingui/cli": "^4.11.2", "@lingui/swc-plugin": "^4.0.8", "@lingui/vite-plugin": "^4.11.2", - "@storybook/addon-essentials": "^8.2.6", - "@storybook/addon-links": "^8.2.6", - "@storybook/blocks": "^8.2.6", - "@storybook/react": "^8.2.6", - "@storybook/react-vite": "^8.2.6", - "@storybook/test": "^8.2.6", + "@storybook/addon-essentials": "^8.2.7", + "@storybook/addon-links": "^8.2.7", + "@storybook/blocks": "^8.2.7", + "@storybook/react": "^8.2.7", + "@storybook/react-vite": "^8.2.7", + "@storybook/test": "^8.2.7", "@testing-library/jest-dom": "^6.4.8", "@types/d3": "^7.4.3", "@types/diff": "^5.2.1", @@ -95,37 +99,37 @@ "@types/react-is": "^18.3.0", "@types/react-lazy-load-image-component": "^1.6.4", "@types/react-window": "^1.8.8", - "@typescript-eslint/eslint-plugin": "^7.17.0", - "@typescript-eslint/parser": "^7.17.0", "@vitejs/plugin-react-swc": "~3.7.0", - "@vitest/coverage-v8": "^1.6.0", - "@vitest/ui": "^1.6.0", + "@vitest/coverage-v8": "^2.0.5", + "@vitest/ui": "^2.0.5", "babel-plugin-macros": "3.1.0", "esbuild": "^0.23.0", - "eslint": "^8.57.0", + "eslint": "^9.8.0", "eslint-plugin-prettier": "^5.2.1", - "eslint-plugin-react-hooks": "^4.6.2", + "eslint-plugin-react-hooks": "^5.1.0-rc.0", "eslint-plugin-react-refresh": "^0.4.9", "eslint-plugin-storybook": "^0.8.0", - "husky": "^9.1.3", - "lint-staged": "^15.2.7", + "globals": "^15.9.0", + "husky": "^9.1.4", + "lint-staged": "^15.2.8", "prettier": "^3.3.3", - "prettier-plugin-organize-imports": "^3.2.4", + "prettier-plugin-organize-imports": "^4.0.0", "prop-types": "15", "react-refresh": "^0.14.2", "shx": "^0.3.4", - "storybook": "^8.2.6", + "storybook": "^8.2.7", "tsc-files": "^1.1.4", "type-fest": "^4.23.0", "typescript": "^5.5.4", + "typescript-eslint": "^8.0.1", "unique-names-generator": "^4.7.1", - "uuid": "^9.0.1", + "uuid": "^10.0.0", "vite": "^5.3.5", "vite-plugin-html": "^3.2.2", "vite-plugin-mock-dev-server": "^1.6.1", "vite-plugin-svgr": "^4.2.0", - "vitest": "^1.6.0", - "web-vitals": "^4.2.2" + "vitest": "^2.0.5", + "web-vitals": "^4.2.3" }, "browserslist": { "production": [ @@ -147,6 +151,9 @@ "yarn format:check" ] }, + "overrides": { + "eslint": "$eslint" + }, "engines": { "node": "^18.18.0 || ^20.9.0", "yarn": "^1.22.19" diff --git a/src/Main.tsx b/src/Main.tsx index dbe64665..597ac3f2 100644 --- a/src/Main.tsx +++ b/src/Main.tsx @@ -33,7 +33,7 @@ nonce = undefined // to log results (for example: reportWebVitals(console.info)) // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals if (env.isLocal) { - void import( + import( /* webpackChunkName: "reportWebVitals" */ './reportWebVitals' ).then((reportWebVitals) => { diff --git a/src/containers/panel/PanelInitialMessageHandler.tsx b/src/containers/panel/PanelInitialMessageHandler.tsx index f576549c..39df643a 100644 --- a/src/containers/panel/PanelInitialMessageHandler.tsx +++ b/src/containers/panel/PanelInitialMessageHandler.tsx @@ -3,8 +3,9 @@ import { AlertColor } from '@mui/material' import { useEffect } from 'react' import { useSearchParams } from 'react-router-dom' import { useSnackbar } from 'src/core/snackbar' -import { apiMessages } from 'src/shared/constants' +import type { apiMessages } from 'src/shared/constants' import { LiteralUnion } from 'src/shared/types/shared' +import { getLocationSearchValues, removeLocationSearchValues } from 'src/shared/utils/windowLocationSearch' type APIMessages = typeof apiMessages type PanelMessagesTypes = APIMessages[keyof APIMessages] @@ -21,24 +22,19 @@ const getPanelMessages = ( } export const PanelInitialMessageHandler = () => { - const [getSearch, setSearch] = useSearchParams() + const [getSearch] = useSearchParams() const message = getSearch.get('message') const { showSnackbar } = useSnackbar() useEffect(() => { if (message) { const foundMessage = getPanelMessages(message) if (foundMessage) { - void showSnackbar(foundMessage.text, { + showSnackbar(foundMessage.text, { severity: foundMessage.type, }) } - setSearch((prev) => { - prev.delete('message') - return prev - }) + window.location.search = removeLocationSearchValues(getLocationSearchValues(), 'message') } - // TODO: removed due to problem with setSearchParams changes with every route change - // eslint-disable-next-line react-hooks/exhaustive-deps }, [message, showSnackbar]) return <> } diff --git a/src/core/auth/AuthGuard.tsx b/src/core/auth/AuthGuard.tsx index b444291c..91416dc8 100644 --- a/src/core/auth/AuthGuard.tsx +++ b/src/core/auth/AuthGuard.tsx @@ -229,7 +229,7 @@ export function AuthGuard({ children }: PropsWithChildren) { ) setAxiosWithAuth(instance) setIsFetching(true) - void Promise.all([ + Promise.all([ handleRefreshWorkspaces(instance, true), getCurrentUserQuery(instance).then((currentUser) => { handleInternalSetAuth((prev) => ({ ...prev, currentUser })) diff --git a/src/core/auth/WorkspaceGuard.tsx b/src/core/auth/WorkspaceGuard.tsx index e366c5e6..286c00af 100644 --- a/src/core/auth/WorkspaceGuard.tsx +++ b/src/core/auth/WorkspaceGuard.tsx @@ -54,14 +54,14 @@ export const WorkspaceGuard = ({ value, children }: WorkspaceGuardProps) => { useEffect(() => { if (hashWorkspaceId && currentWorkspaceId !== hashWorkspaceId) { - void value.selectWorkspace(hashWorkspaceId) + value.selectWorkspace(hashWorkspaceId) } else if (currentWorkspaceId) { window.location.hash = currentWorkspaceId } if (!hashWorkspaceId) { const persistedWorkspaceId = getAuthData()?.selectedWorkspaceId || defaultWorkspaceId if (persistedWorkspaceId) { - void value.selectWorkspace(persistedWorkspaceId) + value.selectWorkspace(persistedWorkspaceId) } } }, [hashWorkspaceId, currentWorkspaceId, value, defaultWorkspaceId]) @@ -85,9 +85,9 @@ export const WorkspaceGuard = ({ value, children }: WorkspaceGuardProps) => { color={defaultWorkspaceId ? 'primary' : 'warning'} onClick={() => { if (defaultWorkspaceId) { - void value.selectWorkspace(defaultWorkspaceId) + value.selectWorkspace(defaultWorkspaceId) } else { - void value.logout() + value.logout() } }} > diff --git a/src/core/events/WebSocketEvents.tsx b/src/core/events/WebSocketEvents.tsx index 06426364..2dc74125 100644 --- a/src/core/events/WebSocketEvents.tsx +++ b/src/core/events/WebSocketEvents.tsx @@ -131,7 +131,7 @@ export const WebSocketEvents = ({ children }: PropsWithChildren) => { }) } if (ev.code === WS_SERVER_CLOSE_CODE_NO_RETRY) { - void showSnackbar( + showSnackbar( ev.reason === apiMessages.paymentOnHold ? t`Payment is required for your workspace, Please contact the workspace owner` : t`You don't have access to this workspace`, @@ -140,7 +140,7 @@ export const WebSocketEvents = ({ children }: PropsWithChildren) => { autoHideDuration: null, }, ) - void logout(true) + logout(true) } else if (ev.code !== WS_CLOSE_CODE_NO_RETRY && !noRetry.current) { if (isAuthenticated && selectedWorkspace?.id) { window.setTimeout(createWebSocket, retryTimeout) diff --git a/src/core/snackbar/SnackbarProvider.tsx b/src/core/snackbar/SnackbarProvider.tsx index b63bcac6..8f36b09d 100644 --- a/src/core/snackbar/SnackbarProvider.tsx +++ b/src/core/snackbar/SnackbarProvider.tsx @@ -168,16 +168,7 @@ export function SnackbarProvider({ children }: PropsWithChildren) { {children} {Object.entries(snackbars).map(([id, { open, message, options }], i) => ( - + ))} ) diff --git a/src/core/snackbar/useSnackbar.ts b/src/core/snackbar/useSnackbar.ts index 84e69c03..223ba259 100644 --- a/src/core/snackbar/useSnackbar.ts +++ b/src/core/snackbar/useSnackbar.ts @@ -3,6 +3,5 @@ import { SnackbarContext, SnackbarContextValue } from './SnackbarProvider' export function useSnackbar(): SnackbarContextValue { const context = useContext(SnackbarContext) - // eslint-disable-next-line @typescript-eslint/require-await return context ?? { closeSnackbar: async (_) => true, showSnackbar: async (_) => 0 } } diff --git a/src/locales/de-DE/messages.po b/src/locales/de-DE/messages.po index 72b42225..c3ce97a4 100644 --- a/src/locales/de-DE/messages.po +++ b/src/locales/de-DE/messages.po @@ -300,7 +300,7 @@ msgstr "Verzeichnis hinzufügen" msgid "Add external directory" msgstr "Externes Verzeichnis hinzufügen" -#: src/pages/panel/inventory-search/inventory-form/InventoryFormMore.tsx:64 +#: src/pages/panel/inventory-search/inventory-form/InventoryFormMore.tsx:65 msgid "Add Filter" msgstr "" @@ -477,7 +477,7 @@ msgstr "Automatisches Cloud Setup" msgid "AWS Marketplace" msgstr "AWS Marketplace" -#: src/containers/panel/PanelInitialMessageHandler.tsx:17 +#: src/containers/panel/PanelInitialMessageHandler.tsx:18 msgid "AWS Marketplace has been successfully subscribed" msgstr "AWS Marketplace wurde erfolgreich abonniert" @@ -704,7 +704,7 @@ msgstr "Schließen" #: src/pages/panel/benchmark-detail/BenchmarkDetailCheckDetail.tsx:165 #: src/pages/panel/inventory-search/inventory-form/InventoryFormCloudValues.tsx:62 -#: src/pages/panel/inventory-search/inventory-form/InventoryFormMore.tsx:96 +#: src/pages/panel/inventory-search/inventory-form/InventoryFormMore.tsx:97 #: src/pages/panel/resource-detail/ResourceDetailView.tsx:253 #: src/pages/panel/security/AccountCard.tsx:38 #: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:568 @@ -897,7 +897,7 @@ msgstr "" msgid "Credit or Debit Card" msgstr "" -#: src/containers/panel/PanelInitialMessageHandler.tsx:19 +#: src/containers/panel/PanelInitialMessageHandler.tsx:20 msgid "Credit/Debit Card has been successfully subscribed" msgstr "" @@ -1295,7 +1295,7 @@ msgstr "" msgid "History" msgstr "" -#: src/shared/error-boundary-fallback/ErrorBoundaryFallback.tsx:62 +#: src/shared/error-boundary-fallback/index.tsx:63 msgid "Homepage" msgstr "Startseite" @@ -1647,8 +1647,8 @@ msgstr "Neue Ausgaben" msgid "new non compliant resources in the past {since}" msgstr "neue nicht konforme Ressourcen in der Vergangenheit {since}" -#: src/pages/panel/user-settings/UserSettingsFormPassword.tsx:28 -#: src/pages/panel/user-settings/UserSettingsFormPassword.tsx:44 +#: src/pages/panel/user-settings/UserSettingsFormPassword.tsx:27 +#: src/pages/panel/user-settings/UserSettingsFormPassword.tsx:43 msgid "New Password" msgstr "Neues Kennwort" @@ -1787,7 +1787,7 @@ msgstr "Hoppla, der Benutzername oder das Passwort scheinen nicht mit unseren Au msgid "Oops! It looks like your query didn't match our format. Please check and try again." msgstr "Ups! Ihre Eingabe entspricht nicht unserem Format. Bitte überprüfen Sie sie und versuchen Sie es erneut." -#: src/shared/error-boundary-fallback/ErrorBoundaryFallback.tsx:38 +#: src/shared/error-boundary-fallback/index.tsx:39 msgid "Oops! Something went wrong." msgstr "Hoppla! Etwas ist schief gelaufen." @@ -1976,7 +1976,7 @@ msgstr "" msgid "Profile" msgstr "Profil" -#: src/pages/panel/inventory-search/inventory-form/InventoryFormMore.tsx:99 +#: src/pages/panel/inventory-search/inventory-form/InventoryFormMore.tsx:100 msgid "Properties" msgstr "" @@ -2018,7 +2018,7 @@ msgid "Regenerate" msgstr "Regenerieren" #: src/pages/panel/benchmark-detail/BenchmarkDetailCheckDetail.tsx:183 -#: src/pages/panel/inventory-search/inventory-form/InventoryFormMore.tsx:97 +#: src/pages/panel/inventory-search/inventory-form/InventoryFormMore.tsx:98 #: src/pages/panel/inventory-search/inventory-form/InventoryFormRegionValues.tsx:60 #: src/pages/panel/resource-detail/ResourceDetailView.tsx:258 msgid "Region" @@ -2328,7 +2328,7 @@ msgstr "Einige Prüfungen wurden für diese Ressource deaktiviert" #: src/pages/panel/resource-detail/ResourceDetailView.tsx:321 #: src/pages/panel/user-settings/UserSettingsFormEmail.tsx:33 -#: src/pages/panel/user-settings/UserSettingsFormPassword.tsx:23 +#: src/pages/panel/user-settings/UserSettingsFormPassword.tsx:22 #: src/pages/panel/user-settings/UserSettingsTotpActivationModal.tsx:107 #: src/pages/panel/user-settings/UserSettingsTotpActivationModal.tsx:110 #: src/pages/panel/user-settings/UserSettingsTotpDeactivationModal.tsx:39 @@ -2369,7 +2369,7 @@ msgstr "Abonnement erfolgreich zu {0} hinzugefügt" msgid "Successfully invited {email}" msgstr "{email} erfolgreich eingeladen" -#: src/pages/panel/inventory-search/inventory-form/InventoryFormMore.tsx:98 +#: src/pages/panel/inventory-search/inventory-form/InventoryFormMore.tsx:99 #: src/pages/panel/resource-detail/ResourceDetailView.tsx:331 msgid "Tags" msgstr "Stichworte" @@ -2511,7 +2511,7 @@ msgstr "TOTP-Setup" msgid "Trial" msgstr "Probezeit" -#: src/shared/error-boundary-fallback/ErrorBoundaryFallback.tsx:76 +#: src/shared/error-boundary-fallback/index.tsx:77 msgid "Try again" msgstr "Versuchen Sie es erneut" @@ -2561,7 +2561,7 @@ msgstr "Ungenutzte Datenbankinstanzen" msgid "Update Email" msgstr "E-Mail aktualisieren" -#: src/pages/panel/user-settings/UserSettingsFormPassword.tsx:32 +#: src/pages/panel/user-settings/UserSettingsFormPassword.tsx:31 msgid "Update Password" msgstr "Kennwort aktualisieren" @@ -2670,7 +2670,7 @@ msgstr "" msgid "We're sad to see you downgrade, but we're grateful to still have you with us on the free tier. If there's anything specific you're missing, please reach out to me personally at <0>lars@some.engineering. I'd love to hear from you and help in any way I can." msgstr "Es tut uns leid, dass Sie herunterstufen, aber wir sind dankbar, Sie weiterhin in unserer kostenlosen Stufe zu haben. Wenn Ihnen etwas Bestimmtes fehlt, wenden Sie sich bitte direkt an mich, <0>lars@some.engineering. Ich würde gerne von Ihnen hören und Ihnen so gut wie möglich helfen." -#: src/shared/error-boundary-fallback/ErrorBoundaryFallback.tsx:40 +#: src/shared/error-boundary-fallback/index.tsx:41 msgid "We're sorry for the inconvenience. Our team has been notified, and the issue is being looked into. Please try again in a few minutes. If the problem persists, feel free to contact us <0>on Discord. Thanks for your patience!" msgstr "Wir entschuldigen uns für die Unannehmlichkeiten. Unser Team wurde benachrichtigt und das Problem wird untersucht. Bitte versuchen Sie es in ein paar Minuten noch einmal. Wenn das Problem weiterhin besteht, können Sie uns gerne <0>auf Discord kontaktieren. Danke für Ihre Geduld!" diff --git a/src/locales/en-US/messages.po b/src/locales/en-US/messages.po index 20481a29..c6594a7b 100644 --- a/src/locales/en-US/messages.po +++ b/src/locales/en-US/messages.po @@ -300,7 +300,7 @@ msgstr "Add Directory" msgid "Add external directory" msgstr "Add external directory" -#: src/pages/panel/inventory-search/inventory-form/InventoryFormMore.tsx:64 +#: src/pages/panel/inventory-search/inventory-form/InventoryFormMore.tsx:65 msgid "Add Filter" msgstr "Add Filter" @@ -477,7 +477,7 @@ msgstr "Automatic Cloud Setup" msgid "AWS Marketplace" msgstr "AWS Marketplace" -#: src/containers/panel/PanelInitialMessageHandler.tsx:17 +#: src/containers/panel/PanelInitialMessageHandler.tsx:18 msgid "AWS Marketplace has been successfully subscribed" msgstr "AWS Marketplace has been successfully subscribed" @@ -704,7 +704,7 @@ msgstr "Close" #: src/pages/panel/benchmark-detail/BenchmarkDetailCheckDetail.tsx:165 #: src/pages/panel/inventory-search/inventory-form/InventoryFormCloudValues.tsx:62 -#: src/pages/panel/inventory-search/inventory-form/InventoryFormMore.tsx:96 +#: src/pages/panel/inventory-search/inventory-form/InventoryFormMore.tsx:97 #: src/pages/panel/resource-detail/ResourceDetailView.tsx:253 #: src/pages/panel/security/AccountCard.tsx:38 #: src/pages/panel/workspace-settings-accounts/WorkspaceSettingsAccountRow.tsx:568 @@ -897,7 +897,7 @@ msgstr "Creation Date" msgid "Credit or Debit Card" msgstr "Credit or Debit Card" -#: src/containers/panel/PanelInitialMessageHandler.tsx:19 +#: src/containers/panel/PanelInitialMessageHandler.tsx:20 msgid "Credit/Debit Card has been successfully subscribed" msgstr "Credit/Debit Card has been successfully subscribed" @@ -1295,7 +1295,7 @@ msgstr "Highest product tier this billing cycle" msgid "History" msgstr "History" -#: src/shared/error-boundary-fallback/ErrorBoundaryFallback.tsx:62 +#: src/shared/error-boundary-fallback/index.tsx:63 msgid "Homepage" msgstr "Homepage" @@ -1647,8 +1647,8 @@ msgstr "New issues" msgid "new non compliant resources in the past {since}" msgstr "new non compliant resources in the past {since}" -#: src/pages/panel/user-settings/UserSettingsFormPassword.tsx:28 -#: src/pages/panel/user-settings/UserSettingsFormPassword.tsx:44 +#: src/pages/panel/user-settings/UserSettingsFormPassword.tsx:27 +#: src/pages/panel/user-settings/UserSettingsFormPassword.tsx:43 msgid "New Password" msgstr "New Password" @@ -1787,7 +1787,7 @@ msgstr "Oops, the username or password doesn't seem to match our records. Please msgid "Oops! It looks like your query didn't match our format. Please check and try again." msgstr "Oops! It looks like your query didn't match our format. Please check and try again." -#: src/shared/error-boundary-fallback/ErrorBoundaryFallback.tsx:38 +#: src/shared/error-boundary-fallback/index.tsx:39 msgid "Oops! Something went wrong." msgstr "Oops! Something went wrong." @@ -1976,7 +1976,7 @@ msgstr "Product tier downgrade not available: User count exceeds the limits for msgid "Profile" msgstr "Profile" -#: src/pages/panel/inventory-search/inventory-form/InventoryFormMore.tsx:99 +#: src/pages/panel/inventory-search/inventory-form/InventoryFormMore.tsx:100 msgid "Properties" msgstr "Properties" @@ -2018,7 +2018,7 @@ msgid "Regenerate" msgstr "Regenerate" #: src/pages/panel/benchmark-detail/BenchmarkDetailCheckDetail.tsx:183 -#: src/pages/panel/inventory-search/inventory-form/InventoryFormMore.tsx:97 +#: src/pages/panel/inventory-search/inventory-form/InventoryFormMore.tsx:98 #: src/pages/panel/inventory-search/inventory-form/InventoryFormRegionValues.tsx:60 #: src/pages/panel/resource-detail/ResourceDetailView.tsx:258 msgid "Region" @@ -2328,7 +2328,7 @@ msgstr "Some checks have been disabled for this resource" #: src/pages/panel/resource-detail/ResourceDetailView.tsx:321 #: src/pages/panel/user-settings/UserSettingsFormEmail.tsx:33 -#: src/pages/panel/user-settings/UserSettingsFormPassword.tsx:23 +#: src/pages/panel/user-settings/UserSettingsFormPassword.tsx:22 #: src/pages/panel/user-settings/UserSettingsTotpActivationModal.tsx:107 #: src/pages/panel/user-settings/UserSettingsTotpActivationModal.tsx:110 #: src/pages/panel/user-settings/UserSettingsTotpDeactivationModal.tsx:39 @@ -2369,7 +2369,7 @@ msgstr "Subscription successfully added to {0}" msgid "Successfully invited {email}" msgstr "Successfully invited {email}" -#: src/pages/panel/inventory-search/inventory-form/InventoryFormMore.tsx:98 +#: src/pages/panel/inventory-search/inventory-form/InventoryFormMore.tsx:99 #: src/pages/panel/resource-detail/ResourceDetailView.tsx:331 msgid "Tags" msgstr "Tags" @@ -2511,7 +2511,7 @@ msgstr "TOTP Setup" msgid "Trial" msgstr "Trial" -#: src/shared/error-boundary-fallback/ErrorBoundaryFallback.tsx:76 +#: src/shared/error-boundary-fallback/index.tsx:77 msgid "Try again" msgstr "Try again" @@ -2561,7 +2561,7 @@ msgstr "Unused Database Instances" msgid "Update Email" msgstr "Update Email" -#: src/pages/panel/user-settings/UserSettingsFormPassword.tsx:32 +#: src/pages/panel/user-settings/UserSettingsFormPassword.tsx:31 msgid "Update Password" msgstr "Update Password" @@ -2670,7 +2670,7 @@ msgstr "We use cookies and other tracking technologies to analyze site usage and msgid "We're sad to see you downgrade, but we're grateful to still have you with us on the free tier. If there's anything specific you're missing, please reach out to me personally at <0>lars@some.engineering. I'd love to hear from you and help in any way I can." msgstr "We're sad to see you downgrade, but we're grateful to still have you with us on the free tier. If there's anything specific you're missing, please reach out to me personally at <0>lars@some.engineering. I'd love to hear from you and help in any way I can." -#: src/shared/error-boundary-fallback/ErrorBoundaryFallback.tsx:40 +#: src/shared/error-boundary-fallback/index.tsx:41 msgid "We're sorry for the inconvenience. Our team has been notified, and the issue is being looked into. Please try again in a few minutes. If the problem persists, feel free to contact us <0>on Discord. Thanks for your patience!" msgstr "We're sorry for the inconvenience. Our team has been notified, and the issue is being looked into. Please try again in a few minutes. If the problem persists, feel free to contact us <0>on Discord. Thanks for your patience!" diff --git a/src/pages/auth/forgot-password/ForgotPasswordPage.tsx b/src/pages/auth/forgot-password/ForgotPasswordPage.tsx index ce3d5958..e8cd0fbd 100644 --- a/src/pages/auth/forgot-password/ForgotPasswordPage.tsx +++ b/src/pages/auth/forgot-password/ForgotPasswordPage.tsx @@ -27,7 +27,7 @@ export default function ForgotPasswordPage() { e.preventDefault() if (email) { setIsLoading(true) - void forgotPassword({ email, redirectUrl: window.encodeURIComponent(getSearch.get('returnUrl') ?? '/') }).finally(() => + forgotPassword({ email, redirectUrl: window.encodeURIComponent(getSearch.get('returnUrl') ?? '/') }).finally(() => setIsLoading(false), ) } diff --git a/src/pages/panel/inventory-search/InventoryAdvanceSearchInfo.tsx b/src/pages/panel/inventory-search/InventoryAdvanceSearchInfo.tsx index 2d6652a7..a81d3cce 100644 --- a/src/pages/panel/inventory-search/InventoryAdvanceSearchInfo.tsx +++ b/src/pages/panel/inventory-search/InventoryAdvanceSearchInfo.tsx @@ -58,7 +58,7 @@ export const InventoryAdvanceSearchInfo = () => { Fix supports full text search by encasing the search term in double quotes. For instance, - -