From 3bfcc509d29f873f377006090be8a816b5f48298 Mon Sep 17 00:00:00 2001 From: Vinh Date: Wed, 16 Oct 2019 05:56:38 +0700 Subject: [PATCH] =?UTF-8?q?[CORL-678]=C2=A0Transition=20to=20eslint=20(#26?= =?UTF-8?q?34)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: setup eslint * chore: tslint checks with types & check for import order * chore: complete eslint transition * fix: tests * fix: linting after rebase, faster lint for lint-staged * chore: remove line * fix: lint rules * feat: add a11y linter and fix errors * fix: tests --- .eslintignore | 3 + .eslintrc.js | 206 +++ .vscode/extensions.json | 5 +- .vscode/settings.json | 47 +- package-lock.json | 1468 +++++++++-------- package.json | 28 +- scripts/WebpackDevServerUtils.js | 5 +- scripts/build.ts | 2 +- scripts/compileRelay.ts | 10 +- scripts/generateSchemaTypes.js | 5 +- scripts/migration/create.ts | 2 +- scripts/start.ts | 2 +- scripts/test.js | 2 +- scripts/watcher/CommandExecutor.ts | 6 +- scripts/watcher/LongRunningExecutor.ts | 8 +- scripts/watcher/SaneWatcher.ts | 4 +- scripts/watcher/bin/watcher.ts | 4 +- scripts/watcher/watch.ts | 8 +- scripts/webpackHotDevClient.js | 2 +- src/core/build/createWebpackConfig.ts | 4 +- src/core/build/loaders/locales-loader.js | 1 - src/core/build/postcss.config.js | 6 - src/core/client/account/App/App.tsx | 23 +- src/core/client/account/index.tsx | 3 +- src/core/client/account/locales.ts | 1 + src/core/client/account/routes/NotFound.tsx | 3 +- .../download/Download/DownloadRoute.tsx | 8 +- .../routes/download/Download/Sorry.tsx | 2 +- .../routes/email/Confirm/ConfirmRoute.tsx | 8 +- .../Unsubscribe/UnsubscribeRoute.tsx | 8 +- .../routes/password/Reset/ResetRoute.tsx | 6 +- .../__snapshots__/resetPassword.spec.tsx.snap | 1 + .../client/account/test/confirmEmail.spec.tsx | 4 +- .../account/test/resetPassword.spec.tsx | 4 +- src/core/client/admin/App/App.tsx | 23 +- .../App/DecisionHistory/ApprovedComment.tsx | 4 +- .../DecisionHistoryContainer.tsx | 5 +- .../DecisionHistoryItemContainer.tsx | 7 +- .../DecisionHistory/DecisionHistoryQuery.tsx | 3 +- .../App/DecisionHistory/RejectedComment.tsx | 4 +- src/core/client/admin/App/Main.spec.tsx | 2 +- src/core/client/admin/App/MainRoute.tsx | 4 +- .../App/Navigation/NavigationContainer.tsx | 3 +- .../admin/App/UserMenu/UserMenuContainer.tsx | 3 +- .../client/admin/components/AutoLoadMore.tsx | 2 +- .../ModerateCard/ApproveButton.spec.tsx | 4 +- .../ModerateCard/CommentContent.spec.tsx | 4 +- .../ModerateCard/CommentRevisionContainer.tsx | 5 +- .../ModerateCard/FeatureCommentMutation.ts | 3 +- .../ModerateCard/FlagDetailsContainer.tsx | 5 +- .../ModerateCard/FlagDetailsEntry.tsx | 1 + .../ModerateCard/MarkersContainer.tsx | 6 +- .../ModerateCard/ModerateCardContainer.tsx | 21 +- .../ModerateCardDetailsContainer.tsx | 6 +- .../ModerateCard/ModeratedByContainer.tsx | 5 +- .../ModerateCard/RejectButton.spec.tsx | 4 +- .../ModerateCard/UnfeatureCommentMutation.ts | 1 + .../AccountHistoryAction.tsx | 10 +- .../RecentHistoryContainer.tsx | 6 +- .../UserHistoryDrawer/UserBadgesContainer.tsx | 4 +- .../UserDrawerAccountHistory.tsx | 4 +- .../UserDrawerAccountHistoryQuery.tsx | 6 +- .../UserHistoryDrawerAllComments.tsx | 12 +- .../UserHistoryDrawerAllCommentsQuery.tsx | 4 +- .../UserHistoryDrawerContainer.tsx | 5 +- .../UserHistoryDrawerQuery.tsx | 3 +- .../UserHistoryDrawerRejectedComments.tsx | 12 +- ...UserHistoryDrawerRejectedCommentsQuery.tsx | 6 +- .../UserStatusDetailsContainer.tsx | 5 +- .../UserRole/UpdateUserRoleMutation.ts | 3 +- .../components/UserRole/UserRoleChange.tsx | 3 +- .../UserRole/UserRoleChangeContainer.tsx | 5 +- .../admin/components/UserStatus/BanModal.tsx | 12 +- .../components/UserStatus/BanUserMutation.ts | 3 +- .../components/UserStatus/PremodModal.tsx | 8 +- .../UserStatus/PremodUserMutation.ts | 3 +- .../UserStatus/RemoveUserBanMutation.ts | 3 +- .../UserStatus/RemoveUserPremodMutation.ts | 3 +- .../RemoveUserSuspensionMutation.ts | 3 +- .../UserStatus/SuspendUserMutation.ts | 3 +- .../components/UserStatus/UserStatus.tsx | 8 +- .../UserStatus/UserStatusChangeContainer.tsx | 5 +- .../UserStatus/UserStatusContainer.tsx | 3 +- src/core/client/admin/index.tsx | 3 +- src/core/client/admin/locales.ts | 1 + .../admin/mutations/ApproveCommentMutation.ts | 3 +- .../admin/mutations/RejectCommentMutation.ts | 3 +- .../mutations/SetRedirectPathMutation.spec.ts | 4 +- src/core/client/admin/permissions.tsx | 5 +- src/core/client/admin/routeConfig.tsx | 1 + .../admin/routes/AuthCheck/AuthCheckRoute.tsx | 7 +- .../routes/AuthCheck/RestrictedContainer.tsx | 3 +- .../admin/routes/Community/CommunityRoute.tsx | 3 +- .../InviteUsers/InviteUsersContainer.tsx | 5 +- .../InviteUsers/InviteUsersMutation.ts | 3 +- .../routes/Community/UserRowContainer.tsx | 7 +- .../admin/routes/Community/UserTable.tsx | 8 +- .../routes/Community/UserTableContainer.tsx | 7 +- .../client/admin/routes/Configure/Layout.tsx | 3 +- .../admin/routes/Configure/Subheader.tsx | 3 +- .../Configure/UpdateSettingsMutation.ts | 3 +- .../Advanced/AdvancedConfigContainer.tsx | 3 +- .../sections/Advanced/AdvancedConfigRoute.tsx | 3 +- .../CommentStreamLiveUpdatesContainer.tsx | 3 +- .../Advanced/CustomCSSConfigContainer.tsx | 3 +- .../sections/Advanced/EmbedCodeContainer.tsx | 3 +- .../PermittedDomainsConfigContainer.tsx | 3 +- .../sections/Advanced/StoryCreationConfig.tsx | 2 +- .../Advanced/StoryCreationConfigContainer.tsx | 3 +- .../sections/Auth/AccountFeaturesConfig.tsx | 2 +- .../Auth/AccountFeaturesConfigContainer.tsx | 5 +- .../sections/Auth/AuthConfigContainer.tsx | 5 +- .../sections/Auth/AuthConfigRoute.tsx | 3 +- .../Auth/ConfigBoxWithToggleField.tsx | 2 +- .../Auth/DiscoverOIDCConfigurationFetch.ts | 3 +- .../sections/Auth/FacebookConfigContainer.tsx | 3 +- .../sections/Auth/GoogleConfigContainer.tsx | 3 +- .../Auth/LocalAuthConfigContainer.tsx | 3 +- .../sections/Auth/OIDCConfigContainer.tsx | 7 +- .../sections/Auth/RegenerateSSOKeyMutation.ts | 3 +- .../sections/Auth/SSOConfigContainer.tsx | 3 +- .../sections/Auth/SSOKeyFieldContainer.tsx | 3 +- .../sections/Auth/SessionConfigContainer.tsx | 4 +- .../sections/Auth/TargetFilterField.tsx | 2 +- .../sections/Email/EmailConfigContainer.tsx | 3 +- .../sections/Email/EmailConfigRoute.tsx | 3 +- .../sections/Email/FromContainer.tsx | 3 +- .../sections/Email/SMTPContainer.tsx | 3 +- .../ClosedStreamMessageConfigContainer.tsx | 3 +- .../ClosingCommentStreamsConfigContainer.tsx | 3 +- .../General/CommentEditingConfigContainer.tsx | 3 +- .../sections/General/CommentLengthConfig.tsx | 5 +- .../General/CommentLengthConfigContainer.tsx | 3 +- .../General/GeneralConfigContainer.tsx | 3 +- .../sections/General/GeneralConfigRoute.tsx | 3 +- .../General/GuidelinesConfigContainer.tsx | 3 +- .../General/LocaleConfigContainer.tsx | 3 +- .../sections/General/ReactionConfig.tsx | 3 +- .../General/ReactionConfigContainer.tsx | 3 +- .../SitewideCommentingConfigContainer.tsx | 3 +- .../Moderation/AkismetConfigContainer.tsx | 3 +- .../Moderation/ModerationConfigContainer.tsx | 3 +- .../Moderation/ModerationConfigRoute.tsx | 3 +- .../Moderation/PerspectiveConfigContainer.tsx | 3 +- .../PreModerationConfigContainer.tsx | 3 +- .../RecentCommentHistoryConfigContainer.tsx | 3 +- .../OrganizationConfigContainer.tsx | 3 +- .../Organization/OrganizationConfigRoute.tsx | 3 +- ...rganizationContactEmailConfigContainer.tsx | 3 +- .../OrganizationNameConfigContainer.tsx | 3 +- .../OrganizationURLConfigContainer.tsx | 3 +- .../BannedWordListConfigContainer.tsx | 3 +- .../SuspectWordListConfigContainer.tsx | 3 +- .../WordList/WordListConfigContainer.tsx | 3 +- .../sections/WordList/WordListConfigRoute.tsx | 3 +- .../ForgotPasswordContainer.tsx | 1 + .../ForgotPassword/ForgotPasswordRoute.tsx | 4 +- .../Invite/InviteCompleteFormContainer.tsx | 3 +- .../admin/routes/Invite/InviteRoute.tsx | 17 +- .../admin/routes/Invite/SuccessContainer.tsx | 3 +- .../Login/AccountCompletionContainer.tsx | 7 +- .../client/admin/routes/Login/LoginRoute.tsx | 5 +- .../admin/routes/Login/SetAuthViewMutation.ts | 3 +- .../AddEmailAddressContainer.tsx | 2 +- .../views/AddEmailAddress/SetEmailMutation.ts | 3 +- .../CreatePasswordContainer.tsx | 2 +- .../CreatePassword/SetPasswordMutation.ts | 3 +- .../CreateUsernameContainer.tsx | 2 +- .../CreateUsername/SetUsernameMutation.ts | 3 +- .../views/SignIn/ClearAuthErrorMutation.ts | 3 +- .../Login/views/SignIn/SignInContainer.tsx | 5 +- .../SignIn/SignInWithFacebookContainer.tsx | 3 +- .../SignIn/SignInWithGoogleContainer.tsx | 3 +- .../views/SignIn/SignInWithOIDCContainer.tsx | 3 +- .../routes/Moderate/ModerateContainer.tsx | 3 +- ...derateCountsCommentEnteredSubscription.tsx | 3 +- .../ModerateCountsCommentLeftSubscription.tsx | 3 +- .../ModerateNavigationContainer.tsx | 5 +- .../ModerationCountsSubscription.tsx | 3 +- .../ModerateNavigation/Navigation.spec.tsx | 3 +- .../ModerateNavigation/changeQueueCount.ts | 5 +- .../Moderate/ModerateSearchBar/Field.tsx | 2 +- .../ModerateSearchBar/ModerateAllOption.tsx | 8 +- .../ModerateSearchBarContainer.tsx | 7 +- .../Moderate/ModerateSearchBar/Option.tsx | 10 +- .../ModerateSearchBar/SearchStoryFetch.ts | 3 +- .../ModerateSearchBar/SeeAllOption.tsx | 8 +- .../routes/Moderate/Queue/EmptyMessage.tsx | 2 +- .../Queue/QueueCommentEnteredSubscription.tsx | 3 +- .../Queue/QueueCommentLeftSubscription.tsx | 3 +- .../routes/Moderate/Queue/QueueRoute.tsx | 23 +- .../Moderate/Queue/RejectedQueueRoute.tsx | 15 +- .../SingleModerate/SingleModerateRoute.tsx | 5 +- .../SingleModerateSubscription.tsx | 3 +- src/core/client/admin/routes/NotFound.tsx | 3 +- .../admin/routes/Stories/StoriesRoute.tsx | 9 +- .../client/admin/routes/Stories/StoryRow.tsx | 3 +- .../routes/Stories/StoryRowContainer.tsx | 5 +- .../Stories/StoryStatus/CloseStoryMutation.ts | 3 +- .../Stories/StoryStatus/OpenStoryMutation.ts | 3 +- .../Stories/StoryStatus/StoryStatusChange.tsx | 3 +- .../StoryStatusChangeContainer.tsx | 5 +- .../Stories/StoryStatus/StoryStatusText.tsx | 2 +- .../admin/routes/Stories/StoryTable.tsx | 6 +- .../routes/Stories/StoryTableContainer.tsx | 5 +- .../createPassword.spec.tsx.snap | 5 + .../signInWithEmail.spec.tsx.snap | 6 + .../admin/test/auth/redirectLoggedIn.spec.tsx | 2 +- .../admin/test/auth/signInWithEmail.spec.tsx | 2 +- .../__snapshots__/community.spec.tsx.snap | 8 +- .../components/UserHistoryDrawer/harness.tsx | 37 +- .../__snapshots__/auth.spec.tsx.snap | 9 + .../__snapshots__/moderation.spec.tsx.snap | 2 + .../client/admin/test/configure/auth.spec.tsx | 8 +- .../admin/test/configure/wordList.spec.tsx | 2 +- .../decisionHistory.spec.tsx.snap | 2 +- .../invite/__snapshots__/invite.spec.tsx.snap | 1 + .../__snapshots__/searchBar.spec.tsx.snap | 4 +- .../test/moderate/singleComment.spec.tsx | 2 +- .../__snapshots__/stories.spec.tsx.snap | 8 +- .../admin/test/stories/stories.spec.tsx | 12 +- .../AccountCompletionContainer.tsx | 7 +- src/core/client/auth/App/AppContainer.tsx | 7 +- src/core/client/auth/App/AppQuery.tsx | 3 +- .../auth/components/Header/Subtitle.tsx | 1 + .../client/auth/components/Header/Title.tsx | 1 + src/core/client/auth/hooks/useResizePopup.ts | 2 +- src/core/client/auth/locales.ts | 1 + .../client/auth/mutations/SetViewMutation.ts | 3 +- .../createPassword.spec.tsx.snap | 5 + .../test/__snapshots__/signIn.spec.tsx.snap | 9 + .../test/__snapshots__/signUp.spec.tsx.snap | 13 + .../client/auth/test/forgotPassword.spec.tsx | 8 +- src/core/client/auth/test/mockWindow.ts | 1 + .../views/CreatePassword/CreatePassword.tsx | 2 +- .../ForgotPasswordContainer.tsx | 3 +- .../auth/views/SignIn/ClearErrorMutation.ts | 3 +- .../auth/views/SignIn/SignInContainer.tsx | 5 +- .../views/SignIn/SignInWithEmailContainer.tsx | 3 +- .../SignIn/SignInWithFacebookContainer.tsx | 3 +- .../SignIn/SignInWithGoogleContainer.tsx | 3 +- .../views/SignIn/SignInWithOIDCContainer.tsx | 3 +- .../auth/views/SignUp/SignUpContainer.tsx | 3 +- .../views/SignUp/SignUpWithEmailContainer.tsx | 3 +- .../SignUp/SignUpWithFacebookContainer.tsx | 3 +- .../SignUp/SignUpWithGoogleContainer.tsx | 3 +- .../views/SignUp/SignUpWithOIDCContainer.tsx | 3 +- .../client/count/getCurrentScriptOrigin.ts | 6 +- src/core/client/embed/StreamEmbed.spec.ts | 10 +- src/core/client/embed/StreamEmbed.ts | 2 +- .../embed/decorators/withClickEvent.spec.ts | 2 +- .../embed/decorators/withLiveCommentCount.ts | 4 +- .../embed/decorators/withPymStorage.spec.ts | 5 +- .../client/embed/decorators/withPymStorage.ts | 2 +- .../embed/decorators/withSetCommentID.spec.ts | 2 +- src/core/client/embed/test/basic.spec.ts | 9 +- src/core/client/embed/test/count.spec.ts | 5 +- .../client/embed/utils/prefixStorage.spec.ts | 4 +- src/core/client/embed/utils/prefixStorage.ts | 2 +- .../framework/components/PasswordField.tsx | 9 +- .../MarkdownEditor/MarkdownEditor.tsx | 28 +- .../client/framework/helpers/getViewer.ts | 3 +- .../framework/helpers/resolveStoryURL.ts | 2 +- .../framework/lib/bootstrap/SendPymReady.tsx | 1 + .../framework/lib/bootstrap/createManaged.tsx | 4 +- .../framework/lib/bootstrap/withContext.tsx | 1 + .../lib/errors/invalidRequestError.ts | 5 +- .../client/framework/lib/externalConfig.ts | 3 +- .../framework/lib/form/SubmitHookHandler.tsx | 2 +- .../lib/form/withSubmitHookContext.ts | 1 + .../framework/lib/i18n/generateBundles.ts | 9 +- .../client/framework/lib/i18n/getMessage.ts | 2 +- .../lib/i18n/types/FluentShortNumber.spec.ts | 1 + .../lib/i18n/types/FluentShortNumber.ts | 6 +- .../createManagedSubscriptionClient.ts | 1 + .../framework/lib/network/extractError.ts | 2 +- src/core/client/framework/lib/postMessage.ts | 6 +- src/core/client/framework/lib/relay/lookup.ts | 2 +- .../framework/lib/relay/subscription.tsx | 4 +- src/core/client/framework/lib/relay/types.ts | 2 +- .../client/framework/lib/relay/useLoadMore.ts | 2 +- .../client/framework/lib/relay/useLocal.tsx | 2 +- .../client/framework/lib/relay/useRefetch.ts | 2 +- .../lib/relay/withFragmentContainer.ts | 7 +- .../lib/relay/withLocalStateContainer.tsx | 3 +- .../lib/relay/wrapFetchWithLogger.ts | 4 +- .../framework/lib/router/withRouteConfig.ts | 8 +- .../framework/lib/storage/InMemoryStorage.ts | 2 +- .../lib/storage/PromisifiedStorage.ts | 2 +- .../framework/lib/storage/PymStorage.ts | 6 +- .../lib/storage/prefixStorage.spec.ts | 1 + .../framework/lib/storage/prefixStorage.ts | 2 +- .../framework/mutations/SignOutMutation.ts | 4 +- src/core/client/framework/schema/custom.ts | 3 +- .../testHelpers/TransitionControl.tsx | 3 +- .../framework/testHelpers/byLabelText.ts | 4 +- .../client/framework/testHelpers/byText.ts | 1 + .../framework/testHelpers/createFixture.ts | 6 +- .../testHelpers/createFluentBundle.ts | 11 +- .../testHelpers/createMutationResolverStub.ts | 5 +- .../testHelpers/createRelayEnvironment.ts | 13 +- .../testHelpers/createResolversStub.ts | 4 +- .../testHelpers/createSubscriptionHandler.ts | 4 +- .../testHelpers/createTestRenderer.tsx | 2 +- .../testHelpers/overwriteQueryResolver.ts | 7 +- .../testHelpers/removeFragmentRefs.ts | 2 +- .../client/framework/testHelpers/within.ts | 10 +- src/core/client/framework/utils/buildURL.ts | 2 +- src/core/client/framework/utils/jsonp.ts | 7 +- .../client/framework/utils/parseHashQuery.ts | 2 +- src/core/client/install/locales.ts | 1 + src/core/client/stream/App/App.tsx | 2 +- src/core/client/stream/App/AppContainer.tsx | 4 +- src/core/client/stream/App/TabBar.tsx | 2 +- .../client/stream/App/TabBarContainer.tsx | 2 +- src/core/client/stream/App/TabBarQuery.tsx | 3 +- .../listeners/OnPostMessageSetAccessToken.ts | 2 +- .../client/stream/App/listeners/OnPymLogin.ts | 2 +- .../stream/App/listeners/OnPymLogout.ts | 10 +- .../stream/App/listeners/OnPymSetCommentID.ts | 2 +- .../common/HTMLContent/HTMLContent.spec.tsx | 2 +- .../stream/common/MessageBox/MessageBox.tsx | 3 +- .../UserBox/SetAuthPopupStateMutation.ts | 1 - .../common/UserBox/UserBoxContainer.spec.tsx | 30 +- .../common/UserBox/UserBoxContainer.tsx | 7 +- src/core/client/stream/locales.ts | 1 + .../mutations/SetCommentIDMutation.spec.ts | 3 +- .../stream/mutations/SetCommentIDMutation.ts | 3 +- src/core/client/stream/permissions.tsx | 5 +- .../Comment/AuthorBadgesContainer.tsx | 4 +- .../Comments/Comment/CommentContainer.tsx | 17 +- .../EditCommentFormContainer.tsx | 4 +- .../EditCommentForm/EditCommentMutation.ts | 4 +- .../ApproveCommentMutation.ts | 1 + .../ModerationDropdown/CaretContainer.tsx | 5 +- .../FeatureCommentMutation.ts | 1 + .../ModerationActionBanContainer.tsx | 3 +- .../ModerationActionBanQuery.tsx | 3 +- .../ModerationActionsContainer.tsx | 7 +- .../ModerationDropdownContainer.tsx | 5 +- .../RejectCommentMutation.ts | 1 + .../RejectedTombstoneContainer.tsx | 3 +- .../UnfeatureCommentMutation.ts | 1 + .../PermalinkButtonContainer.tsx | 8 +- .../CreateCommentReactionMutation.ts | 2 +- .../ReactionButtonContainer.tsx | 13 +- .../RemoveCommentReactionMutation.ts | 2 +- .../CreateCommentReplyMutation.ts | 12 +- .../ReplyCommentFormContainer.spec.tsx | 4 +- .../ReplyCommentFormContainer.tsx | 5 +- .../Comment/ReplyEditSubmitStatus.tsx | 3 +- .../ReportButton/ReportButtonContainer.tsx | 10 +- .../ReportButton/ReportButtonWithPopover.tsx | 5 +- .../ReportCommentFormContainer.tsx | 3 +- .../Comment/ReportPopover/ReportPopover.tsx | 1 + .../Comments/Comment/ShowConversationLink.tsx | 5 +- .../Comment/UserBanPopover/BanUserMutation.ts | 1 + .../UserBanPopoverContainer.tsx | 5 +- .../UserIgnorePopover/IgnoreUserMutation.ts | 3 +- .../UserIgnorePopoverContainer.tsx | 5 +- .../UserPopover/UserPopoverContainer.tsx | 1 + .../UserPopoverOverviewContainer.tsx | 7 +- .../Comments/Comment/UserTagsContainer.tsx | 3 +- .../Username/UsernameWithPopoverContainer.tsx | 5 +- .../stream/tabs/Comments/CommentsPane.tsx | 1 + .../IgnoredTombstoneOrHideContainer.tsx | 6 +- .../client/stream/tabs/Comments/Indent.tsx | 2 +- .../ConversationThreadContainer.tsx | 13 +- .../PermalinkView/PermalinkView.spec.tsx | 2 +- .../Comments/PermalinkView/PermalinkView.tsx | 7 +- .../PermalinkView/PermalinkViewContainer.tsx | 9 +- .../PermalinkView/PermalinkViewQuery.tsx | 5 +- .../client/stream/tabs/Comments/RTE/RTE.tsx | 20 +- .../RTE/__snapshots__/RTE.spec.tsx.snap | 12 +- .../tabs/Comments/RefreshSettingsFetch.ts | 1 + .../RemainingCharacters.tsx | 3 +- .../CommentReplyCreatedSubscription.tsx | 3 +- .../ReplyList/LocalReplyListContainer.tsx | 1 + .../tabs/Comments/ReplyList/ReplyList.tsx | 8 +- .../Comments/ReplyList/ReplyListContainer.tsx | 3 +- .../AllCommentsTabContainer.tsx | 7 +- .../AllCommentsTab/AllCommentsTabQuery.tsx | 10 +- .../CommentCreatedSubscription.tsx | 5 +- .../CommentReleasedSubscription.tsx | 5 +- .../CommunityGuidelinesContainer.tsx | 6 +- .../StreamDeletionRequestCalloutContainer.tsx | 5 +- .../FeaturedCommentContainer.tsx | 11 +- .../FeaturedCommentsContainer.tsx | 7 +- .../FeaturedCommentsQuery.tsx | 5 +- .../Comments/Stream/MessageBoxContainer.tsx | 5 +- .../PostCommentForm/CreateCommentMutation.ts | 8 +- .../PostCommentForm/PostCommentForm.tsx | 2 +- .../PostCommentFormContainer.spec.tsx | 3 +- .../PostCommentFormContainer.tsx | 15 +- .../PostCommentForm/PostCommentFormFake.tsx | 2 +- .../PostCommentSubmitStatusContainer.tsx | 3 +- .../tabs/Comments/Stream/SortMenu.spec.tsx | 2 +- .../StoryClosedTimeoutContainer.tsx | 3 +- .../tabs/Comments/Stream/StreamContainer.tsx | 20 +- .../tabs/Comments/Stream/StreamQuery.tsx | 5 +- .../Stream/SuspendedInfo/SuspendedInfo.tsx | 1 - .../SuspendedInfo/SuspendedInfoContainer.tsx | 8 +- .../Comments/Stream/useCommentCountEvent.ts | 1 + .../Comments/helpers/cleanupRTEEmptyHTML.ts | 1 + .../helpers/getCommentBodyValidators.ts | 1 + .../helpers/getHTMLCharacterLength.ts | 1 + .../tabs/Comments/helpers/getHTMLText.ts | 4 +- .../tabs/Comments/helpers/getSubmitStatus.ts | 1 + .../helpers/shouldTriggerSettingsRefresh.ts | 1 + .../tabs/Configure/ConfigureContainer.tsx | 1 + .../stream/tabs/Configure/ConfigureQuery.tsx | 5 +- .../ConfigureStreamContainer.tsx | 5 +- .../LiveUpdatesConfig/LiveUpdatesConfig.tsx | 3 +- .../LiveUpdatesConfigContainer.tsx | 1 + .../MessageBoxConfigContainer.tsx | 1 + .../PremodConfig/PremodConfigContainer.tsx | 1 + .../PremodLinksConfig/PremodLinksConfig.tsx | 3 +- .../PremodLinksConfigContainer.tsx | 1 + .../OpenOrCloseStreamContainer.tsx | 5 +- .../CommentHistoryContainer.tsx | 3 +- .../HistoryCommentContainer.tsx | 7 +- .../DeletionRequestCalloutContainer.tsx | 3 +- .../client/stream/tabs/Profile/Profile.tsx | 3 +- .../stream/tabs/Profile/ProfileContainer.tsx | 1 + .../stream/tabs/Profile/ProfileQuery.tsx | 5 +- .../Settings/AccountSettingsContainer.tsx | 5 +- .../ChangeEmail/ChangeEmailContainer.tsx | 8 +- .../ChangeEmail/UpdateEmailMutation.ts | 1 + .../Settings/ChangePasswordContainer.tsx | 5 +- .../ChangeUsernameContainer.tsx | 5 +- .../ChangeUsername/UpdateUsernameMutation.tsx | 1 + .../DeleteAccount/DeleteAccountContainer.tsx | 3 +- .../DeleteAccount/Pages/ConfirmPage.tsx | 3 +- .../Pages/DownloadCommentsPage.tsx | 2 +- .../Pages/RequestAccountDeletionMutation.tsx | 1 + .../Settings/DownloadCommentsContainer.tsx | 3 +- .../Settings/IgnoreUserSettingsContainer.tsx | 6 +- .../NotificationSettingsContainer.tsx | 3 +- .../Settings/RemoveUserIgnoreMutation.ts | 1 + .../UpdateNotificationSettingsMutation.ts | 1 + .../Settings/UpdatePasswordMutation.tsx | 1 + .../renderFeaturedStream.spec.tsx.snap | 4 +- .../__snapshots__/permalinkView.spec.tsx.snap | 20 +- ...permalinkViewLoadMoreParents.spec.tsx.snap | 16 +- .../permalink/permalinkViewPostReply.spec.tsx | 1 + .../__snapshots__/editComment.spec.tsx.snap | 24 +- .../__snapshots__/loadMore.spec.tsx.snap | 8 +- .../__snapshots__/postComment.spec.tsx.snap | 6 +- .../postLocalReply.spec.tsx.snap | 48 +- .../__snapshots__/postReply.spec.tsx.snap | 12 +- .../renderCommunityGuidelines.spec.tsx.snap | 8 +- .../__snapshots__/renderReplies.spec.tsx.snap | 16 +- .../__snapshots__/renderStream.spec.tsx.snap | 8 +- .../__snapshots__/reportComment.spec.tsx.snap | 8 +- .../showAllReplies.spec.tsx.snap | 4 +- .../showConversation.spec.tsx.snap | 4 +- .../__snapshots__/sortStream.spec.tsx.snap | 8 +- .../stream/charCountPostComment.spec.tsx | 2 +- .../stream/charCountReplyComment.spec.tsx | 4 +- .../test/comments/stream/ignoreUser.spec.tsx | 4 +- .../test/comments/stream/loadMore.spec.tsx | 2 +- .../test/comments/stream/moderation.spec.tsx | 2 +- .../test/comments/stream/postComment.spec.tsx | 2 +- .../test/comments/stream/postReply.spec.tsx | 2 +- .../client/stream/test/helpers/fixture.ts | 7 +- src/core/client/test/expectAndFail.tsx | 1 + src/core/client/test/helpers/fixture.ts | 11 +- src/core/client/test/jsdom.ts | 8 +- src/core/client/test/mocks.ts | 4 +- src/core/client/test/setupTestFramework.ts | 6 +- src/core/client/tslint.json | 17 - .../components/AbsoluteTime/AbsoluteTime.tsx | 4 +- .../ui/components/BaseButton/BaseButton.tsx | 2 +- .../ui/components/Button/Button.spec.tsx | 2 +- .../ui/components/Button/ButtonIcon.spec.tsx | 2 +- .../client/ui/components/CallOut/CallOut.tsx | 3 +- src/core/client/ui/components/Card/Card.tsx | 7 +- .../client/ui/components/Card/CloseButton.tsx | 4 +- .../ui/components/CheckBox/CheckBox.tsx | 2 +- .../ClickOutside/ClickOutside.spec.tsx | 1 - .../components/ClickOutside/ClickOutside.tsx | 6 +- .../client/ui/components/Dropdown/Button.tsx | 2 +- src/core/client/ui/components/Flex/Flex.tsx | 9 +- .../components/FormField/FormField.spec.tsx | 3 +- .../ui/components/FormField/FormField.tsx | 3 +- .../HorizontalGutter/HorizontalGutter.tsx | 6 +- .../InputDescription/InputDescription.tsx | 3 +- .../ui/components/InputLabel/InputLabel.tsx | 5 +- .../ui/components/MatchMedia/MatchMedia.tsx | 3 +- .../client/ui/components/Message/Message.tsx | 3 +- .../client/ui/components/Modal/Modal.spec.tsx | 6 +- src/core/client/ui/components/Modal/Modal.tsx | 16 +- .../Modal/__snapshots__/Modal.spec.tsx.snap | 5 +- .../PasswordField/PasswordField.tsx | 18 +- .../__snapshots__/PasswordField.spec.tsx.snap | 2 + .../client/ui/components/Popover/Arrow.tsx | 11 +- .../client/ui/components/Popover/Popover.tsx | 4 +- src/core/client/ui/components/Popup/Popup.ts | 4 +- .../ui/components/RadioButton/RadioButton.tsx | 2 +- .../components/SelectField/OptGroup.spec.tsx | 1 + .../ui/components/SelectField/Option.spec.tsx | 1 + .../SelectField/SelectField.spec.tsx | 1 + .../ui/components/SelectField/SelectField.tsx | 9 +- .../client/ui/components/Spinner/Spinner.tsx | 3 +- .../client/ui/components/Steps/Circle.tsx | 1 + src/core/client/ui/components/Steps/Step.tsx | 1 + .../client/ui/components/Steps/StepBar.tsx | 1 + .../client/ui/components/Table/Table.spec.tsx | 2 +- .../ui/components/TextField/TextField.tsx | 8 +- .../ui/components/TextLink/TextLink.tsx | 2 +- .../ui/components/TileSelector/TileOption.tsx | 3 +- .../components/TrapFocus/TrapFocus.spec.tsx | 4 +- .../ui/components/TrapFocus/TrapFocus.tsx | 7 +- .../ui/components/Typography/Typography.tsx | 9 +- .../ValidationMessage/ValidationMessage.tsx | 1 + .../client/ui/helpers/combineEventHandlers.ts | 4 +- src/core/client/ui/hocs/withKeyboardFocus.tsx | 5 +- src/core/client/ui/hocs/withMouseHover.tsx | 7 +- src/core/client/ui/hocs/withStyles.ts | 2 +- src/core/client/ui/hooks/useComboBox.ts | 2 +- src/core/client/ui/theme/variables.ts | 7 +- src/core/common/types.ts | 6 +- src/core/common/utils/ensureEndSlash.ts | 4 +- src/core/common/utils/timeout.ts | 2 +- src/core/common/version.ts | 4 +- src/core/server/app/helpers/hostname.ts | 2 +- src/core/server/app/index.ts | 2 +- src/core/server/app/middleware/error.ts | 2 +- .../server/app/middleware/passport/index.ts | 12 +- .../passport/strategies/oidc/index.ts | 4 +- src/core/server/app/request/limiter.ts | 2 +- src/core/server/app/router/api/auth.ts | 2 +- src/core/server/app/url.ts | 9 +- src/core/server/cron/accountDeletion.ts | 1 + src/core/server/errors/index.ts | 2 +- src/core/server/graph/common/scalars/time.ts | 3 +- .../graph/tenant/subscriptions/publisher.ts | 1 + .../graph/tenant/subscriptions/server.ts | 3 +- src/core/server/index.ts | 4 +- .../server/logger/streams/SecretStream.ts | 2 +- src/core/server/models/action/comment.ts | 38 +- .../models/action/moderation/comment.ts | 2 +- src/core/server/models/comment/comment.ts | 6 +- src/core/server/models/helpers/query.ts | 2 +- src/core/server/models/migration/migration.ts | 2 +- src/core/server/models/queries/queries.ts | 2 +- src/core/server/models/story/counts/shared.ts | 8 +- src/core/server/models/story/index.ts | 4 +- src/core/server/models/tenant/tenant.ts | 4 +- src/core/server/models/user/user.ts | 10 +- .../server/queue/tasks/mailer/processor.ts | 12 +- src/core/server/queue/tasks/notifier/index.ts | 10 +- src/core/server/services/comments/actions.ts | 2 +- src/core/server/services/jwt/index.ts | 36 +- src/core/server/services/migrate/error.ts | 2 +- src/core/server/services/migrate/indexing.ts | 2 +- src/core/server/services/migrate/manager.ts | 5 +- .../1569455150152_premod_user_status.ts | 2 +- src/core/server/services/redis/index.ts | 5 +- src/core/server/services/stories/index.ts | 2 +- .../server/services/tenant/cache/index.ts | 2 +- src/core/server/services/tenant/index.ts | 16 +- src/core/server/services/tenant/url.ts | 2 +- src/core/server/services/users/users.ts | 5 +- src/types/fluent.d.ts | 2 +- src/types/metascraper.d.ts | 10 +- src/types/react-relay-network-modern.d.ts | 2 +- tslint.dynamic.js | 8 - tslint.json | 38 - 569 files changed, 2592 insertions(+), 1925 deletions(-) create mode 100644 .eslintignore create mode 100644 .eslintrc.js delete mode 100644 src/core/client/tslint.json delete mode 100644 tslint.dynamic.js delete mode 100644 tslint.json diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..e7901e62b --- /dev/null +++ b/.eslintignore @@ -0,0 +1,3 @@ +*.d.ts +*.graphql.ts +**/__generated__/** diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 000000000..b54728e26 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,206 @@ +const typescriptEslintRecommended = require('@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended').default.overrides[0]; +const typescriptRecommended = require('@typescript-eslint/eslint-plugin/dist/configs/recommended.json'); +const typescriptRecommendedTypeChecking = require('@typescript-eslint/eslint-plugin/dist/configs/recommended-requiring-type-checking.json'); +const typescriptEslintPrettier = require('eslint-config-prettier/@typescript-eslint'); +const react = require('eslint-plugin-react').configs.recommended; +const jsxA11y = require('eslint-plugin-jsx-a11y').configs.recommended; +const reactPrettier = require('eslint-config-prettier/react'); + +const typescriptOverrides = { + files: ["*.ts", "*.tsx"], + parser: "@typescript-eslint/parser", + parserOptions: { + sourceType: "module", + ecmaFeatures: { + jsx: true, + }, + }, + plugins: [ + "@typescript-eslint", + "@typescript-eslint/tslint", + "react", + "jsx-a11y", + ], + settings: { + react: { + version: "detect", + } + }, + rules: Object.assign( + typescriptEslintRecommended.rules, + typescriptRecommended.rules, + typescriptEslintPrettier.rules, + react.rules, + jsxA11y.rules, + reactPrettier.rules, + { + "@typescript-eslint/adjacent-overload-signatures": "error", + // TODO: (cvle) change `readonly` param to `array-simple` when upgraded typescript. + "@typescript-eslint/array-type": ["error", { "default": "array-simple", "readonly": "generic"}], + "@typescript-eslint/ban-types": "error", + "@typescript-eslint/camelcase": "off", + "@typescript-eslint/consistent-type-assertions": "error", + "@typescript-eslint/consistent-type-definitions": "error", + "@typescript-eslint/class-name-casing": "error", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-member-accessibility": [ + "error", + { + "overrides": { + "constructors": "off", + }, + }, + ], + "@typescript-eslint/indent": "off", + "@typescript-eslint/interface-name-prefix": "error", + "@typescript-eslint/member-delimiter-style": "off", + "@typescript-eslint/no-empty-function": "error", + "@typescript-eslint/no-empty-interface": "error", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-misused-new": "error", + "@typescript-eslint/no-namespace": "error", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/no-parameter-properties": "off", + "@typescript-eslint/no-unused-vars": ["error", {"args": "none", "ignoreRestSiblings": true}], + "@typescript-eslint/no-use-before-define": "off", // TODO: (cvle) Should be on? + "@typescript-eslint/no-use-before-declare": "off", + "@typescript-eslint/no-var-requires": "error", + "@typescript-eslint/prefer-for-of": "error", + "@typescript-eslint/prefer-function-type": "error", + "@typescript-eslint/prefer-namespace-keyword": "error", + "@typescript-eslint/triple-slash-reference": "error", + "@typescript-eslint/type-annotation-spacing": "off", + "@typescript-eslint/unified-signatures": "error", + // (cvle) disabled, because the way we use labels in our code cause to many + // false positives. + "jsx-a11y/label-has-associated-control": "off", + "react/display-name": "error", + "react/prop-types": "off", + "react/no-unescaped-entities": "off", + } + ), +}; + +let typescriptTypeCheckingOverrides = { + files: ["*.ts", "*.tsx"], + parserOptions: { + project: ["tsconfig.json", "./src/tsconfig.json", "./src/core/client/tsconfig.json"], + }, + rules: Object.assign( + typescriptRecommendedTypeChecking.rules, + { + "@typescript-eslint/tslint/config": ["error", { + "rules": { + "ordered-imports": { + "options": { + "import-sources-order": "case-insensitive", + "module-source-path": "full", + "named-imports-order": "case-insensitive", + }, + }, + }, + }], + "@typescript-eslint/require-await": "off", + "@typescript-eslint/no-misused-promises": "off", + "@typescript-eslint/unbound-method": "off", // 10.10.19: (cvle) seems to give false positive. + } + ), +}; + +const jestOverrides = { + env: { + jest: true, + }, + files: ["test/**/*.ts", "test/**/*.tsx"], + globals: { + "expectAndFail": "readonly", + "fail": "readonly", + }, +}; + +// Setup the overrides. +const overrides = [jestOverrides, typescriptOverrides]; +// Skip type information to make it faster! +if (process.env.FAST_LINT !== "true") { + overrides.push(typescriptTypeCheckingOverrides); +} + +module.exports = { + overrides, + env: { + browser: true, + es6: true, + node: true, + }, + extends: [ + "eslint:recommended", + "plugin:jsdoc/recommended", + "plugin:prettier/recommended", + ], + parserOptions: { + "ecmaVersion": 2018, + }, + rules: { + "arrow-body-style": "off", + "arrow-parens": [ + "off", + "as-needed", + ], + "camelcase": "off", + "complexity": "off", + "constructor-super": "error", + "spaced-comment": ["error", "always"], + "curly": "error", + "dot-notation": "error", + "eol-last": "off", + "eqeqeq": "error", + "guard-for-in": "error", + "jsdoc/require-jsdoc": "off", + "jsdoc/require-returns": "off", + "jsdoc/require-param": "off", + "jsdoc/require-param-type": "off", + "jsdoc/require-returns-type": "off", + "linebreak-style": "off", + "max-classes-per-file": [ + "error", + 1, + ], + "member-ordering": "off", + "new-parens": "off", + "newline-per-chained-call": "off", + "no-bitwise": "error", + "no-caller": "error", + "no-cond-assign": "error", + "no-console": "error", + "no-debugger": "error", + "no-empty": "error", + "no-eval": "error", + "no-extra-semi": "off", + "no-fallthrough": "error", + "no-invalid-this": "off", + "no-irregular-whitespace": "off", + "no-multiple-empty-lines": "off", + "no-new-wrappers": "error", + "no-prototype-builtins": "off", + "no-shadow": "error", + "no-throw-literal": "error", + "no-undef": "off", + "no-undef-init": "error", + "no-unsafe-finally": "error", + "no-unused-expressions": "error", + "no-unused-labels": "error", + "no-unused-vars": ["error", {"args": "none", "ignoreRestSiblings": true}], + "no-var": "error", + "object-shorthand": "error", + "one-var": "off", + "prefer-arrow-callback": "off", + "prefer-const": "error", + "quote-props": "off", + "radix": "error", + "require-atomic-updates": "off", + "space-before-function-paren": "off", + "sort-imports": "off", + "use-isnan": "error", + "valid-typeof": "off", + }, +}; diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 54ad9dd96..9f44c3180 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,8 +1,9 @@ { "recommendations": [ - "ms-vscode.vscode-typescript-tslint-plugin", + "dbaeumer.vscode-eslint", "kumar-harsh.graphql-for-vscode", "editorconfig.editorconfig", - "ms-azuretools.vscode-cosmosdb" + "ms-azuretools.vscode-cosmosdb", + "mike-co.import-sorter" ] } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index fb53602ee..44b178770 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -10,12 +10,49 @@ "**/.DS_Store": true, ".vs": true }, - "tslint.exclude": "**/node_modules/**", - "tslint.jsEnable": true, + "tslint.enable": false, + "eslint.validate": [ + { "language": "javascript", "autoFix": true }, + { "language": "typescript", "autoFix": true }, + { "language": "typescriptreact", "autoFix": true } + ], "typescript.tsdk": "node_modules/typescript/lib", "postcss.validate": false, "javascript.preferences.importModuleSpecifier": "non-relative", - "editor.codeActionsOnSave": { - "source.fixAll.tslint": true - } + "importSorter.importStringConfiguration.quoteMark": "double", + "importSorter.importStringConfiguration.maximumNumberOfImportExpressionsPerLine.count": 80, + "importSorter.sortConfiguration.customOrderingRules.rules": [ + { + "type": "importMember", + "regex": "^$", + "orderLevel": 70, + "disableSort": true + }, + { + "regex": "__generated__", + "orderLevel": 40 + }, + { + "regex": "^coral-", + "orderLevel": 30 + }, + { + "regex": "\\.css$", + "orderLevel": 60, + "disableSort": true + }, + { + "regex": "^[.]", + "orderLevel": 50 + }, + ], + "importSorter.importStringConfiguration.maximumNumberOfImportExpressionsPerLine.type": "newLineEachExpressionAfterCountLimitExceptIfOnlyOne", + "importSorter.importStringConfiguration.trailingComma": "multiLine", + "importSorter.importStringConfiguration.tabSize": 2, + "eslint.enable": true, + "importSorter.generalConfiguration.exclude": [ + "d\\.ts$", + "__generated__" + ], + "eslint.alwaysShowStatus": true } diff --git a/package-lock.json b/package-lock.json index f4bd8a780..2c13a6b57 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3669,6 +3669,12 @@ "@types/enzyme": "*" } }, + "@types/eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", + "dev": true + }, "@types/eventemitter2": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/@types/eventemitter2/-/eventemitter2-4.1.0.tgz", @@ -3888,6 +3894,12 @@ } } }, + "@types/json-schema": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.3.tgz", + "integrity": "sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A==", + "dev": true + }, "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -4452,6 +4464,118 @@ "integrity": "sha512-SOhuU4wNBxhhTHxYaiG5NY4HBhDIDnJF60GU+2LqHAdKKer86//e4yg69aENCtQ04n0ovz+tq2YPME5t5yp4pw==", "dev": true }, + "@typescript-eslint/eslint-plugin": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.3.2.tgz", + "integrity": "sha512-tcnpksq1bXzcIRbYLeXkgp6l+ggEMXXUcl1wsSvL807fRtmvVQKygElwEUf4hBA76dNag3VAK1q2m3vd7qJaZA==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "2.3.2", + "eslint-utils": "^1.4.2", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^2.0.1", + "tsutils": "^3.17.1" + }, + "dependencies": { + "tsutils": { + "version": "3.17.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", + "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@typescript-eslint/eslint-plugin-tslint": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin-tslint/-/eslint-plugin-tslint-2.3.2.tgz", + "integrity": "sha512-F1LGRQ8CAH6Vjf7uLbChJmgzAixpSL7eN4/9Jiwn4XVMgj7Ny2BzAu9Q3VNlbzOpTuscGVhQ20iSN+qCtkw9Yw==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "2.3.2", + "lodash.memoize": "^4.1.2" + } + }, + "@typescript-eslint/experimental-utils": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.3.2.tgz", + "integrity": "sha512-t+JGdTT6dRbmvKDlhlVkEueoZa0fhJNfG6z2cpnRPLwm3VwYr2BjR//acJGC1Yza0I9ZNcDfRY7ubQEvvfG6Jg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/typescript-estree": "2.3.2", + "eslint-scope": "^5.0.0" + }, + "dependencies": { + "eslint-scope": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", + "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + } + } + }, + "@typescript-eslint/parser": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.3.2.tgz", + "integrity": "sha512-nq1UQeNGdKdqdgF6Ww+Ov2OidWgiL96+JYdXXZ2rkP/OWyc6KMNSbs6MpRCpI8q+PmDa7hBnHNQIo7w/drYccA==", + "dev": true, + "requires": { + "@types/eslint-visitor-keys": "^1.0.0", + "@typescript-eslint/experimental-utils": "2.3.2", + "@typescript-eslint/typescript-estree": "2.3.2", + "eslint-visitor-keys": "^1.1.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.3.2.tgz", + "integrity": "sha512-eZNEAai16nwyhIVIEaWQlaUgAU3S9CkQ58qvK0+3IuSdLJD3W1PNuehQFMIhW/mTP1oFR9GNoTcLg7gtXz6lzA==", + "dev": true, + "requires": { + "glob": "^7.1.4", + "is-glob": "^4.0.1", + "lodash.unescape": "4.0.1", + "semver": "^6.3.0" + }, + "dependencies": { + "glob": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, "@webassemblyjs/ast": { "version": "1.8.5", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.8.5.tgz", @@ -5551,6 +5675,16 @@ "sprintf-js": "~1.0.2" } }, + "aria-query": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-3.0.0.tgz", + "integrity": "sha1-ZbP8wcoRVajJrmTW7uKX8V1RM8w=", + "dev": true, + "requires": { + "ast-types-flow": "0.0.7", + "commander": "^2.11.0" + } + }, "arr-diff": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", @@ -5833,6 +5967,12 @@ "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.11.7.tgz", "integrity": "sha512-2mP3TwtkY/aTv5X3ZsMpNAbOnyoC/aMJwJSoaELPkHId0nSQgFcnU4dRW3isxiz7+zBexk0ym3WNVjMiQBnJSw==" }, + "ast-types-flow": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", + "integrity": "sha1-9wtzXGvKGlycItmCw+Oef+ujva0=", + "dev": true + }, "astral-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", @@ -6003,6 +6143,15 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==" }, + "axobject-query": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.0.2.tgz", + "integrity": "sha512-MCeek8ZH7hKyO1rWUbKNQBbl4l2eY0ntk7OGi+q0RlafrCnfPxC06WZA+uebCfmYp4mNU9jRBP1AhGyf8+W3ww==", + "dev": true, + "requires": { + "ast-types-flow": "0.0.7" + } + }, "b3b": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/b3b/-/b3b-0.0.1.tgz", @@ -8482,6 +8631,12 @@ "json-parser": "^1.0.0" } }, + "comment-parser": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-0.6.2.tgz", + "integrity": "sha512-Wdms0Q8d4vvb2Yk72OwZjwNWtMklbC5Re7lD9cjCP/AG1fhocmc0TrxGBBAXPLy8fZQPrfHGgyygwI0lA7pbzA==", + "dev": true + }, "common-tags": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.0.tgz", @@ -9905,6 +10060,12 @@ "es5-ext": "^0.10.9" } }, + "damerau-levenshtein": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.5.tgz", + "integrity": "sha512-CBCRqFnpu715iPmw1KrdOrzRqbdFwQTwAWyyyYS42+iAgHCuXZ+/TdMgQkUENPomxEz9z1BEzuQU2Xw0kUuAgA==", + "dev": true + }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -13198,14 +13359,364 @@ } } }, - "eslint-plugin-prettier": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-2.7.0.tgz", - "integrity": "sha512-CStQYJgALoQBw3FsBzH0VOVDRnJ/ZimUlpLm226U8qgqYJfPOY/CPK6wyRInMxh73HSKg5wyRwdS4BVYYHwokA==", + "eslint": { + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.5.1.tgz", + "integrity": "sha512-32h99BoLYStT1iq1v2P9uwpyznQ4M2jRiFB6acitKz52Gqn+vPaMDUTB1bYi1WN4Nquj2w+t+bimYUG83DC55A==", "dev": true, "requires": { - "fast-diff": "^1.1.1", - "jest-docblock": "^21.0.0" + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.2", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.1", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^11.7.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^6.4.1", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.14", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "ajv": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", + "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "eslint-scope": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", + "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "glob-parent": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", + "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + }, + "dependencies": { + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + } + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.1.0.tgz", + "integrity": "sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "inquirer": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", + "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", + "dev": true, + "requires": { + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^2.0.0", + "lodash": "^4.17.12", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.1.0", + "through": "^2.3.6" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "strip-json-comments": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", + "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", + "dev": true + }, + "v8-compile-cache": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", + "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", + "dev": true + } + } + }, + "eslint-config-prettier": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.3.0.tgz", + "integrity": "sha512-EWaGjlDAZRzVFveh2Jsglcere2KK5CJBhkNSa1xs3KfMUGdRiT7lG089eqPdvlzWHpAqaekubOsOMu8W8Yk71A==", + "dev": true, + "requires": { + "get-stdin": "^6.0.0" + }, + "dependencies": { + "get-stdin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "dev": true + } + } + }, + "eslint-plugin-jsdoc": { + "version": "15.9.7", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-15.9.7.tgz", + "integrity": "sha512-i+bfhx9zPw9DkbrRvxH5i0f8NIizUHACSSMiGJXhznP4qOoWi/o3TQMjaP8+vwzPSqlXL/orf+KbuH8xN70ZRg==", + "dev": true, + "requires": { + "comment-parser": "^0.6.2", + "debug": "^4.1.1", + "jsdoctypeparser": "5.0.1", + "lodash": "^4.17.15", + "object.entries-ponyfill": "^1.0.1", + "regextras": "^0.6.1" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-plugin-jsx-a11y": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.2.3.tgz", + "integrity": "sha512-CawzfGt9w83tyuVekn0GDPU9ytYtxyxyFZ3aSWROmnRRFQFT2BiPJd7jvRdzNDi6oLWaS2asMeYSNMjWTV4eNg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.4.5", + "aria-query": "^3.0.0", + "array-includes": "^3.0.3", + "ast-types-flow": "^0.0.7", + "axobject-query": "^2.0.2", + "damerau-levenshtein": "^1.0.4", + "emoji-regex": "^7.0.2", + "has": "^1.0.3", + "jsx-ast-utils": "^2.2.1" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.6.3.tgz", + "integrity": "sha512-kq6anf9JGjW8Nt5rYfEuGRaEAaH1mkv3Bbu6rYvLOpPh/RusSJXuKPEAoZ7L7gybZkchE8+NV5g9vKF4AGAtsA==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.2" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "jsx-ast-utils": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.2.1.tgz", + "integrity": "sha512-v3FxCcAf20DayI+uxnCuw795+oOIkVu6EnJ1+kSzhqqTZHNkTZ7B66ZgLp4oLJ/gbA64cI0B7WRoHZMSRdyVRQ==", + "dev": true, + "requires": { + "array-includes": "^3.0.3", + "object.assign": "^4.1.0" + } + }, + "regenerator-runtime": { + "version": "0.13.3", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz", + "integrity": "sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==", + "dev": true + } + } + }, + "eslint-plugin-prettier": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.1.tgz", + "integrity": "sha512-A+TZuHZ0KU0cnn56/9mfR7/KjUJ9QNVXUhwvRFSR7PGPe0zQR6PTkmyqg1AtUUEOzTqeRsUwyKFh0oVZKVCrtA==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0" + } + }, + "eslint-plugin-react": { + "version": "7.15.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.15.1.tgz", + "integrity": "sha512-YotSItgMPwLGlr3df44MGVyXnHkmKcpkHTzpte3QwJtocr3nFqCXCuoxFZeBtnT8RHdj038NlTvam3dcAFrMcA==", + "dev": true, + "requires": { + "array-includes": "^3.0.3", + "doctrine": "^2.1.0", + "has": "^1.0.3", + "jsx-ast-utils": "^2.2.1", + "object.entries": "^1.1.0", + "object.fromentries": "^2.0.0", + "object.values": "^1.1.0", + "prop-types": "^15.7.2", + "resolve": "^1.12.0" + }, + "dependencies": { + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "jsx-ast-utils": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.2.1.tgz", + "integrity": "sha512-v3FxCcAf20DayI+uxnCuw795+oOIkVu6EnJ1+kSzhqqTZHNkTZ7B66ZgLp4oLJ/gbA64cI0B7WRoHZMSRdyVRQ==", + "dev": true, + "requires": { + "array-includes": "^3.0.3", + "object.assign": "^4.1.0" + } + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "object.values": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.0.tgz", + "integrity": "sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.12.0", + "function-bind": "^1.1.1", + "has": "^1.0.3" + } + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "prop-types": { + "version": "15.7.2", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz", + "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==", + "dev": true, + "requires": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.8.1" + } + }, + "resolve": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz", + "integrity": "sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + } } }, "eslint-scope": { @@ -13218,17 +13729,66 @@ "estraverse": "^4.1.1" } }, + "eslint-utils": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.2.tgz", + "integrity": "sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.0.0" + } + }, + "eslint-visitor-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "dev": true + }, "esm": { "version": "3.2.22", "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.22.tgz", "integrity": "sha512-z8YG7U44L82j1XrdEJcqZOLUnjxco8pO453gKOlaMD1/md1n/5QrscAmYG+oKUspsmDLuBFZrpbxI6aQ67yRxA==", "dev": true }, + "espree": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.1.tgz", + "integrity": "sha512-EYbr8XZUhWbYCqQRW0duU5LxzL5bETN6AjKBGy1302qqzPaCH10QbRg3Wvco79Z8x9WbiE8HYB4e75xl6qUYvQ==", + "dev": true, + "requires": { + "acorn": "^7.0.0", + "acorn-jsx": "^5.0.2", + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "acorn": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", + "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", + "dev": true + }, + "acorn-jsx": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.2.tgz", + "integrity": "sha512-tiNTrP1MP0QrChmD2DdupCr6HWSFeKVw5d/dHTu4Y7rkAkRhU/Dt7dphAfIUyxtHpl/eBVip5uTNSpQJHylpAw==", + "dev": true + } + } + }, "esprima": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==" }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, "esrecurse": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", @@ -13729,6 +14289,15 @@ "escape-string-regexp": "^1.0.5" } }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, "file-loader": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-3.0.1.tgz", @@ -13966,6 +14535,48 @@ } } }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + }, + "dependencies": { + "glob": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "flatted": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", + "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", + "dev": true + }, "flatten": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", @@ -14088,9 +14699,9 @@ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "fork-ts-checker-webpack-plugin": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-1.3.0.tgz", - "integrity": "sha512-38nL1h4nRLrU/0oCAvjQY7ZJw0JpcsOOwSMZQSaMdVi2d+vXNcyvVg/n6q4mRcvGmVW2z2EIlj5ufaITk0M5bA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-1.5.0.tgz", + "integrity": "sha512-zEhg7Hz+KhZlBhILYpXy+Beu96gwvkROWJiTXOCyOOMMrdBIRPvsBpBqgTI4jfJGrJXcqGwJR8zsBGDmzY0jsA==", "dev": true, "requires": { "babel-code-frame": "^6.22.0", @@ -14104,9 +14715,9 @@ }, "dependencies": { "chokidar": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.5.tgz", - "integrity": "sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A==", + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", "dev": true, "requires": { "anymatch": "^2.0.0", @@ -14123,582 +14734,16 @@ "upath": "^1.1.1" } }, - "fsevents": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", - "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", - "dev": true, - "optional": true, - "requires": { - "nan": "^2.12.1", - "node-pre-gyp": "^0.12.0" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.3.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.3.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^4.1.0", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.12.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.7.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "nan": { - "version": "2.13.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", - "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==", - "dev": true, - "optional": true - }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" - } - }, "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true } } @@ -15625,6 +15670,12 @@ "is-callable": "^1.1.3" } }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "g-status": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/g-status/-/g-status-2.0.2.tgz", @@ -19528,12 +19579,6 @@ "pretty-format": "^24.8.0" } }, - "jest-docblock": { - "version": "21.2.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-21.2.0.tgz", - "integrity": "sha512-5IZ7sY9dBAYSV+YjQ0Ovb540Ku7AO9Z5o2Cg789xj167iQuZ2cG+z0f3Uct6WeYLbU6aQiM2pCs7sZ+4dotydw==", - "dev": true - }, "jest-each": { "version": "24.8.0", "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-24.8.0.tgz", @@ -20278,6 +20323,12 @@ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "optional": true }, + "jsdoctypeparser": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-5.0.1.tgz", + "integrity": "sha512-dYwcK6TKzvq+ZKtbp4sbQSW9JMo6s+4YFfUs5D/K7bZsn3s1NhEhZ+jmIPzby0HbkbECBe+hNPEa6a+E21o94w==", + "dev": true + }, "jsdom": { "version": "15.0.0", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-15.0.0.tgz", @@ -20806,12 +20857,6 @@ "resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.3.tgz", "integrity": "sha512-zrycnIMsLw/3ZxTbW7HCez56rcFGecWTx5OZNplzcXUUmJLmoYArC6qdJzmAN5BWiNXGcpjhF9RQ1HSv5zebEw==" }, - "lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", - "dev": true - }, "linkifyjs": { "version": "2.1.8", "resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-2.1.8.tgz", @@ -22084,9 +22129,9 @@ "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" }, "microevent.ts": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/microevent.ts/-/microevent.ts-0.1.0.tgz", - "integrity": "sha1-OQdIuKUVCD5rY81REqPxjC/g66g=", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/microevent.ts/-/microevent.ts-0.1.1.tgz", + "integrity": "sha512-jo1OfR4TaEwd5HOrt5+tAZ9mqT4jmpNAusXtyfNzqVm9uiSYFZlKM1wYL4oU7azZW/PxQW53wM0S6OR1JHNa2g==", "dev": true }, "micromatch": { @@ -23555,6 +23600,12 @@ } } }, + "object.entries-ponyfill": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.entries-ponyfill/-/object.entries-ponyfill-1.0.1.tgz", + "integrity": "sha1-Kavfd8v70mVm3RqiTp2I9lQz0lY=", + "dev": true + }, "object.fromentries": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.0.tgz", @@ -23903,6 +23954,23 @@ "no-case": "^2.2.0" } }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + }, + "dependencies": { + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + } + } + }, "parse-asn1": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", @@ -27316,11 +27384,20 @@ "dev": true }, "prettier": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.17.0.tgz", - "integrity": "sha512-sXe5lSt2WQlCbydGETgfm1YBShgOX4HxQkFPvbxkcwgDvGDeqVau8h+12+lmSVlP3rHPz0oavfddSZg/q+Szjw==", + "version": "1.18.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.18.2.tgz", + "integrity": "sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==", "dev": true }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, "pretty-error": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz", @@ -27395,6 +27472,12 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, "progress-estimator": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/progress-estimator/-/progress-estimator-0.2.2.tgz", @@ -29348,6 +29431,17 @@ "util-deprecate": "~1.0.1" } }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, "realpath-native": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/realpath-native/-/realpath-native-1.1.0.tgz", @@ -29504,6 +29598,12 @@ "integrity": "sha512-K1qVSbcedffwuIslMwpe6vGlj+ZXRnGkvjAtFHfDZZZuEdA/h0dxljAPu9vhUo6Rrx2U2AwJ+nSQ6hK+lrP5MQ==", "dev": true }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, "regexpu-core": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.4.tgz", @@ -29518,6 +29618,12 @@ "unicode-match-property-value-ecmascript": "^1.1.0" } }, + "regextras": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/regextras/-/regextras-0.6.1.tgz", + "integrity": "sha512-EzIHww9xV2Kpqx+corS/I7OBmf2rZ0pKKJPsw5Dc+l6Zq1TslDmtRIP9maVn3UH+72MIXmn8zzDgP07ihQogUA==", + "dev": true + }, "regjsgen": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.0.tgz", @@ -31936,6 +32042,60 @@ "integrity": "sha512-16GbgwTmFMYFyQMLvtQjvNWh30dsFe1cAW5Fg1wm5+dg84L9Pe36mftsIRU95/W2YsISxsz/xq4VB23sqpgb/A==", "dev": true }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ajv": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", + "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + } + } + }, "tapable": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.0.0.tgz", @@ -32953,18 +33113,18 @@ "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==" }, "tslint": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.16.0.tgz", - "integrity": "sha512-UxG2yNxJ5pgGwmMzPMYh/CCnCnh0HfPgtlVRDs1ykZklufFBL1ZoTlWFRz2NQjcoEiDoRp+JyT0lhBbbH/obyA==", + "version": "5.20.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.20.0.tgz", + "integrity": "sha512-2vqIvkMHbnx8acMogAERQ/IuINOq6DFqgF8/VDvhEkBqQh/x6SP0Y+OHnKth9/ZcHQSroOZwUQSN18v8KKF0/g==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "builtin-modules": "^1.1.1", "chalk": "^2.3.0", "commander": "^2.12.1", - "diff": "^3.2.0", + "diff": "^4.0.1", "glob": "^7.1.1", - "js-yaml": "^3.13.0", + "js-yaml": "^3.13.1", "minimatch": "^3.0.4", "mkdirp": "^0.5.1", "resolve": "^1.3.2", @@ -32973,30 +33133,16 @@ "tsutils": "^2.29.0" }, "dependencies": { - "@babel/code-frame": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", - "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", - "dev": true, - "requires": { - "@babel/highlight": "^7.0.0" - } - }, - "@babel/highlight": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz", - "integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==", - "dev": true, - "requires": { - "chalk": "^2.0.0", - "esutils": "^2.0.2", - "js-tokens": "^4.0.0" - } + "diff": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", + "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==", + "dev": true }, "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", + "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -33006,59 +33152,6 @@ "once": "^1.3.0", "path-is-absolute": "^1.0.0" } - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - } - } - }, - "tslint-config-prettier": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz", - "integrity": "sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==", - "dev": true - }, - "tslint-plugin-prettier": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslint-plugin-prettier/-/tslint-plugin-prettier-2.0.1.tgz", - "integrity": "sha512-4FX9JIx/1rKHIPJNfMb+ooX1gPk5Vg3vNi7+dyFYpLO+O57F4g+b/fo1+W/G0SUOkBLHB/YKScxjX/P+7ZT/Tw==", - "dev": true, - "requires": { - "eslint-plugin-prettier": "^2.2.0", - "lines-and-columns": "^1.1.6", - "tslib": "^1.7.1" - } - }, - "tslint-react": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tslint-react/-/tslint-react-4.0.0.tgz", - "integrity": "sha512-9fNE0fm9zNDx1+b6hgy8rgDN2WsQLRiIrn3+fbqm0tazBVF6jiaCFAITxmU+WSFWYE03Xhp1joCircXOe1WVAQ==", - "dev": true, - "requires": { - "tsutils": "^3.9.1" - }, - "dependencies": { - "tsutils": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.14.0.tgz", - "integrity": "sha512-SmzGbB0l+8I0QwsPgjooFRaRvHLBLNYM8SeQ0k6rtNDru5sCGeLJcZdwilNndN+GysuFjF5EIYgN8GfFG6UeUw==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } } } }, @@ -37055,12 +37148,12 @@ } }, "worker-rpc": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/worker-rpc/-/worker-rpc-0.1.0.tgz", - "integrity": "sha1-XxJY3KPWF80YyoZYf4oFrA7r2DQ=", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/worker-rpc/-/worker-rpc-0.1.1.tgz", + "integrity": "sha512-P1WjMrUB3qgJNI9jfmpZ/htmBEjFh//6l/5y8SD9hg1Ef5zTTVVoRjTrTEzPrNBQvmhMxkoTsjOXN10GWU7aCg==", "dev": true, "requires": { - "microevent.ts": "~0.1.0" + "microevent.ts": "~0.1.1" } }, "wrap-ansi": { @@ -37095,6 +37188,15 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, "write-file-atomic": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.1.tgz", diff --git a/package.json b/package.json index b30409dd0..a7b06b3b9 100644 --- a/package.json +++ b/package.json @@ -42,9 +42,9 @@ "start:development": "NODE_ENV=development CONCURRENCY=${CONCURRENCY:-1} TS_NODE_PROJECT=./src/tsconfig.json ts-node-dev --inspect --transpile-only --no-notify -r tsconfig-paths/register ./src/index.ts", "start:webpackDevServer": "ts-node --transpile-only ./scripts/start.ts", "lint": "npm-run-all --parallel lint:* tscheck:*", - "lint:server": "tslint --project ./src/tsconfig.json", - "lint:client": "tslint --project ./src/core/client/tsconfig.json", - "lint:scripts": "tslint --project ./tsconfig.json", + "lint:server": "eslint 'src/**/*.{js,ts,tsx}' --ignore-pattern 'src/core/client/**'", + "lint:client": "eslint 'src/core/client/**/*.{js,ts,tsx}'", + "lint:scripts": "eslint 'scripts/**/*.{js,ts,tsx}'", "lint:graphql": "graphql-schema-linter src/core/server/graph/tenant/schema/schema.graphql", "lint-fix": "npm run lint:server -- --fix && npm run lint:client -- --fix && npm run lint:scripts -- --fix", "test": "node scripts/test.js --env=jsdom", @@ -229,6 +229,9 @@ "@types/webpack-bundle-analyzer": "^2.13.1", "@types/webpack-dev-server": "^3.1.5", "@types/ws": "^5.1.2", + "@typescript-eslint/eslint-plugin": "^2.3.2", + "@typescript-eslint/eslint-plugin-tslint": "^2.3.2", + "@typescript-eslint/parser": "^2.3.2", "acorn": "^6.1.1", "ansi-styles": "^3.2.0", "autoprefixer": "^9.5.1", @@ -260,6 +263,12 @@ "enzyme": "^3.9.0", "enzyme-adapter-react-16": "^1.12.1", "enzyme-to-json": "^3.3.5", + "eslint": "^6.5.1", + "eslint-config-prettier": "^6.3.0", + "eslint-plugin-jsdoc": "^15.9.7", + "eslint-plugin-jsx-a11y": "^6.2.3", + "eslint-plugin-prettier": "^3.1.1", + "eslint-plugin-react": "^7.15.1", "eventemitter2": "^5.0.1", "farce": "^0.2.6", "final-form": "4.11.0", @@ -267,7 +276,7 @@ "fluent-intl-polyfill": "^0.1.0", "fluent-langneg": "^0.1.1", "fluent-react": "^0.8.4", - "fork-ts-checker-webpack-plugin": "^1.3.0", + "fork-ts-checker-webpack-plugin": "^1.5.0", "found": "^0.4.0-alpha.17", "found-relay": "^0.4.0-alpha.8", "graphql-schema-linter": "^0.2.0", @@ -302,7 +311,7 @@ "postcss-nested": "^4.1.1", "postcss-prepend-imports": "^1.0.1", "postcss-preset-env": "^6.5.0", - "prettier": "^1.17.0", + "prettier": "^1.18.2", "prop-types": "^15.6.2", "pstree.remy": "^1.1.6", "pym.js": "^1.3.2", @@ -345,10 +354,7 @@ "ts-node-dev": "^1.0.0-pre.37", "tsconfig-paths": "^3.8.0", "tsconfig-paths-webpack-plugin": "^3.2.0", - "tslint": "^5.16.0", - "tslint-config-prettier": "^1.18.0", - "tslint-plugin-prettier": "^2.0.1", - "tslint-react": "^4.0.0", + "tslint": "^5.20.0", "typed-css-modules": "^0.4.2", "typeface-manuale": "^0.0.71", "typeface-source-sans-pro": "^0.0.54", @@ -364,12 +370,12 @@ }, "husky": { "hooks": { - "pre-commit": "lint-staged" + "pre-commit": "FAST_LINT=true lint-staged" } }, "lint-staged": { "*.{j,t}s{,x}": [ - "tslint" + "eslint" ], "src/core/server/graph/tenant/schema/schema.graphql": [ "graphql-schema-linter" diff --git a/scripts/WebpackDevServerUtils.js b/scripts/WebpackDevServerUtils.js index 6dd89430c..725c6296c 100644 --- a/scripts/WebpackDevServerUtils.js +++ b/scripts/WebpackDevServerUtils.js @@ -12,7 +12,7 @@ */ "use strict"; -// tslint:disable:no-console +/* eslint-disable no-console */ const address = require("address"); const url = require("url"); @@ -21,7 +21,6 @@ const clearConsole = require("react-dev-utils/clearConsole"); const formatWebpackMessages = require("react-dev-utils/formatWebpackMessages"); const typescriptFormatter = require("react-dev-utils/typescriptFormatter"); const forkTsCheckerWebpackPlugin = require("react-dev-utils/ForkTsCheckerWebpackPlugin"); -const Stats = require("webpack/lib/Stats"); // (cvle): Changed to false as we are sharing the tty with other processes. // const isInteractive = process.stdout.isTTY && false; @@ -142,7 +141,7 @@ function createCompiler({ }); let isFirstCompile = true; - let tsMessagesPromises = []; + const tsMessagesPromises = []; if (useTypeScript) { compiler.compilers.forEach(singleCompiler => { diff --git a/scripts/build.ts b/scripts/build.ts index 26b31fac3..7dd2d2fa9 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -17,7 +17,7 @@ import paths from "../config/paths"; import config from "../src/core/build/config"; import createWebpackConfig from "../src/core/build/createWebpackConfig"; -// tslint:disable: no-console +/* eslint-disable no-console */ process.env.WEBPACK = "true"; process.env.NODE_ENV = process.env.NODE_ENV || "production"; diff --git a/scripts/compileRelay.ts b/scripts/compileRelay.ts index 861cf6f56..688544070 100644 --- a/scripts/compileRelay.ts +++ b/scripts/compileRelay.ts @@ -19,29 +19,29 @@ program .parse(process.argv); if (!program.schema) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.error("Schema identifier not provided"); process.exit(1); } if (!program.src) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.error("Src not provided"); process.exit(1); } if (!config.projects) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.error("Missing projects key in .graphqconfig"); process.exit(1); } if (!config.projects[program.schema]) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.error(`Project ${program.schema} not found in .graphqconfig`); process.exit(1); } if (!config.projects[program.schema].schemaPath) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.error( `SchemaPath for project ${program.schema} not found in .graphqconfig` ); diff --git a/scripts/generateSchemaTypes.js b/scripts/generateSchemaTypes.js index d5a743b11..ac1c6b4a7 100644 --- a/scripts/generateSchemaTypes.js +++ b/scripts/generateSchemaTypes.js @@ -1,4 +1,3 @@ -const { Linter, Configuration } = require("tslint"); const { generateTSTypesAsString } = require("graphql-schema-typescript"); const { getGraphQLConfig } = require("graphql-config"); const path = require("path"); @@ -69,12 +68,12 @@ if (require.main === module) { main() .then(files => { for (const { fileName } of files) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.log(`Generated ${fileName}`); } }) .catch(err => { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.error(err); }); } diff --git a/scripts/migration/create.ts b/scripts/migration/create.ts index a27fe43f5..da86f47b6 100644 --- a/scripts/migration/create.ts +++ b/scripts/migration/create.ts @@ -8,7 +8,7 @@ * To create new database migrations. */ -// tslint:disable: no-console +/* eslint-disable no-console */ import fs from "fs-extra"; import lodash from "lodash"; diff --git a/scripts/start.ts b/scripts/start.ts index 78e0a5742..1bec1c258 100644 --- a/scripts/start.ts +++ b/scripts/start.ts @@ -14,7 +14,7 @@ import createDevServerConfig from "../config/webpackDevServer.config"; import config from "../src/core/build/config"; import createWebpackConfig from "../src/core/build/createWebpackConfig"; -// tslint:disable: no-console +/* eslint-disable no-console */ // Enforce environment to be development. config.validate().set("env", "development"); diff --git a/scripts/test.js b/scripts/test.js index 7a922b2b1..e941798d8 100644 --- a/scripts/test.js +++ b/scripts/test.js @@ -24,7 +24,7 @@ process.on("unhandledRejection", err => { const paths = require("../config/paths.ts").default; const jest = require("jest"); -let argv = process.argv.slice(2); +const argv = process.argv.slice(2); argv.push("--config", paths.appJestConfig); // Watch unless on CI or in coverage mode diff --git a/scripts/watcher/CommandExecutor.ts b/scripts/watcher/CommandExecutor.ts index 195fcdcff..fd8742382 100644 --- a/scripts/watcher/CommandExecutor.ts +++ b/scripts/watcher/CommandExecutor.ts @@ -21,8 +21,8 @@ export default class CommandExecutor implements Executor { private args?: ReadonlyArray; private spawnMultiple: boolean; private runOnInit: boolean; - private isRunning: boolean = false; - private shouldRespawn: boolean = false; + private isRunning = false; + private shouldRespawn = false; private spawnProcessDebounced?: (() => void) & Cancelable; constructor(cmd: string, opts: CommandExecutorOptions = {}) { @@ -67,7 +67,7 @@ export default class CommandExecutor implements Executor { child.on("close", (code: number) => { this.isRunning = false; if (code !== 0 && code !== null) { - // tslint:disable-next-line: no-console + // eslint-disable-next-line no-console console.log(chalk.red(`Command exited with ${code}`)); } if (this.shouldRespawn) { diff --git a/scripts/watcher/LongRunningExecutor.ts b/scripts/watcher/LongRunningExecutor.ts index 1b9018743..7c963374a 100644 --- a/scripts/watcher/LongRunningExecutor.ts +++ b/scripts/watcher/LongRunningExecutor.ts @@ -17,8 +17,8 @@ export default class LongRunningExecutor implements Executor { private cmd: string; private args?: ReadonlyArray; private process: ChildProcess | null = null; - private isRunning: boolean = false; - private shouldRestart: boolean = false; + private isRunning = false; + private shouldRestart = false; private restartDebounced: (() => void) & Cancelable; constructor(cmd: string, opts: LongRunningExecutorOptions = {}) { @@ -37,11 +37,11 @@ export default class LongRunningExecutor implements Executor { shell: !this.args, }); - this.process!.on("exit", (code: number) => { + this.process.on("exit", (code: number) => { this.isRunning = false; if (code !== 0 && code !== null) { - // tslint:disable-next-line: no-console + // eslint-disable-next-line no-console console.log(chalk.red(`Command exited with ${code}`)); return; } diff --git a/scripts/watcher/SaneWatcher.ts b/scripts/watcher/SaneWatcher.ts index 1b2cbf098..6769ba24e 100644 --- a/scripts/watcher/SaneWatcher.ts +++ b/scripts/watcher/SaneWatcher.ts @@ -18,7 +18,7 @@ function canUseWatchman(): boolean { try { execSync("watchman --version", { stdio: ["ignore"] }); return true; - // tslint:disable-next-line:no-empty + // eslint-disable-next-line no-empty } catch (e) {} return false; } @@ -34,7 +34,7 @@ export default class SaneWatcher implements Watcher { // Autodetect watchman. if (this.watchman === undefined && canUseWatchman()) { this.watchman = true; - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.log(chalk.grey(`Watchman detected`)); } } diff --git a/scripts/watcher/bin/watcher.ts b/scripts/watcher/bin/watcher.ts index 7009e6ecb..a5008a40e 100644 --- a/scripts/watcher/bin/watcher.ts +++ b/scripts/watcher/bin/watcher.ts @@ -14,7 +14,7 @@ async function run( throw new Error("Config file not specified"); } - // tslint:disable-next-line:no-var-requires + // eslint-disable-next-line @typescript-eslint/no-var-requires let config: any = require(path.resolve(configFile)); if (config.__esModule) { config = config.default; @@ -31,7 +31,7 @@ const cmd = program .parse(process.argv); run(cmd.args, cmd.opts()).catch(err => { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.error(err); process.exit(1); }); diff --git a/scripts/watcher/watch.ts b/scripts/watcher/watch.ts index 2742d43f6..111cdfb98 100644 --- a/scripts/watcher/watch.ts +++ b/scripts/watcher/watch.ts @@ -21,7 +21,7 @@ async function beginWatch( await executor.onInit(); } for await (const filePath of watcher.watch(rootDir, paths, { ignore })) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.log(chalk.cyanBright(`Execute "${key}"`)); executor.execute(filePath); } @@ -72,7 +72,7 @@ function filterOnly( } return pickBy(watchers, (value, key) => { if (resolved.indexOf(key) === -1) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.log(chalk.grey(`Disabled watcher "${key}"`)); return false; } @@ -98,11 +98,11 @@ export default async function watch(config: Config, options: Options = {}) { } for (const key of Object.keys(watchersConfigs)) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.log(chalk.cyanBright(`Start watcher "${key}"`)); const watcherConfig = watchersConfigs[key]; beginWatch(watcher, key, watcherConfig, rootDir).catch(err => { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.error(err); process.exit(1); }); diff --git a/scripts/webpackHotDevClient.js b/scripts/webpackHotDevClient.js index 999856d26..e62f83367 100644 --- a/scripts/webpackHotDevClient.js +++ b/scripts/webpackHotDevClient.js @@ -7,7 +7,7 @@ "use strict"; -// tslint:disable:no-console +/* eslint-disable */ // This alternative WebpackDevServer combines the functionality of: // https://github.com/webpack/webpack-dev-server/blob/webpack-1/client/index.js diff --git a/src/core/build/createWebpackConfig.ts b/src/core/build/createWebpackConfig.ts index 22fbb8daa..e5bf35d7e 100644 --- a/src/core/build/createWebpackConfig.ts +++ b/src/core/build/createWebpackConfig.ts @@ -530,9 +530,9 @@ export default function createWebpackConfig( // TODO: (cvle) this should work in build too but for some reasons it terminates the build afterwards. // Preventing from running post build steps. ...ifWatch( - // We run tslint in a separate process to have a quicker build. + // We run eslint in a separate process to have a quicker build. new ForkTsCheckerWebpackPlugin({ - tslint: true, + eslint: true, typescript: require.resolve("typescript"), async: true, // TODO: (cvle) For some reason if incremental build is turned on it does not find lint errors during initial build. diff --git a/src/core/build/loaders/locales-loader.js b/src/core/build/loaders/locales-loader.js index 61379fe53..1cb3e5632 100644 --- a/src/core/build/loaders/locales-loader.js +++ b/src/core/build/loaders/locales-loader.js @@ -59,7 +59,6 @@ function generateTarget(target, context) { defaultLocale, fallbackLocale, pathToLocales, - resourcePath, locales, bundled, } = context; diff --git a/src/core/build/postcss.config.js b/src/core/build/postcss.config.js index 03c0a3b04..43985eff1 100644 --- a/src/core/build/postcss.config.js +++ b/src/core/build/postcss.config.js @@ -23,12 +23,6 @@ const flatKebabVariables = mapKeys( (_, k) => kebabCase(k) ); -// These are the default css standard variables. -const cssVariables = pickBy( - flatKebabVariables, - (v, k) => !k.startsWith("breakpoints-") -); - // These are sass style variables used in media queries. const mediaQueryVariables = mapValues( pickBy(flatKebabVariables, (v, k) => k.startsWith("breakpoints-")), diff --git a/src/core/client/account/App/App.tsx b/src/core/client/account/App/App.tsx index ae925c1e6..ad4507973 100644 --- a/src/core/client/account/App/App.tsx +++ b/src/core/client/account/App/App.tsx @@ -1,10 +1,10 @@ -import TransitionControl from "coral-framework/testHelpers/TransitionControl"; import { BrowserProtocol, queryMiddleware } from "farce"; import { createFarceRouter, ElementsRenderer } from "found"; import { Resolver } from "found-relay"; import React, { FunctionComponent } from "react"; import { CoralContextConsumer } from "coral-framework/lib/bootstrap/CoralContext"; +import TransitionControl from "coral-framework/testHelpers/TransitionControl"; import routeConfig from "../routeConfig"; import NotFound from "../routes/NotFound"; @@ -16,16 +16,17 @@ const Router = createFarceRouter({ historyProtocol: new BrowserProtocol(), historyMiddlewares: [queryMiddleware], routeConfig, - renderReady: ({ elements }) => ( - <> - - {// this enables router transition control when writing tests. - process.env.NODE_ENV === "test" && } - - ), - renderError: ({ error }) => ( -
{error.status === 404 ? : "Error"}
- ), + renderReady: function FarceRouterReady({ elements }) { + return ( + <> + + {process.env.NODE_ENV === "test" && } + + ); + }, + renderError: function FarceRouterError({ error }) { + return
{error.status === 404 ? : "Error"}
; + }, }); const EntryContainer: FunctionComponent = () => ( diff --git a/src/core/client/account/index.tsx b/src/core/client/account/index.tsx index fb606fb19..b8198709b 100644 --- a/src/core/client/account/index.tsx +++ b/src/core/client/account/index.tsx @@ -1,7 +1,8 @@ -import { createManaged } from "coral-framework/lib/bootstrap"; import React, { FunctionComponent } from "react"; import ReactDOM from "react-dom"; +import { createManaged } from "coral-framework/lib/bootstrap"; + import App from "./App"; import { initLocalState } from "./local"; import localesData from "./locales"; diff --git a/src/core/client/account/locales.ts b/src/core/client/account/locales.ts index b0f080a61..c42c7c111 100644 --- a/src/core/client/account/locales.ts +++ b/src/core/client/account/locales.ts @@ -6,4 +6,5 @@ */ import { LocalesData } from "coral-framework/lib/i18n"; + export default {} as LocalesData; diff --git a/src/core/client/account/routes/NotFound.tsx b/src/core/client/account/routes/NotFound.tsx index a3d30b71b..15c6aa43f 100644 --- a/src/core/client/account/routes/NotFound.tsx +++ b/src/core/client/account/routes/NotFound.tsx @@ -1,6 +1,7 @@ -import { HorizontalGutter, Typography } from "coral-ui/components"; import React, { FunctionComponent } from "react"; +import { HorizontalGutter, Typography } from "coral-ui/components"; + const NotFound: FunctionComponent = () => ( Not Found diff --git a/src/core/client/account/routes/download/Download/DownloadRoute.tsx b/src/core/client/account/routes/download/Download/DownloadRoute.tsx index fe3fa3c38..518077f85 100644 --- a/src/core/client/account/routes/download/Download/DownloadRoute.tsx +++ b/src/core/client/account/routes/download/Download/DownloadRoute.tsx @@ -65,9 +65,11 @@ const DownloadRoute: FunctionComponent = ({ token }) => { }; const enhanced = withRouteConfig({ - render: ({ match, Component }) => ( - - ), + render: function DownloadRouteRender({ match, Component }) { + return ( + + ); + }, })(DownloadRoute); export default enhanced; diff --git a/src/core/client/account/routes/download/Download/Sorry.tsx b/src/core/client/account/routes/download/Download/Sorry.tsx index d49f0af9d..24db5421e 100644 --- a/src/core/client/account/routes/download/Download/Sorry.tsx +++ b/src/core/client/account/routes/download/Download/Sorry.tsx @@ -1,7 +1,7 @@ +import { Localized } from "fluent-react/compat"; import React, { FunctionComponent } from "react"; import { CallOut, Flex, Icon } from "coral-ui/components"; -import { Localized } from "fluent-react/compat"; import styles from "./Sorry.css"; diff --git a/src/core/client/account/routes/email/Confirm/ConfirmRoute.tsx b/src/core/client/account/routes/email/Confirm/ConfirmRoute.tsx index 21d66856c..8efd5bb3a 100644 --- a/src/core/client/account/routes/email/Confirm/ConfirmRoute.tsx +++ b/src/core/client/account/routes/email/Confirm/ConfirmRoute.tsx @@ -69,9 +69,11 @@ const ConfirmRoute: React.FunctionComponent = ({ token }) => { }; const enhanced = withRouteConfig({ - render: ({ match, Component }) => ( - - ), + render: function ConfirmRouteRender({ match, Component }) { + return ( + + ); + }, })(ConfirmRoute); export default enhanced; diff --git a/src/core/client/account/routes/notifications/Unsubscribe/UnsubscribeRoute.tsx b/src/core/client/account/routes/notifications/Unsubscribe/UnsubscribeRoute.tsx index bf491e3ef..41c029362 100644 --- a/src/core/client/account/routes/notifications/Unsubscribe/UnsubscribeRoute.tsx +++ b/src/core/client/account/routes/notifications/Unsubscribe/UnsubscribeRoute.tsx @@ -69,9 +69,11 @@ const UnsubscribeRoute: React.FunctionComponent = ({ token }) => { }; const enhanced = withRouteConfig({ - render: ({ match, Component }) => ( - - ), + render: function UnsubscribeRouteRender({ match, Component }) { + return ( + + ); + }, })(UnsubscribeRoute); export default enhanced; diff --git a/src/core/client/account/routes/password/Reset/ResetRoute.tsx b/src/core/client/account/routes/password/Reset/ResetRoute.tsx index 5ff94f08b..d12870272 100644 --- a/src/core/client/account/routes/password/Reset/ResetRoute.tsx +++ b/src/core/client/account/routes/password/Reset/ResetRoute.tsx @@ -69,9 +69,9 @@ const ResetRoute: React.FunctionComponent = ({ token }) => { }; const enhanced = withRouteConfig({ - render: ({ match, Component }) => ( - - ), + render: function ResetRouteRender({ match, Component }) { + return ; + }, })(ResetRoute); export default enhanced; diff --git a/src/core/client/account/test/__snapshots__/resetPassword.spec.tsx.snap b/src/core/client/account/test/__snapshots__/resetPassword.spec.tsx.snap index 6befa3d10..bbb759170 100644 --- a/src/core/client/account/test/__snapshots__/resetPassword.spec.tsx.snap +++ b/src/core/client/account/test/__snapshots__/resetPassword.spec.tsx.snap @@ -81,6 +81,7 @@ Make sure it is unique and be sure to keep it secure.
( - <> - - {// this enables router transition control when writing tests. - process.env.NODE_ENV === "test" && } - - ), - renderError: ({ error }) => ( -
{error.status === 404 ? : "Error"}
- ), + renderReady: function FarceRouterReady({ elements }) { + return ( + <> + + {process.env.NODE_ENV === "test" && } + + ); + }, + renderError: function FarceRouterError({ error }) { + return
{error.status === 404 ? : "Error"}
; + }, }); const App: FunctionComponent = () => ( diff --git a/src/core/client/admin/App/DecisionHistory/ApprovedComment.tsx b/src/core/client/admin/App/DecisionHistory/ApprovedComment.tsx index de0dcb3ae..a8f3cf3f8 100644 --- a/src/core/client/admin/App/DecisionHistory/ApprovedComment.tsx +++ b/src/core/client/admin/App/DecisionHistory/ApprovedComment.tsx @@ -1,6 +1,8 @@ import { Localized } from "fluent-react/compat"; import React, { FunctionComponent } from "react"; +import { Typography } from "coral-ui/components"; + import ApprovedIcon from "./ApprovedIcon"; import DecisionItem from "./DecisionItem"; import DotDivider from "./DotDivider"; @@ -9,8 +11,6 @@ import GoToCommentLink from "./GoToCommentLink"; import Info from "./Info"; import Timestamp from "./Timestamp"; -import { Typography } from "coral-ui/components"; - interface Props { href: string; username: string; diff --git a/src/core/client/admin/App/DecisionHistory/DecisionHistoryContainer.tsx b/src/core/client/admin/App/DecisionHistory/DecisionHistoryContainer.tsx index dea635741..e2582aaa0 100644 --- a/src/core/client/admin/App/DecisionHistory/DecisionHistoryContainer.tsx +++ b/src/core/client/admin/App/DecisionHistory/DecisionHistoryContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql, RelayPaginationProp } from "react-relay"; +import { withPaginationContainer } from "coral-framework/lib/relay"; + import { DecisionHistoryContainer_viewer as ViewerData } from "coral-admin/__generated__/DecisionHistoryContainer_viewer.graphql"; import { DecisionHistoryContainerPaginationQueryVariables } from "coral-admin/__generated__/DecisionHistoryContainerPaginationQuery.graphql"; -import { withPaginationContainer } from "coral-framework/lib/relay"; import DecisionHistory from "./DecisionHistory"; @@ -45,7 +46,7 @@ export class DecisionHistoryContainer extends React.Component< error => { this.setState({ disableLoadMore: false }); if (error) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.error(error); } } diff --git a/src/core/client/admin/App/DecisionHistory/DecisionHistoryItemContainer.tsx b/src/core/client/admin/App/DecisionHistory/DecisionHistoryItemContainer.tsx index 307b6c728..f8c17443e 100644 --- a/src/core/client/admin/App/DecisionHistory/DecisionHistoryItemContainer.tsx +++ b/src/core/client/admin/App/DecisionHistory/DecisionHistoryItemContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { DecisionHistoryItemContainer_action as ActionData } from "coral-admin/__generated__/DecisionHistoryItemContainer_action.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { DecisionHistoryItemContainer_action as ActionData } from "coral-admin/__generated__/DecisionHistoryItemContainer_action.graphql"; + import ApprovedComment from "./ApprovedComment"; import RejectedComment from "./RejectedComment"; @@ -16,9 +17,7 @@ class DecisionHistoryItemContainer extends React.Component< DecisionHistoryItemContainerProps > { public render() { - const href = `/admin/moderate/comment/${ - this.props.action.revision.comment.id - }`; + const href = `/admin/moderate/comment/${this.props.action.revision.comment.id}`; const username = (this.props.action.revision.comment.author && this.props.action.revision.comment.author.username) || diff --git a/src/core/client/admin/App/DecisionHistory/DecisionHistoryQuery.tsx b/src/core/client/admin/App/DecisionHistory/DecisionHistoryQuery.tsx index 7eebc3832..0245a4f01 100644 --- a/src/core/client/admin/App/DecisionHistory/DecisionHistoryQuery.tsx +++ b/src/core/client/admin/App/DecisionHistory/DecisionHistoryQuery.tsx @@ -1,6 +1,7 @@ -import { graphql, QueryRenderer } from "coral-framework/lib/relay"; import React, { Component } from "react"; +import { graphql, QueryRenderer } from "coral-framework/lib/relay"; + import { DecisionHistoryQuery as QueryTypes } from "coral-admin/__generated__/DecisionHistoryQuery.graphql"; import DecisionHistoryContainer from "./DecisionHistoryContainer"; diff --git a/src/core/client/admin/App/DecisionHistory/RejectedComment.tsx b/src/core/client/admin/App/DecisionHistory/RejectedComment.tsx index c601406ee..017698356 100644 --- a/src/core/client/admin/App/DecisionHistory/RejectedComment.tsx +++ b/src/core/client/admin/App/DecisionHistory/RejectedComment.tsx @@ -1,6 +1,8 @@ import { Localized } from "fluent-react/compat"; import React, { FunctionComponent } from "react"; +import { Typography } from "coral-ui/components"; + import DecisionItem from "./DecisionItem"; import DotDivider from "./DotDivider"; import Footer from "./Footer"; @@ -9,8 +11,6 @@ import Info from "./Info"; import RejectedIcon from "./RejectedIcon"; import Timestamp from "./Timestamp"; -import { Typography } from "coral-ui/components"; - interface Props { href: string; username: string; diff --git a/src/core/client/admin/App/Main.spec.tsx b/src/core/client/admin/App/Main.spec.tsx index 0102b2943..c60072fea 100644 --- a/src/core/client/admin/App/Main.spec.tsx +++ b/src/core/client/admin/App/Main.spec.tsx @@ -1,7 +1,7 @@ -import { removeFragmentRefs } from "coral-framework/testHelpers"; import React from "react"; import { createRenderer } from "react-test-renderer/shallow"; +import { removeFragmentRefs } from "coral-framework/testHelpers"; import { PropTypesOf } from "coral-framework/types"; import Main from "./Main"; diff --git a/src/core/client/admin/App/MainRoute.tsx b/src/core/client/admin/App/MainRoute.tsx index 4e51a2685..9e93419f9 100644 --- a/src/core/client/admin/App/MainRoute.tsx +++ b/src/core/client/admin/App/MainRoute.tsx @@ -1,10 +1,10 @@ import React from "react"; -import { MainRouteQueryResponse } from "coral-admin/__generated__/MainRouteQuery.graphql"; - import { graphql } from "coral-framework/lib/relay"; import { withRouteConfig } from "coral-framework/lib/router"; +import { MainRouteQueryResponse } from "coral-admin/__generated__/MainRouteQuery.graphql"; + import Main from "./Main"; interface Props { diff --git a/src/core/client/admin/App/Navigation/NavigationContainer.tsx b/src/core/client/admin/App/Navigation/NavigationContainer.tsx index 472ecf513..3f4ff3376 100644 --- a/src/core/client/admin/App/Navigation/NavigationContainer.tsx +++ b/src/core/client/admin/App/Navigation/NavigationContainer.tsx @@ -1,6 +1,5 @@ import React from "react"; -import { NavigationContainer_viewer as ViewerData } from "coral-admin/__generated__/NavigationContainer_viewer.graphql"; import { Ability, can } from "coral-admin/permissions"; import { graphql, withFragmentContainer } from "coral-framework/lib/relay"; import { @@ -8,6 +7,8 @@ import { withSignOutMutation, } from "coral-framework/mutations"; +import { NavigationContainer_viewer as ViewerData } from "coral-admin/__generated__/NavigationContainer_viewer.graphql"; + import Navigation from "./Navigation"; interface Props { diff --git a/src/core/client/admin/App/UserMenu/UserMenuContainer.tsx b/src/core/client/admin/App/UserMenu/UserMenuContainer.tsx index aa82a0576..ee70a58d7 100644 --- a/src/core/client/admin/App/UserMenu/UserMenuContainer.tsx +++ b/src/core/client/admin/App/UserMenu/UserMenuContainer.tsx @@ -1,12 +1,13 @@ import React from "react"; -import { UserMenuContainer_viewer as ViewerData } from "coral-admin/__generated__/UserMenuContainer_viewer.graphql"; import { graphql, withFragmentContainer } from "coral-framework/lib/relay"; import { SignOutMutation, withSignOutMutation, } from "coral-framework/mutations"; +import { UserMenuContainer_viewer as ViewerData } from "coral-admin/__generated__/UserMenuContainer_viewer.graphql"; + import UserMenu from "./UserMenu"; interface Props { diff --git a/src/core/client/admin/components/AutoLoadMore.tsx b/src/core/client/admin/components/AutoLoadMore.tsx index d6f5f2751..86cb1f6a9 100644 --- a/src/core/client/admin/components/AutoLoadMore.tsx +++ b/src/core/client/admin/components/AutoLoadMore.tsx @@ -11,7 +11,7 @@ interface Props { } class AutoLoadMoresContainer extends React.Component { - public componentWillReceiveProps(nextProps: Props) { + public UNSAFE_componentWillReceiveProps(nextProps: Props) { if (nextProps.inView && !nextProps.disableLoadMore) { nextProps.onLoadMore(); } diff --git a/src/core/client/admin/components/ModerateCard/ApproveButton.spec.tsx b/src/core/client/admin/components/ModerateCard/ApproveButton.spec.tsx index 832ac2d97..87808cd0e 100644 --- a/src/core/client/admin/components/ModerateCard/ApproveButton.spec.tsx +++ b/src/core/client/admin/components/ModerateCard/ApproveButton.spec.tsx @@ -1,10 +1,10 @@ import React from "react"; import { createRenderer } from "react-test-renderer/shallow"; -import ApproveButton from "./ApproveButton"; - import { PropTypesOf } from "coral-framework/types"; +import ApproveButton from "./ApproveButton"; + it("renders correctly", () => { const props: PropTypesOf = { invert: false, diff --git a/src/core/client/admin/components/ModerateCard/CommentContent.spec.tsx b/src/core/client/admin/components/ModerateCard/CommentContent.spec.tsx index 8691ea5c7..2e35350ec 100644 --- a/src/core/client/admin/components/ModerateCard/CommentContent.spec.tsx +++ b/src/core/client/admin/components/ModerateCard/CommentContent.spec.tsx @@ -1,10 +1,10 @@ import React from "react"; import { createRenderer } from "react-test-renderer/shallow"; -import CommentContent from "./CommentContent"; - import { PropTypesOf } from "coral-framework/types"; +import CommentContent from "./CommentContent"; + it("renders correctly", () => { const props: PropTypesOf = { suspectWords: ["worse"], diff --git a/src/core/client/admin/components/ModerateCard/CommentRevisionContainer.tsx b/src/core/client/admin/components/ModerateCard/CommentRevisionContainer.tsx index 5581b68cf..1dadd742e 100644 --- a/src/core/client/admin/components/ModerateCard/CommentRevisionContainer.tsx +++ b/src/core/client/admin/components/ModerateCard/CommentRevisionContainer.tsx @@ -1,9 +1,10 @@ import React, { FunctionComponent } from "react"; +import { graphql, withFragmentContainer } from "coral-framework/lib/relay"; +import { HorizontalGutter, Timestamp } from "coral-ui/components"; + import { CommentRevisionContainer_comment as CommentData } from "coral-admin/__generated__/CommentRevisionContainer_comment.graphql"; import { CommentRevisionContainer_settings as SettingsData } from "coral-admin/__generated__/CommentRevisionContainer_settings.graphql"; -import { graphql, withFragmentContainer } from "coral-framework/lib/relay"; -import { HorizontalGutter, Timestamp } from "coral-ui/components"; import CommentContent from "./CommentContent"; diff --git a/src/core/client/admin/components/ModerateCard/FeatureCommentMutation.ts b/src/core/client/admin/components/ModerateCard/FeatureCommentMutation.ts index 598e6f56e..3a89e78ff 100644 --- a/src/core/client/admin/components/ModerateCard/FeatureCommentMutation.ts +++ b/src/core/client/admin/components/ModerateCard/FeatureCommentMutation.ts @@ -1,7 +1,6 @@ import { graphql } from "react-relay"; import { ConnectionHandler, Environment } from "relay-runtime"; -import { FeatureCommentMutation } from "coral-admin/__generated__/FeatureCommentMutation.graphql"; import { getQueueConnection } from "coral-admin/helpers"; import { CoralContext } from "coral-framework/lib/bootstrap"; import { @@ -11,6 +10,8 @@ import { } from "coral-framework/lib/relay"; import { GQLCOMMENT_STATUS, GQLTAG } from "coral-framework/schema"; +import { FeatureCommentMutation } from "coral-admin/__generated__/FeatureCommentMutation.graphql"; + let clientMutationId = 0; const FeatureCommentMutation = createMutation( diff --git a/src/core/client/admin/components/ModerateCard/FlagDetailsContainer.tsx b/src/core/client/admin/components/ModerateCard/FlagDetailsContainer.tsx index 6147c6e7f..60a782f54 100644 --- a/src/core/client/admin/components/ModerateCard/FlagDetailsContainer.tsx +++ b/src/core/client/admin/components/ModerateCard/FlagDetailsContainer.tsx @@ -2,14 +2,15 @@ import { Localized } from "fluent-react/compat"; import React, { FunctionComponent } from "react"; import { graphql } from "react-relay"; -import { FlagDetailsContainer_comment } from "coral-admin/__generated__/FlagDetailsContainer_comment.graphql"; -import { FlagDetailsContainer_settings } from "coral-admin/__generated__/FlagDetailsContainer_settings.graphql"; import NotAvailable from "coral-admin/components/NotAvailable"; import { TOXICITY_THRESHOLD_DEFAULT } from "coral-common/constants"; import { withFragmentContainer } from "coral-framework/lib/relay"; import { GQLCOMMENT_FLAG_REASON } from "coral-framework/schema"; import { HorizontalGutter } from "coral-ui/components"; +import { FlagDetailsContainer_comment } from "coral-admin/__generated__/FlagDetailsContainer_comment.graphql"; +import { FlagDetailsContainer_settings } from "coral-admin/__generated__/FlagDetailsContainer_settings.graphql"; + import FlagDetailsCategory from "./FlagDetailsCategory"; import FlagDetailsEntry from "./FlagDetailsEntry"; import ToxicityLabel from "./ToxicityLabel"; diff --git a/src/core/client/admin/components/ModerateCard/FlagDetailsEntry.tsx b/src/core/client/admin/components/ModerateCard/FlagDetailsEntry.tsx index edf7664fb..e4bc62788 100644 --- a/src/core/client/admin/components/ModerateCard/FlagDetailsEntry.tsx +++ b/src/core/client/admin/components/ModerateCard/FlagDetailsEntry.tsx @@ -1,6 +1,7 @@ import React, { FunctionComponent } from "react"; import { BaseButton } from "coral-ui/components"; + import styles from "./FlagDetailsEntry.css"; interface Props { diff --git a/src/core/client/admin/components/ModerateCard/MarkersContainer.tsx b/src/core/client/admin/components/ModerateCard/MarkersContainer.tsx index ff5468b7a..43fdc8c7b 100644 --- a/src/core/client/admin/components/ModerateCard/MarkersContainer.tsx +++ b/src/core/client/admin/components/ModerateCard/MarkersContainer.tsx @@ -2,10 +2,12 @@ import { Localized } from "fluent-react/compat"; import React from "react"; import { graphql } from "react-relay"; -import { MarkersContainer_comment } from "coral-admin/__generated__/MarkersContainer_comment.graphql"; -import { MarkersContainer_settings } from "coral-admin/__generated__/MarkersContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; import { Marker, MarkerCount } from "coral-ui/components"; + +import { MarkersContainer_comment } from "coral-admin/__generated__/MarkersContainer_comment.graphql"; +import { MarkersContainer_settings } from "coral-admin/__generated__/MarkersContainer_settings.graphql"; + import Markers from "./Markers"; import ModerateCardDetailsContainer from "./ModerateCardDetailsContainer"; diff --git a/src/core/client/admin/components/ModerateCard/ModerateCardContainer.tsx b/src/core/client/admin/components/ModerateCard/ModerateCardContainer.tsx index 9c595df83..91cc8481c 100644 --- a/src/core/client/admin/components/ModerateCard/ModerateCardContainer.tsx +++ b/src/core/client/admin/components/ModerateCard/ModerateCardContainer.tsx @@ -2,16 +2,13 @@ import { Match, Router, withRouter } from "found"; import React, { FunctionComponent, useCallback, useState } from "react"; import { graphql } from "react-relay"; -import { - COMMENT_STATUS, - ModerateCardContainer_comment, -} from "coral-admin/__generated__/ModerateCardContainer_comment.graphql"; -import { ModerateCardContainer_settings } from "coral-admin/__generated__/ModerateCardContainer_settings.graphql"; -import { ModerateCardContainer_viewer } from "coral-admin/__generated__/ModerateCardContainer_viewer.graphql"; import NotAvailable from "coral-admin/components/NotAvailable"; +import BanModal from "coral-admin/components/UserStatus/BanModal"; import { getModerationLink } from "coral-admin/helpers"; -import { ApproveCommentMutation } from "coral-admin/mutations"; -import { RejectCommentMutation } from "coral-admin/mutations"; +import { + ApproveCommentMutation, + RejectCommentMutation, +} from "coral-admin/mutations"; import FadeInTransition from "coral-framework/components/FadeInTransition"; import { MutationProp, @@ -21,7 +18,13 @@ import { import { GQLUSER_STATUS } from "coral-framework/schema"; import { GQLTAG } from "coral-framework/schema"; -import BanModal from "coral-admin/components/UserStatus/BanModal"; +import { + COMMENT_STATUS, + ModerateCardContainer_comment, +} from "coral-admin/__generated__/ModerateCardContainer_comment.graphql"; +import { ModerateCardContainer_settings } from "coral-admin/__generated__/ModerateCardContainer_settings.graphql"; +import { ModerateCardContainer_viewer } from "coral-admin/__generated__/ModerateCardContainer_viewer.graphql"; + import BanCommentUserMutation from "./BanCommentUserMutation"; import FeatureCommentMutation from "./FeatureCommentMutation"; import ModerateCard from "./ModerateCard"; diff --git a/src/core/client/admin/components/ModerateCard/ModerateCardDetailsContainer.tsx b/src/core/client/admin/components/ModerateCard/ModerateCardDetailsContainer.tsx index ce4bfdfa8..32d861c7f 100644 --- a/src/core/client/admin/components/ModerateCard/ModerateCardDetailsContainer.tsx +++ b/src/core/client/admin/components/ModerateCard/ModerateCardDetailsContainer.tsx @@ -2,13 +2,15 @@ import { Localized } from "fluent-react/compat"; import React, { FunctionComponent, useState } from "react"; import { graphql } from "react-relay"; -import { ModerateCardDetailsContainer_comment as CommentData } from "coral-admin/__generated__/ModerateCardDetailsContainer_comment.graphql"; -import { ModerateCardDetailsContainer_settings as SettingsData } from "coral-admin/__generated__/ModerateCardDetailsContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; import { Flex, HorizontalGutter, Icon, Tab, TabBar } from "coral-ui/components"; +import { ModerateCardDetailsContainer_comment as CommentData } from "coral-admin/__generated__/ModerateCardDetailsContainer_comment.graphql"; +import { ModerateCardDetailsContainer_settings as SettingsData } from "coral-admin/__generated__/ModerateCardDetailsContainer_settings.graphql"; + import CommentRevisionContainer from "./CommentRevisionContainer"; import FlagDetailsContainer from "./FlagDetailsContainer"; + import styles from "./ModerateCardDetailsContainer.css"; interface Props { diff --git a/src/core/client/admin/components/ModerateCard/ModeratedByContainer.tsx b/src/core/client/admin/components/ModerateCard/ModeratedByContainer.tsx index 47268cc4b..2f0ddf7f7 100644 --- a/src/core/client/admin/components/ModerateCard/ModeratedByContainer.tsx +++ b/src/core/client/admin/components/ModerateCard/ModeratedByContainer.tsx @@ -2,11 +2,12 @@ import { Localized } from "fluent-react/compat"; import React, { useCallback } from "react"; import { graphql } from "react-relay"; -import { ModeratedByContainer_comment } from "coral-admin/__generated__/ModeratedByContainer_comment.graphql"; -import { ModeratedByContainer_viewer } from "coral-admin/__generated__/ModeratedByContainer_viewer.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; import { BaseButton } from "coral-ui/components"; +import { ModeratedByContainer_comment } from "coral-admin/__generated__/ModeratedByContainer_comment.graphql"; +import { ModeratedByContainer_viewer } from "coral-admin/__generated__/ModeratedByContainer_viewer.graphql"; + import styles from "./ModeratedByContainer.css"; interface Props { diff --git a/src/core/client/admin/components/ModerateCard/RejectButton.spec.tsx b/src/core/client/admin/components/ModerateCard/RejectButton.spec.tsx index b7df9bd89..b1198e758 100644 --- a/src/core/client/admin/components/ModerateCard/RejectButton.spec.tsx +++ b/src/core/client/admin/components/ModerateCard/RejectButton.spec.tsx @@ -1,10 +1,10 @@ import React from "react"; import { createRenderer } from "react-test-renderer/shallow"; -import RejectButton from "./RejectButton"; - import { PropTypesOf } from "coral-framework/types"; +import RejectButton from "./RejectButton"; + it("renders correctly", () => { const props: PropTypesOf = { invert: false, diff --git a/src/core/client/admin/components/ModerateCard/UnfeatureCommentMutation.ts b/src/core/client/admin/components/ModerateCard/UnfeatureCommentMutation.ts index abb366348..7bcba6c1a 100644 --- a/src/core/client/admin/components/ModerateCard/UnfeatureCommentMutation.ts +++ b/src/core/client/admin/components/ModerateCard/UnfeatureCommentMutation.ts @@ -7,6 +7,7 @@ import { MutationInput, } from "coral-framework/lib/relay"; import { GQLTAG } from "coral-framework/schema"; + import { UnfeatureCommentMutation } from "coral-stream/__generated__/UnfeatureCommentMutation.graphql"; let clientMutationId = 0; diff --git a/src/core/client/admin/components/UserHistoryDrawer/AccountHistoryAction.tsx b/src/core/client/admin/components/UserHistoryDrawer/AccountHistoryAction.tsx index 68c0dc6ea..65f137d58 100644 --- a/src/core/client/admin/components/UserHistoryDrawer/AccountHistoryAction.tsx +++ b/src/core/client/admin/components/UserHistoryDrawer/AccountHistoryAction.tsx @@ -22,13 +22,15 @@ const AccountHistoryAction: FunctionComponent = ({ }) => { switch (kind) { case "username": - return ; + return ( + + ); case "suspension": - return ; + return ; case "ban": - return ; + return ; case "premod": - return ; + return ; default: return null; } diff --git a/src/core/client/admin/components/UserHistoryDrawer/RecentHistoryContainer.tsx b/src/core/client/admin/components/UserHistoryDrawer/RecentHistoryContainer.tsx index 33c5522ad..ecc0991e9 100644 --- a/src/core/client/admin/components/UserHistoryDrawer/RecentHistoryContainer.tsx +++ b/src/core/client/admin/components/UserHistoryDrawer/RecentHistoryContainer.tsx @@ -1,9 +1,11 @@ import React, { FunctionComponent, useMemo } from "react"; +import { graphql, withFragmentContainer } from "coral-framework/lib/relay"; +import { GQLCOMMENT_STATUS } from "coral-framework/schema"; + import { RecentHistoryContainer_settings } from "coral-admin/__generated__/RecentHistoryContainer_settings.graphql"; import { RecentHistoryContainer_user } from "coral-admin/__generated__/RecentHistoryContainer_user.graphql"; -import { graphql, withFragmentContainer } from "coral-framework/lib/relay"; -import { GQLCOMMENT_STATUS } from "coral-framework/schema"; + import RecentHistory from "./RecentHistory"; const PUBLISHED_STATUSES = [GQLCOMMENT_STATUS.NONE, GQLCOMMENT_STATUS.APPROVED]; diff --git a/src/core/client/admin/components/UserHistoryDrawer/UserBadgesContainer.tsx b/src/core/client/admin/components/UserHistoryDrawer/UserBadgesContainer.tsx index 23e62c06c..36cc5793a 100644 --- a/src/core/client/admin/components/UserHistoryDrawer/UserBadgesContainer.tsx +++ b/src/core/client/admin/components/UserHistoryDrawer/UserBadgesContainer.tsx @@ -1,12 +1,12 @@ import React, { FunctionComponent } from "react"; import { graphql } from "react-relay"; -import { UserBadgesContainer_user as UserData } from "coral-admin/__generated__/UserBadgesContainer_user.graphql"; import withFragmentContainer from "coral-framework/lib/relay/withFragmentContainer"; - import CLASSES from "coral-stream/classes"; import { Tag } from "coral-ui/components"; +import { UserBadgesContainer_user as UserData } from "coral-admin/__generated__/UserBadgesContainer_user.graphql"; + interface Props { user: UserData; } diff --git a/src/core/client/admin/components/UserHistoryDrawer/UserDrawerAccountHistory.tsx b/src/core/client/admin/components/UserHistoryDrawer/UserDrawerAccountHistory.tsx index b305d7488..b81882995 100644 --- a/src/core/client/admin/components/UserHistoryDrawer/UserDrawerAccountHistory.tsx +++ b/src/core/client/admin/components/UserHistoryDrawer/UserDrawerAccountHistory.tsx @@ -1,8 +1,6 @@ import { Localized } from "fluent-react/compat"; import React, { FunctionComponent, useMemo } from "react"; -import { UserDrawerAccountHistory_user } from "coral-admin/__generated__/UserDrawerAccountHistory_user.graphql"; - import { useCoralContext } from "coral-framework/lib/bootstrap"; import { graphql, withFragmentContainer } from "coral-framework/lib/relay"; import { @@ -16,6 +14,8 @@ import { TableRow, } from "coral-ui/components"; +import { UserDrawerAccountHistory_user } from "coral-admin/__generated__/UserDrawerAccountHistory_user.graphql"; + import AccountHistoryAction, { HistoryActionProps, } from "./AccountHistoryAction"; diff --git a/src/core/client/admin/components/UserHistoryDrawer/UserDrawerAccountHistoryQuery.tsx b/src/core/client/admin/components/UserHistoryDrawer/UserDrawerAccountHistoryQuery.tsx index e457a812b..0a0c127fd 100644 --- a/src/core/client/admin/components/UserHistoryDrawer/UserDrawerAccountHistoryQuery.tsx +++ b/src/core/client/admin/components/UserHistoryDrawer/UserDrawerAccountHistoryQuery.tsx @@ -1,12 +1,12 @@ -import { graphql, QueryRenderer } from "coral-framework/lib/relay"; import { Localized } from "fluent-react/compat"; import React, { FunctionComponent } from "react"; import { ReadyState } from "react-relay"; -import { UserDrawerAccountHistoryQuery as QueryTypes } from "coral-admin/__generated__/UserDrawerAccountHistoryQuery.graphql"; - +import { graphql, QueryRenderer } from "coral-framework/lib/relay"; import { CallOut, Spinner } from "coral-ui/components"; +import { UserDrawerAccountHistoryQuery as QueryTypes } from "coral-admin/__generated__/UserDrawerAccountHistoryQuery.graphql"; + import UserDrawerAccountHistory from "./UserDrawerAccountHistory"; import styles from "./UserDrawerAccountHistoryQuery.css"; diff --git a/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerAllComments.tsx b/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerAllComments.tsx index 475171f07..e91f78d12 100644 --- a/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerAllComments.tsx +++ b/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerAllComments.tsx @@ -1,19 +1,19 @@ +import { Localized } from "fluent-react/compat"; +import React, { FunctionComponent, useCallback } from "react"; +import { graphql, RelayPaginationProp } from "react-relay"; + +import { ModerateCardContainer } from "coral-admin/components/ModerateCard"; import { useLoadMore, withPaginationContainer, } from "coral-framework/lib/relay"; -import { Localized } from "fluent-react/compat"; -import React, { FunctionComponent, useCallback } from "react"; -import { graphql, RelayPaginationProp } from "react-relay"; +import { Button, CallOut, Typography } from "coral-ui/components"; import { UserHistoryDrawerAllComments_settings } from "coral-admin/__generated__/UserHistoryDrawerAllComments_settings.graphql"; import { UserHistoryDrawerAllComments_user } from "coral-admin/__generated__/UserHistoryDrawerAllComments_user.graphql"; import { UserHistoryDrawerAllComments_viewer } from "coral-admin/__generated__/UserHistoryDrawerAllComments_viewer.graphql"; import { UserHistoryDrawerAllCommentsPaginationQueryVariables } from "coral-admin/__generated__/UserHistoryDrawerAllCommentsPaginationQuery.graphql"; -import { ModerateCardContainer } from "coral-admin/components/ModerateCard"; -import { Button, CallOut, Typography } from "coral-ui/components"; - import styles from "./UserHistoryDrawerAllComments.css"; interface Props { diff --git a/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerAllCommentsQuery.tsx b/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerAllCommentsQuery.tsx index 7a2d7c4d2..868fa28d1 100644 --- a/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerAllCommentsQuery.tsx +++ b/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerAllCommentsQuery.tsx @@ -2,10 +2,10 @@ import { Localized } from "fluent-react/compat"; import React, { FunctionComponent } from "react"; import { ReadyState } from "react-relay"; +import { graphql, QueryRenderer } from "coral-framework/lib/relay"; import { CallOut, Spinner } from "coral-ui/components"; import { UserHistoryDrawerAllCommentsQuery as QueryTypes } from "coral-admin/__generated__/UserHistoryDrawerAllCommentsQuery.graphql"; -import { graphql, QueryRenderer } from "coral-framework/lib/relay"; import UserHistoryDrawerAllComments from "./UserHistoryDrawerAllComments"; @@ -60,7 +60,7 @@ const UserHistoryDrawerAllCommentsQuery: FunctionComponent = ({ ); diff --git a/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerContainer.tsx b/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerContainer.tsx index 8f1137716..a07a85f6e 100644 --- a/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerContainer.tsx +++ b/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerContainer.tsx @@ -1,14 +1,15 @@ import { Localized } from "fluent-react/compat"; import React, { FunctionComponent } from "react"; -import { UserHistoryDrawerContainer_settings } from "coral-admin/__generated__/UserHistoryDrawerContainer_settings.graphql"; -import { UserHistoryDrawerContainer_user } from "coral-admin/__generated__/UserHistoryDrawerContainer_user.graphql"; import { UserStatusChangeContainer } from "coral-admin/components/UserStatus"; import { CopyButton } from "coral-framework/components"; import { useCoralContext } from "coral-framework/lib/bootstrap"; import { graphql, withFragmentContainer } from "coral-framework/lib/relay"; import { Button, Flex, Icon, Typography } from "coral-ui/components"; +import { UserHistoryDrawerContainer_settings } from "coral-admin/__generated__/UserHistoryDrawerContainer_settings.graphql"; +import { UserHistoryDrawerContainer_user } from "coral-admin/__generated__/UserHistoryDrawerContainer_user.graphql"; + import RecentHistoryContainer from "./RecentHistoryContainer"; import Tabs from "./Tabs"; import UserBadgesContainer from "./UserBadgesContainer"; diff --git a/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerQuery.tsx b/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerQuery.tsx index 129df3518..cf971bc87 100644 --- a/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerQuery.tsx +++ b/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerQuery.tsx @@ -2,10 +2,11 @@ import { Localized } from "fluent-react/compat"; import React, { FunctionComponent } from "react"; import { ReadyState } from "react-relay"; -import { UserHistoryDrawerQuery as QueryTypes } from "coral-admin/__generated__/UserHistoryDrawerQuery.graphql"; import { graphql, QueryRenderer } from "coral-framework/lib/relay"; import { CallOut, Spinner } from "coral-ui/components"; +import { UserHistoryDrawerQuery as QueryTypes } from "coral-admin/__generated__/UserHistoryDrawerQuery.graphql"; + import UserHistoryDrawerContainer from "./UserHistoryDrawerContainer"; import styles from "./UserHistoryDrawerQuery.css"; diff --git a/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerRejectedComments.tsx b/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerRejectedComments.tsx index 7dbc219fe..236820682 100644 --- a/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerRejectedComments.tsx +++ b/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerRejectedComments.tsx @@ -1,19 +1,19 @@ +import { Localized } from "fluent-react/compat"; +import React, { FunctionComponent, useCallback } from "react"; +import { graphql, RelayPaginationProp } from "react-relay"; + +import { ModerateCardContainer } from "coral-admin/components/ModerateCard"; import { useLoadMore, withPaginationContainer, } from "coral-framework/lib/relay"; -import { Localized } from "fluent-react/compat"; -import React, { FunctionComponent, useCallback } from "react"; -import { graphql, RelayPaginationProp } from "react-relay"; +import { Button, CallOut, Typography } from "coral-ui/components"; import { UserHistoryDrawerRejectedComments_settings } from "coral-admin/__generated__/UserHistoryDrawerRejectedComments_settings.graphql"; import { UserHistoryDrawerRejectedComments_user } from "coral-admin/__generated__/UserHistoryDrawerRejectedComments_user.graphql"; import { UserHistoryDrawerRejectedComments_viewer } from "coral-admin/__generated__/UserHistoryDrawerRejectedComments_viewer.graphql"; import { UserHistoryDrawerRejectedCommentsPaginationQueryVariables } from "coral-admin/__generated__/UserHistoryDrawerRejectedCommentsPaginationQuery.graphql"; -import { ModerateCardContainer } from "coral-admin/components/ModerateCard"; -import { Button, CallOut, Typography } from "coral-ui/components"; - import styles from "./UserHistoryDrawerRejectedComments.css"; interface Props { diff --git a/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerRejectedCommentsQuery.tsx b/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerRejectedCommentsQuery.tsx index 3ed290c62..9c73b98d5 100644 --- a/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerRejectedCommentsQuery.tsx +++ b/src/core/client/admin/components/UserHistoryDrawer/UserHistoryDrawerRejectedCommentsQuery.tsx @@ -2,11 +2,11 @@ import { Localized } from "fluent-react/compat"; import React, { FunctionComponent } from "react"; import { ReadyState } from "react-relay"; -import { UserHistoryDrawerRejectedCommentsQuery as QueryTypes } from "coral-admin/__generated__/UserHistoryDrawerRejectedCommentsQuery.graphql"; - import { graphql, QueryRenderer } from "coral-framework/lib/relay"; import { CallOut, Spinner } from "coral-ui/components"; +import { UserHistoryDrawerRejectedCommentsQuery as QueryTypes } from "coral-admin/__generated__/UserHistoryDrawerRejectedCommentsQuery.graphql"; + import UserHistoryDrawerRejectedComments from "./UserHistoryDrawerRejectedComments"; import styles from "./UserHistoryDrawerRejectedCommentsQuery.css"; @@ -60,7 +60,7 @@ const UserHistoryDrawerRejectedCommentsQuery: FunctionComponent = ({ ); diff --git a/src/core/client/admin/components/UserHistoryDrawer/UserStatusDetailsContainer.tsx b/src/core/client/admin/components/UserHistoryDrawer/UserStatusDetailsContainer.tsx index 5118533e4..20416ab2f 100644 --- a/src/core/client/admin/components/UserHistoryDrawer/UserStatusDetailsContainer.tsx +++ b/src/core/client/admin/components/UserHistoryDrawer/UserStatusDetailsContainer.tsx @@ -1,9 +1,8 @@ -import { graphql, withFragmentContainer } from "coral-framework/lib/relay"; import { Localized } from "fluent-react/compat"; import React, { FunctionComponent, useMemo } from "react"; -import { UserStatusDetailsContainer_user as UserData } from "coral-admin/__generated__/UserStatusDetailsContainer_user.graphql"; import { useCoralContext } from "coral-framework/lib/bootstrap"; +import { graphql, withFragmentContainer } from "coral-framework/lib/relay"; import { BaseButton, Box, @@ -13,6 +12,8 @@ import { Typography, } from "coral-ui/components"; +import { UserStatusDetailsContainer_user as UserData } from "coral-admin/__generated__/UserStatusDetailsContainer_user.graphql"; + interface Props { user: UserData; } diff --git a/src/core/client/admin/components/UserRole/UpdateUserRoleMutation.ts b/src/core/client/admin/components/UserRole/UpdateUserRoleMutation.ts index 318bbc43a..8201105c8 100644 --- a/src/core/client/admin/components/UserRole/UpdateUserRoleMutation.ts +++ b/src/core/client/admin/components/UserRole/UpdateUserRoleMutation.ts @@ -1,13 +1,14 @@ import { graphql } from "react-relay"; import { Environment } from "relay-runtime"; -import { UpdateUserRoleMutation as MutationTypes } from "coral-admin/__generated__/UpdateUserRoleMutation.graphql"; import { commitMutationPromiseNormalized, createMutation, MutationInput, } from "coral-framework/lib/relay"; +import { UpdateUserRoleMutation as MutationTypes } from "coral-admin/__generated__/UpdateUserRoleMutation.graphql"; + let clientMutationId = 0; const UpdateUserRoleMutation = createMutation( diff --git a/src/core/client/admin/components/UserRole/UserRoleChange.tsx b/src/core/client/admin/components/UserRole/UserRoleChange.tsx index 80f0aeea7..0268203ac 100644 --- a/src/core/client/admin/components/UserRole/UserRoleChange.tsx +++ b/src/core/client/admin/components/UserRole/UserRoleChange.tsx @@ -12,9 +12,10 @@ import { Popover, } from "coral-ui/components"; -import styles from "./UserRoleChange.css"; import UserRoleText from "./UserRoleText"; +import styles from "./UserRoleChange.css"; + interface Props { onChangeRole: (role: GQLUSER_ROLE_RL) => void; role: GQLUSER_ROLE_RL; diff --git a/src/core/client/admin/components/UserRole/UserRoleChangeContainer.tsx b/src/core/client/admin/components/UserRole/UserRoleChangeContainer.tsx index d8e4f37fc..a5589bed1 100644 --- a/src/core/client/admin/components/UserRole/UserRoleChangeContainer.tsx +++ b/src/core/client/admin/components/UserRole/UserRoleChangeContainer.tsx @@ -1,7 +1,5 @@ import React, { FunctionComponent, useCallback } from "react"; -import { UserRoleChangeContainer_user } from "coral-admin/__generated__/UserRoleChangeContainer_user.graphql"; -import { UserRoleChangeContainer_viewer } from "coral-admin/__generated__/UserRoleChangeContainer_viewer.graphql"; import { Ability, can } from "coral-admin/permissions"; import { graphql, @@ -10,6 +8,9 @@ import { } from "coral-framework/lib/relay"; import { GQLUSER_ROLE_RL } from "coral-framework/schema"; +import { UserRoleChangeContainer_user } from "coral-admin/__generated__/UserRoleChangeContainer_user.graphql"; +import { UserRoleChangeContainer_viewer } from "coral-admin/__generated__/UserRoleChangeContainer_viewer.graphql"; + import ButtonPadding from "../ButtonPadding"; import UpdateUserRoleMutation from "./UpdateUserRoleMutation"; import UserRoleChange from "./UserRoleChange"; diff --git a/src/core/client/admin/components/UserStatus/BanModal.tsx b/src/core/client/admin/components/UserStatus/BanModal.tsx index 5cdd2e63f..b6c3cb355 100644 --- a/src/core/client/admin/components/UserStatus/BanModal.tsx +++ b/src/core/client/admin/components/UserStatus/BanModal.tsx @@ -1,3 +1,9 @@ +import { Localized } from "fluent-react/compat"; +import React, { FunctionComponent, useCallback, useMemo } from "react"; +import { Field, Form } from "react-final-form"; + +import NotAvailable from "coral-admin/components/NotAvailable"; +import { GetMessage, withGetMessage } from "coral-framework/lib/i18n"; import { Button, Card, @@ -8,12 +14,6 @@ import { Modal, Typography, } from "coral-ui/components"; -import { Localized } from "fluent-react/compat"; -import React, { FunctionComponent, useCallback, useMemo } from "react"; -import { Field, Form } from "react-final-form"; - -import NotAvailable from "coral-admin/components/NotAvailable"; -import { GetMessage, withGetMessage } from "coral-framework/lib/i18n"; import styles from "./BanModal.css"; diff --git a/src/core/client/admin/components/UserStatus/BanUserMutation.ts b/src/core/client/admin/components/UserStatus/BanUserMutation.ts index 7a497d3d1..a2c906917 100644 --- a/src/core/client/admin/components/UserStatus/BanUserMutation.ts +++ b/src/core/client/admin/components/UserStatus/BanUserMutation.ts @@ -1,7 +1,6 @@ import { graphql } from "react-relay"; import { Environment } from "relay-runtime"; -import { BanUserMutation as MutationTypes } from "coral-admin/__generated__/BanUserMutation.graphql"; import { getViewer } from "coral-framework/helpers"; import { commitMutationPromiseNormalized, @@ -11,6 +10,8 @@ import { } from "coral-framework/lib/relay"; import { GQLUser, GQLUSER_STATUS } from "coral-framework/schema"; +import { BanUserMutation as MutationTypes } from "coral-admin/__generated__/BanUserMutation.graphql"; + let clientMutationId = 0; const BanUserMutation = createMutation( diff --git a/src/core/client/admin/components/UserStatus/PremodModal.tsx b/src/core/client/admin/components/UserStatus/PremodModal.tsx index 830754cc5..0253ddcd6 100644 --- a/src/core/client/admin/components/UserStatus/PremodModal.tsx +++ b/src/core/client/admin/components/UserStatus/PremodModal.tsx @@ -1,3 +1,7 @@ +import { Localized } from "fluent-react/compat"; +import React, { FunctionComponent } from "react"; + +import NotAvailable from "coral-admin/components/NotAvailable"; import { Button, Card, @@ -7,10 +11,6 @@ import { Modal, Typography, } from "coral-ui/components"; -import { Localized } from "fluent-react/compat"; -import React, { FunctionComponent } from "react"; - -import NotAvailable from "coral-admin/components/NotAvailable"; import styles from "./PremodModal.css"; diff --git a/src/core/client/admin/components/UserStatus/PremodUserMutation.ts b/src/core/client/admin/components/UserStatus/PremodUserMutation.ts index 42b392dec..372103add 100644 --- a/src/core/client/admin/components/UserStatus/PremodUserMutation.ts +++ b/src/core/client/admin/components/UserStatus/PremodUserMutation.ts @@ -1,7 +1,6 @@ import { graphql } from "react-relay"; import { Environment } from "relay-runtime"; -import { PremodUserMutation as MutationTypes } from "coral-admin/__generated__/PremodUserMutation.graphql"; import { getViewer } from "coral-framework/helpers"; import { commitMutationPromiseNormalized, @@ -11,6 +10,8 @@ import { } from "coral-framework/lib/relay"; import { GQLUser, GQLUSER_STATUS } from "coral-framework/schema"; +import { PremodUserMutation as MutationTypes } from "coral-admin/__generated__/PremodUserMutation.graphql"; + let clientMutationId = 0; const PremodUserMutation = createMutation( diff --git a/src/core/client/admin/components/UserStatus/RemoveUserBanMutation.ts b/src/core/client/admin/components/UserStatus/RemoveUserBanMutation.ts index 2d15eea95..4b9745ec8 100644 --- a/src/core/client/admin/components/UserStatus/RemoveUserBanMutation.ts +++ b/src/core/client/admin/components/UserStatus/RemoveUserBanMutation.ts @@ -1,7 +1,6 @@ import { graphql } from "react-relay"; import { Environment } from "relay-runtime"; -import { RemoveUserBanMutation as MutationTypes } from "coral-admin/__generated__/RemoveUserBanMutation.graphql"; import { commitMutationPromiseNormalized, createMutation, @@ -10,6 +9,8 @@ import { } from "coral-framework/lib/relay"; import { GQLUser, GQLUSER_STATUS } from "coral-framework/schema"; +import { RemoveUserBanMutation as MutationTypes } from "coral-admin/__generated__/RemoveUserBanMutation.graphql"; + let clientMutationId = 0; const RemoveUserBanMutation = createMutation( diff --git a/src/core/client/admin/components/UserStatus/RemoveUserPremodMutation.ts b/src/core/client/admin/components/UserStatus/RemoveUserPremodMutation.ts index 02d1bbb5a..bca1af8f0 100644 --- a/src/core/client/admin/components/UserStatus/RemoveUserPremodMutation.ts +++ b/src/core/client/admin/components/UserStatus/RemoveUserPremodMutation.ts @@ -1,7 +1,6 @@ import { graphql } from "react-relay"; import { Environment } from "relay-runtime"; -import { RemoveUserPremodMutation as MutationTypes } from "coral-admin/__generated__/RemoveUserPremodMutation.graphql"; import { getViewer } from "coral-framework/helpers"; import { commitMutationPromiseNormalized, @@ -11,6 +10,8 @@ import { } from "coral-framework/lib/relay"; import { GQLUser, GQLUSER_STATUS } from "coral-framework/schema"; +import { RemoveUserPremodMutation as MutationTypes } from "coral-admin/__generated__/RemoveUserPremodMutation.graphql"; + let clientMutationId = 0; const RemoveUserPremodMutation = createMutation( diff --git a/src/core/client/admin/components/UserStatus/RemoveUserSuspensionMutation.ts b/src/core/client/admin/components/UserStatus/RemoveUserSuspensionMutation.ts index e0abf84aa..9cbb33050 100644 --- a/src/core/client/admin/components/UserStatus/RemoveUserSuspensionMutation.ts +++ b/src/core/client/admin/components/UserStatus/RemoveUserSuspensionMutation.ts @@ -2,7 +2,6 @@ import { pick } from "lodash"; import { graphql } from "react-relay"; import { Environment } from "relay-runtime"; -import { RemoveUserSuspensionMutation as MutationTypes } from "coral-admin/__generated__/RemoveUserSuspensionMutation.graphql"; import { DeepWritable } from "coral-common/types"; import { commitMutationPromiseNormalized, @@ -12,6 +11,8 @@ import { } from "coral-framework/lib/relay"; import { GQLUser, GQLUSER_STATUS } from "coral-framework/schema"; +import { RemoveUserSuspensionMutation as MutationTypes } from "coral-admin/__generated__/RemoveUserSuspensionMutation.graphql"; + let clientMutationId = 0; const RemoveUserSuspensionMutation = createMutation( diff --git a/src/core/client/admin/components/UserStatus/SuspendUserMutation.ts b/src/core/client/admin/components/UserStatus/SuspendUserMutation.ts index 95e25edc6..688589b2a 100644 --- a/src/core/client/admin/components/UserStatus/SuspendUserMutation.ts +++ b/src/core/client/admin/components/UserStatus/SuspendUserMutation.ts @@ -2,7 +2,6 @@ import { DateTime } from "luxon"; import { graphql } from "react-relay"; import { Environment } from "relay-runtime"; -import { SuspendUserMutation as MutationTypes } from "coral-admin/__generated__/SuspendUserMutation.graphql"; import { getViewer } from "coral-framework/helpers"; import { commitMutationPromiseNormalized, @@ -12,6 +11,8 @@ import { } from "coral-framework/lib/relay"; import { GQLUser, GQLUSER_STATUS } from "coral-framework/schema"; +import { SuspendUserMutation as MutationTypes } from "coral-admin/__generated__/SuspendUserMutation.graphql"; + let clientMutationId = 0; const SuspendUserMutation = createMutation( diff --git a/src/core/client/admin/components/UserStatus/UserStatus.tsx b/src/core/client/admin/components/UserStatus/UserStatus.tsx index d80d68ff7..8bd83f077 100644 --- a/src/core/client/admin/components/UserStatus/UserStatus.tsx +++ b/src/core/client/admin/components/UserStatus/UserStatus.tsx @@ -25,7 +25,7 @@ const UserStatus: FunctionComponent = props => { if (props.banned) { return render( "error", - // tslint:disable-next-line:jsx-wrap-multiline + // eslint-disable-next-line:jsx-wrap-multiline
Banned
@@ -34,7 +34,7 @@ const UserStatus: FunctionComponent = props => { if (props.suspended) { return render( "warning", - // tslint:disable-next-line:jsx-wrap-multiline + // eslint-disable-next-line:jsx-wrap-multiline
Suspended
@@ -43,7 +43,7 @@ const UserStatus: FunctionComponent = props => { if (props.premod) { return render( "warning", - // tslint:disable-next-line:jsx-wrap-multiline + // eslint-disable-next-line:jsx-wrap-multiline
Always Premoderated
@@ -51,7 +51,7 @@ const UserStatus: FunctionComponent = props => { } return render( "success", - // tslint:disable-next-line:jsx-wrap-multiline + // eslint-disable-next-line:jsx-wrap-multiline
Active
diff --git a/src/core/client/admin/components/UserStatus/UserStatusChangeContainer.tsx b/src/core/client/admin/components/UserStatus/UserStatusChangeContainer.tsx index e72ee13cf..5b8ef0c5a 100644 --- a/src/core/client/admin/components/UserStatus/UserStatusChangeContainer.tsx +++ b/src/core/client/admin/components/UserStatus/UserStatusChangeContainer.tsx @@ -1,7 +1,5 @@ import React, { FunctionComponent, useCallback, useState } from "react"; -import { UserStatusChangeContainer_settings as SettingsData } from "coral-admin/__generated__/UserStatusChangeContainer_settings.graphql"; -import { UserStatusChangeContainer_user as UserData } from "coral-admin/__generated__/UserStatusChangeContainer_user.graphql"; import { graphql, useMutation, @@ -9,6 +7,9 @@ import { } from "coral-framework/lib/relay"; import { GQLUSER_ROLE } from "coral-framework/schema"; +import { UserStatusChangeContainer_settings as SettingsData } from "coral-admin/__generated__/UserStatusChangeContainer_settings.graphql"; +import { UserStatusChangeContainer_user as UserData } from "coral-admin/__generated__/UserStatusChangeContainer_user.graphql"; + import ButtonPadding from "../ButtonPadding"; import BanModal from "./BanModal"; import BanUserMutation from "./BanUserMutation"; diff --git a/src/core/client/admin/components/UserStatus/UserStatusContainer.tsx b/src/core/client/admin/components/UserStatus/UserStatusContainer.tsx index 09d003453..4ffd5e0a3 100644 --- a/src/core/client/admin/components/UserStatus/UserStatusContainer.tsx +++ b/src/core/client/admin/components/UserStatus/UserStatusContainer.tsx @@ -1,10 +1,11 @@ import React, { FunctionComponent } from "react"; import { graphql } from "react-relay"; -import { UserStatusContainer_user as UserData } from "coral-admin/__generated__/UserStatusContainer_user.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; import { GQLUSER_STATUS } from "coral-framework/schema"; +import { UserStatusContainer_user as UserData } from "coral-admin/__generated__/UserStatusContainer_user.graphql"; + import UserStatus from "./UserStatus"; interface Props { diff --git a/src/core/client/admin/index.tsx b/src/core/client/admin/index.tsx index 2814b3014..50eac4933 100644 --- a/src/core/client/admin/index.tsx +++ b/src/core/client/admin/index.tsx @@ -1,7 +1,8 @@ -import { createManaged } from "coral-framework/lib/bootstrap"; import React, { FunctionComponent } from "react"; import ReactDOM from "react-dom"; +import { createManaged } from "coral-framework/lib/bootstrap"; + import App from "./App"; import Head from "./Head"; import { initLocalState } from "./local"; diff --git a/src/core/client/admin/locales.ts b/src/core/client/admin/locales.ts index b0f080a61..c42c7c111 100644 --- a/src/core/client/admin/locales.ts +++ b/src/core/client/admin/locales.ts @@ -6,4 +6,5 @@ */ import { LocalesData } from "coral-framework/lib/i18n"; + export default {} as LocalesData; diff --git a/src/core/client/admin/mutations/ApproveCommentMutation.ts b/src/core/client/admin/mutations/ApproveCommentMutation.ts index c019631ff..4b4cf874f 100644 --- a/src/core/client/admin/mutations/ApproveCommentMutation.ts +++ b/src/core/client/admin/mutations/ApproveCommentMutation.ts @@ -1,7 +1,6 @@ import { graphql } from "react-relay"; import { ConnectionHandler, Environment } from "relay-runtime"; -import { ApproveCommentMutation as MutationTypes } from "coral-admin/__generated__/ApproveCommentMutation.graphql"; import { getQueueConnection } from "coral-admin/helpers"; import { commitMutationPromiseNormalized, @@ -9,6 +8,8 @@ import { MutationInput, } from "coral-framework/lib/relay"; +import { ApproveCommentMutation as MutationTypes } from "coral-admin/__generated__/ApproveCommentMutation.graphql"; + let clientMutationId = 0; const ApproveCommentMutation = createMutation( diff --git a/src/core/client/admin/mutations/RejectCommentMutation.ts b/src/core/client/admin/mutations/RejectCommentMutation.ts index c78efa270..c4fe2d9d4 100644 --- a/src/core/client/admin/mutations/RejectCommentMutation.ts +++ b/src/core/client/admin/mutations/RejectCommentMutation.ts @@ -1,7 +1,6 @@ import { graphql } from "react-relay"; import { ConnectionHandler, Environment } from "relay-runtime"; -import { RejectCommentMutation as MutationTypes } from "coral-admin/__generated__/RejectCommentMutation.graphql"; import { getQueueConnection } from "coral-admin/helpers"; import { commitMutationPromiseNormalized, @@ -9,6 +8,8 @@ import { MutationInput, } from "coral-framework/lib/relay"; +import { RejectCommentMutation as MutationTypes } from "coral-admin/__generated__/RejectCommentMutation.graphql"; + let clientMutationId = 0; const RejectCommentMutation = createMutation( diff --git a/src/core/client/admin/mutations/SetRedirectPathMutation.spec.ts b/src/core/client/admin/mutations/SetRedirectPathMutation.spec.ts index 034ec5af4..10b013137 100644 --- a/src/core/client/admin/mutations/SetRedirectPathMutation.spec.ts +++ b/src/core/client/admin/mutations/SetRedirectPathMutation.spec.ts @@ -2,12 +2,12 @@ import { Environment, RecordSource } from "relay-runtime"; import { REDIRECT_PATH_KEY } from "coral-admin/constants"; import { LOCAL_ID } from "coral-framework/lib/relay"; -import { createRelayEnvironment } from "coral-framework/testHelpers"; - import { createInMemoryStorage, createPromisifiedStorage, } from "coral-framework/lib/storage"; +import { createRelayEnvironment } from "coral-framework/testHelpers"; + import SetRedirectPathMutation from "./SetRedirectPathMutation"; let environment: Environment; diff --git a/src/core/client/admin/permissions.tsx b/src/core/client/admin/permissions.tsx index db0cb55b9..ed318f3b4 100644 --- a/src/core/client/admin/permissions.tsx +++ b/src/core/client/admin/permissions.tsx @@ -1,6 +1,7 @@ -import { GQLUSER_ROLE, GQLUSER_ROLE_RL } from "coral-framework/schema"; import { mapValues } from "lodash"; +import { GQLUSER_ROLE, GQLUSER_ROLE_RL } from "coral-framework/schema"; + /** * permissionMap describes what abilities certain roles have. * @@ -26,7 +27,7 @@ const permissionMap = { export type AbilityType = keyof typeof permissionMap; export const Ability = mapValues(permissionMap, (_, key) => key) as { - [P in AbilityType]: P + [P in AbilityType]: P; }; /** diff --git a/src/core/client/admin/routeConfig.tsx b/src/core/client/admin/routeConfig.tsx index dded23a70..158526561 100644 --- a/src/core/client/admin/routeConfig.tsx +++ b/src/core/client/admin/routeConfig.tsx @@ -2,6 +2,7 @@ import { makeRouteConfig, Redirect, Route } from "found"; import React from "react"; import { GQLUSER_ROLE } from "coral-framework/schema"; + import MainRoute from "./App/MainRoute"; import { Ability } from "./permissions"; import { createAuthCheckRoute } from "./routes/AuthCheck"; diff --git a/src/core/client/admin/routes/AuthCheck/AuthCheckRoute.tsx b/src/core/client/admin/routes/AuthCheck/AuthCheckRoute.tsx index ebc21389d..3f46f0364 100644 --- a/src/core/client/admin/routes/AuthCheck/AuthCheckRoute.tsx +++ b/src/core/client/admin/routes/AuthCheck/AuthCheckRoute.tsx @@ -1,7 +1,6 @@ import { Match, Router, withRouter } from "found"; import React from "react"; -import { AuthCheckRouteQueryResponse } from "coral-admin/__generated__/AuthCheckRouteQuery.graphql"; import { SetRedirectPathMutation } from "coral-admin/mutations"; import { AbilityType, can } from "coral-admin/permissions"; import { roleIsAtLeast } from "coral-framework/helpers"; @@ -9,6 +8,8 @@ import { graphql, MutationProp, withMutation } from "coral-framework/lib/relay"; import { withRouteConfig } from "coral-framework/lib/router"; import { GQLUSER_ROLE } from "coral-framework/schema"; +import { AuthCheckRouteQueryResponse } from "coral-admin/__generated__/AuthCheckRouteQuery.graphql"; + import RestrictedContainer from "./RestrictedContainer"; interface Props { @@ -36,7 +37,7 @@ function createAuthCheckRoute(check: CheckParams) { this.redirectIfNotLoggedIn(); } - public componentWillReceiveProps(nextProps: Props) { + public UNSAFE_componentWillReceiveProps(nextProps: Props) { if (nextProps.data && nextProps.data.viewer) { this.wasLoggedIn = true; } @@ -54,7 +55,7 @@ function createAuthCheckRoute(check: CheckParams) { } private hasAccess(props: Props = this.props) { - const { viewer } = props.data!; + const { viewer } = props.data; if (viewer) { if ( (check.role && !roleIsAtLeast(viewer.role, check.role)) || diff --git a/src/core/client/admin/routes/AuthCheck/RestrictedContainer.tsx b/src/core/client/admin/routes/AuthCheck/RestrictedContainer.tsx index be4b55f5e..0b315dec3 100644 --- a/src/core/client/admin/routes/AuthCheck/RestrictedContainer.tsx +++ b/src/core/client/admin/routes/AuthCheck/RestrictedContainer.tsx @@ -1,7 +1,6 @@ import { RouteProps } from "found"; import React, { Component } from "react"; -import { RestrictedContainer_viewer as ViewerData } from "coral-admin/__generated__/RestrictedContainer_viewer.graphql"; import { SetRedirectPathMutation } from "coral-admin/mutations"; import { timeout } from "coral-common/utils"; import { @@ -15,6 +14,8 @@ import { withSignOutMutation, } from "coral-framework/mutations"; +import { RestrictedContainer_viewer as ViewerData } from "coral-admin/__generated__/RestrictedContainer_viewer.graphql"; + import Restricted from "./Restricted"; interface Props { diff --git a/src/core/client/admin/routes/Community/CommunityRoute.tsx b/src/core/client/admin/routes/Community/CommunityRoute.tsx index 1ee7ea9de..05cddc79b 100644 --- a/src/core/client/admin/routes/Community/CommunityRoute.tsx +++ b/src/core/client/admin/routes/Community/CommunityRoute.tsx @@ -2,9 +2,10 @@ import { FormApi } from "final-form"; import React, { FunctionComponent } from "react"; import { graphql } from "react-relay"; -import { CommunityRouteQueryResponse } from "coral-admin/__generated__/CommunityRouteQuery.graphql"; import { withRouteConfig } from "coral-framework/lib/router"; +import { CommunityRouteQueryResponse } from "coral-admin/__generated__/CommunityRouteQuery.graphql"; + import Community from "./Community"; interface Props { diff --git a/src/core/client/admin/routes/Community/InviteUsers/InviteUsersContainer.tsx b/src/core/client/admin/routes/Community/InviteUsers/InviteUsersContainer.tsx index 88578dddd..674cfbbc7 100644 --- a/src/core/client/admin/routes/Community/InviteUsers/InviteUsersContainer.tsx +++ b/src/core/client/admin/routes/Community/InviteUsers/InviteUsersContainer.tsx @@ -1,9 +1,10 @@ import React, { FunctionComponent } from "react"; +import { Ability, can } from "coral-admin/permissions"; +import { graphql, withFragmentContainer } from "coral-framework/lib/relay"; + import { InviteUsersContainer_settings } from "coral-admin/__generated__/InviteUsersContainer_settings.graphql"; import { InviteUsersContainer_viewer } from "coral-admin/__generated__/InviteUsersContainer_viewer.graphql"; -import { Ability, can } from "coral-admin/permissions"; -import { graphql, withFragmentContainer } from "coral-framework/lib/relay"; import InviteUsers from "./InviteUsers"; diff --git a/src/core/client/admin/routes/Community/InviteUsers/InviteUsersMutation.ts b/src/core/client/admin/routes/Community/InviteUsers/InviteUsersMutation.ts index 62db09523..7698a72d3 100644 --- a/src/core/client/admin/routes/Community/InviteUsers/InviteUsersMutation.ts +++ b/src/core/client/admin/routes/Community/InviteUsers/InviteUsersMutation.ts @@ -1,13 +1,14 @@ import { graphql } from "react-relay"; import { Environment } from "relay-runtime"; -import { InviteUsersMutation } from "coral-admin/__generated__/InviteUsersMutation.graphql"; import { commitMutationPromiseNormalized, createMutation, MutationInput, } from "coral-framework/lib/relay"; +import { InviteUsersMutation } from "coral-admin/__generated__/InviteUsersMutation.graphql"; + let clientMutationId = 0; const InviteUsersMutation = createMutation( diff --git a/src/core/client/admin/routes/Community/UserRowContainer.tsx b/src/core/client/admin/routes/Community/UserRowContainer.tsx index 97d068f6b..a777cdd66 100644 --- a/src/core/client/admin/routes/Community/UserRowContainer.tsx +++ b/src/core/client/admin/routes/Community/UserRowContainer.tsx @@ -1,11 +1,12 @@ import React, { FunctionComponent } from "react"; import { graphql } from "react-relay"; +import { useCoralContext } from "coral-framework/lib/bootstrap"; +import { withFragmentContainer } from "coral-framework/lib/relay"; + import { UserRowContainer_settings as SettingsData } from "coral-admin/__generated__/UserRowContainer_settings.graphql"; import { UserRowContainer_user as UserData } from "coral-admin/__generated__/UserRowContainer_user.graphql"; import { UserRowContainer_viewer as ViewerData } from "coral-admin/__generated__/UserRowContainer_viewer.graphql"; -import { useCoralContext } from "coral-framework/lib/bootstrap"; -import { withFragmentContainer } from "coral-framework/lib/relay"; import UserRow from "./UserRow"; @@ -24,7 +25,7 @@ const UserRowContainer: FunctionComponent = props => { settings={props.settings} viewer={props.viewer} userID={props.user.id} - username={props.user.username!} + username={props.user.username} email={props.user.email} memberSince={new Intl.DateTimeFormat(locales, { day: "2-digit", diff --git a/src/core/client/admin/routes/Community/UserTable.tsx b/src/core/client/admin/routes/Community/UserTable.tsx index e18cc5133..1df9cff4b 100644 --- a/src/core/client/admin/routes/Community/UserTable.tsx +++ b/src/core/client/admin/routes/Community/UserTable.tsx @@ -1,10 +1,10 @@ import { Localized } from "fluent-react/compat"; import React, { FunctionComponent, useCallback, useState } from "react"; -import { PropTypesOf } from "coral-framework/types"; - import AutoLoadMore from "coral-admin/components/AutoLoadMore"; import UserHistoryDrawer from "coral-admin/components/UserHistoryDrawer"; +import { PropTypesOf } from "coral-framework/types"; +import { Flex, HorizontalGutter, Spinner } from "coral-ui/components"; import { Table, TableBody, @@ -13,10 +13,8 @@ import { TableRow, } from "coral-ui/components/Table"; -import UserRowContainer from "./UserRowContainer"; - -import { Flex, HorizontalGutter, Spinner } from "coral-ui/components"; import EmptyMessage from "./EmptyMessage"; +import UserRowContainer from "./UserRowContainer"; import styles from "./UserTable.css"; diff --git a/src/core/client/admin/routes/Community/UserTableContainer.tsx b/src/core/client/admin/routes/Community/UserTableContainer.tsx index d9f71e2d4..ff612998c 100644 --- a/src/core/client/admin/routes/Community/UserTableContainer.tsx +++ b/src/core/client/admin/routes/Community/UserTableContainer.tsx @@ -1,8 +1,6 @@ import React, { FunctionComponent, useState } from "react"; import { graphql, RelayPaginationProp } from "react-relay"; -import { UserTableContainer_query as QueryData } from "coral-admin/__generated__/UserTableContainer_query.graphql"; -import { UserTableContainerPaginationQueryVariables } from "coral-admin/__generated__/UserTableContainerPaginationQuery.graphql"; import { IntersectionProvider } from "coral-framework/lib/intersection"; import { useLoadMore, @@ -10,8 +8,11 @@ import { withPaginationContainer, } from "coral-framework/lib/relay"; import { GQLUSER_ROLE_RL, GQLUSER_STATUS_RL } from "coral-framework/schema"; - import { HorizontalGutter } from "coral-ui/components"; + +import { UserTableContainer_query as QueryData } from "coral-admin/__generated__/UserTableContainer_query.graphql"; +import { UserTableContainerPaginationQueryVariables } from "coral-admin/__generated__/UserTableContainerPaginationQuery.graphql"; + import UserTable from "./UserTable"; import UserTableFilter from "./UserTableFilter"; diff --git a/src/core/client/admin/routes/Configure/Layout.tsx b/src/core/client/admin/routes/Configure/Layout.tsx index 0e46a067f..ca932d866 100644 --- a/src/core/client/admin/routes/Configure/Layout.tsx +++ b/src/core/client/admin/routes/Configure/Layout.tsx @@ -1,6 +1,7 @@ -import { Flex } from "coral-ui/components"; import React, { FunctionComponent } from "react"; +import { Flex } from "coral-ui/components"; + import styles from "./Layout.css"; const Layout: FunctionComponent = ({ children }) => ( diff --git a/src/core/client/admin/routes/Configure/Subheader.tsx b/src/core/client/admin/routes/Configure/Subheader.tsx index 123ca41ba..c0dba4908 100644 --- a/src/core/client/admin/routes/Configure/Subheader.tsx +++ b/src/core/client/admin/routes/Configure/Subheader.tsx @@ -1,6 +1,7 @@ -import { Typography } from "coral-ui/components"; import React, { FunctionComponent } from "react"; +import { Typography } from "coral-ui/components"; + import styles from "./Subheader.css"; const Subheader: FunctionComponent = ({ children }) => ( diff --git a/src/core/client/admin/routes/Configure/UpdateSettingsMutation.ts b/src/core/client/admin/routes/Configure/UpdateSettingsMutation.ts index 96b880069..449b2bf04 100644 --- a/src/core/client/admin/routes/Configure/UpdateSettingsMutation.ts +++ b/src/core/client/admin/routes/Configure/UpdateSettingsMutation.ts @@ -1,13 +1,14 @@ import { graphql } from "react-relay"; import { Environment } from "relay-runtime"; -import { UpdateSettingsMutation as MutationTypes } from "coral-admin/__generated__/UpdateSettingsMutation.graphql"; import { commitMutationPromiseNormalized, createMutation, MutationInput, } from "coral-framework/lib/relay"; +import { UpdateSettingsMutation as MutationTypes } from "coral-admin/__generated__/UpdateSettingsMutation.graphql"; + let clientMutationId = 0; const UpdateSettingsMutation = createMutation( diff --git a/src/core/client/admin/routes/Configure/sections/Advanced/AdvancedConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Advanced/AdvancedConfigContainer.tsx index a07853973..edc2a0e43 100644 --- a/src/core/client/admin/routes/Configure/sections/Advanced/AdvancedConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Advanced/AdvancedConfigContainer.tsx @@ -3,10 +3,11 @@ import { RouteProps } from "found"; import React from "react"; import { graphql } from "react-relay"; -import { AdvancedConfigContainer_settings } from "coral-admin/__generated__/AdvancedConfigContainer_settings.graphql"; import { pureMerge } from "coral-common/utils"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { AdvancedConfigContainer_settings } from "coral-admin/__generated__/AdvancedConfigContainer_settings.graphql"; + import AdvancedConfig from "./AdvancedConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/Advanced/AdvancedConfigRoute.tsx b/src/core/client/admin/routes/Configure/sections/Advanced/AdvancedConfigRoute.tsx index 94042f309..14af65e6f 100644 --- a/src/core/client/admin/routes/Configure/sections/Advanced/AdvancedConfigRoute.tsx +++ b/src/core/client/admin/routes/Configure/sections/Advanced/AdvancedConfigRoute.tsx @@ -2,10 +2,11 @@ import { FormApi } from "final-form"; import React from "react"; import { graphql } from "react-relay"; -import { AdvancedConfigRouteQueryResponse } from "coral-admin/__generated__/AdvancedConfigRouteQuery.graphql"; import { withRouteConfig } from "coral-framework/lib/router"; import { Delay, Spinner } from "coral-ui/components"; +import { AdvancedConfigRouteQueryResponse } from "coral-admin/__generated__/AdvancedConfigRouteQuery.graphql"; + import AdvancedConfigContainer from "./AdvancedConfigContainer"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/Advanced/CommentStreamLiveUpdatesContainer.tsx b/src/core/client/admin/routes/Configure/sections/Advanced/CommentStreamLiveUpdatesContainer.tsx index 17e6d5297..68a41a14f 100644 --- a/src/core/client/admin/routes/Configure/sections/Advanced/CommentStreamLiveUpdatesContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Advanced/CommentStreamLiveUpdatesContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; +import { withFragmentContainer } from "coral-framework/lib/relay"; + import { CommentStreamLiveUpdatesContainer_settings } from "coral-admin/__generated__/CommentStreamLiveUpdatesContainer_settings.graphql"; import { CommentStreamLiveUpdatesContainer_settingsReadOnly } from "coral-admin/__generated__/CommentStreamLiveUpdatesContainer_settingsReadOnly.graphql"; -import { withFragmentContainer } from "coral-framework/lib/relay"; import CommentStreamLiveUpdates from "./CommentStreamLiveUpdates"; diff --git a/src/core/client/admin/routes/Configure/sections/Advanced/CustomCSSConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Advanced/CustomCSSConfigContainer.tsx index 39d4e3f22..298e93ed3 100644 --- a/src/core/client/admin/routes/Configure/sections/Advanced/CustomCSSConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Advanced/CustomCSSConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { CustomCSSConfigContainer_settings as SettingsData } from "coral-admin/__generated__/CustomCSSConfigContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { CustomCSSConfigContainer_settings as SettingsData } from "coral-admin/__generated__/CustomCSSConfigContainer_settings.graphql"; + import CustomCSSConfig from "./CustomCSSConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/Advanced/EmbedCodeContainer.tsx b/src/core/client/admin/routes/Configure/sections/Advanced/EmbedCodeContainer.tsx index 75e877523..268e0a0a2 100644 --- a/src/core/client/admin/routes/Configure/sections/Advanced/EmbedCodeContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Advanced/EmbedCodeContainer.tsx @@ -1,9 +1,10 @@ import React, { FunctionComponent } from "react"; import { graphql } from "react-relay"; -import { EmbedCodeContainer_settings } from "coral-admin/__generated__/EmbedCodeContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { EmbedCodeContainer_settings } from "coral-admin/__generated__/EmbedCodeContainer_settings.graphql"; + import EmbedCode from "./EmbedCode"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/Advanced/PermittedDomainsConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Advanced/PermittedDomainsConfigContainer.tsx index a0287fe6f..5aa2c9c35 100644 --- a/src/core/client/admin/routes/Configure/sections/Advanced/PermittedDomainsConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Advanced/PermittedDomainsConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { PermittedDomainsConfigContainer_settings as SettingsData } from "coral-admin/__generated__/PermittedDomainsConfigContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { PermittedDomainsConfigContainer_settings as SettingsData } from "coral-admin/__generated__/PermittedDomainsConfigContainer_settings.graphql"; + import PermittedDomainsConfig from "./PermittedDomainsConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/Advanced/StoryCreationConfig.tsx b/src/core/client/admin/routes/Configure/sections/Advanced/StoryCreationConfig.tsx index 948958df5..0c3c63e12 100644 --- a/src/core/client/admin/routes/Configure/sections/Advanced/StoryCreationConfig.tsx +++ b/src/core/client/admin/routes/Configure/sections/Advanced/StoryCreationConfig.tsx @@ -12,9 +12,9 @@ import { TextField, Typography, } from "coral-ui/components"; -import OnOffField from "../../OnOffField"; import Header from "../../Header"; +import OnOffField from "../../OnOffField"; interface Props { disabled: boolean; diff --git a/src/core/client/admin/routes/Configure/sections/Advanced/StoryCreationConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Advanced/StoryCreationConfigContainer.tsx index eff26496b..1d00b4e0e 100644 --- a/src/core/client/admin/routes/Configure/sections/Advanced/StoryCreationConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Advanced/StoryCreationConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { StoryCreationConfigContainer_settings as SettingsData } from "coral-admin/__generated__/StoryCreationConfigContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { StoryCreationConfigContainer_settings as SettingsData } from "coral-admin/__generated__/StoryCreationConfigContainer_settings.graphql"; + import StoryCreationConfig from "./StoryCreationConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/Auth/AccountFeaturesConfig.tsx b/src/core/client/admin/routes/Configure/sections/Auth/AccountFeaturesConfig.tsx index 6af9371a1..b299356ba 100644 --- a/src/core/client/admin/routes/Configure/sections/Auth/AccountFeaturesConfig.tsx +++ b/src/core/client/admin/routes/Configure/sections/Auth/AccountFeaturesConfig.tsx @@ -9,9 +9,9 @@ import { InputLabel, Typography, } from "coral-ui/components"; -import OnOffField from "../../OnOffField"; import Header from "../../Header"; +import OnOffField from "../../OnOffField"; import SectionContent from "../../SectionContent"; import styles from "./AccountFeaturesConfig.css"; diff --git a/src/core/client/admin/routes/Configure/sections/Auth/AccountFeaturesConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Auth/AccountFeaturesConfigContainer.tsx index 3e7446ce9..c6ee6f646 100644 --- a/src/core/client/admin/routes/Configure/sections/Auth/AccountFeaturesConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Auth/AccountFeaturesConfigContainer.tsx @@ -1,11 +1,12 @@ import React from "react"; import { graphql } from "react-relay"; -import { AccountFeaturesConfigContainer_settings as SettingsData } from "coral-admin/__generated__/AccountFeaturesConfigContainer_settings.graphql"; import { DeepNullable, DeepPartial } from "coral-common/types"; import { withFragmentContainer } from "coral-framework/lib/relay"; - import { GQLSettings } from "coral-framework/schema"; + +import { AccountFeaturesConfigContainer_settings as SettingsData } from "coral-admin/__generated__/AccountFeaturesConfigContainer_settings.graphql"; + import AccountFeaturesConfig from "./AccountFeaturesConfig"; export type FormProps = DeepNullable>; diff --git a/src/core/client/admin/routes/Configure/sections/Auth/AuthConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Auth/AuthConfigContainer.tsx index 9d301c009..9bc454e3b 100644 --- a/src/core/client/admin/routes/Configure/sections/Auth/AuthConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Auth/AuthConfigContainer.tsx @@ -4,8 +4,6 @@ import { RouteProps } from "found"; import React from "react"; import { graphql } from "react-relay"; -import { AuthConfigContainer_auth as AuthData } from "coral-admin/__generated__/AuthConfigContainer_auth.graphql"; -import { AuthConfigContainer_settings as SettingsData } from "coral-admin/__generated__/AuthConfigContainer_settings.graphql"; import { DeepNullable, DeepPartial } from "coral-common/types"; import { pureMerge } from "coral-common/utils"; import { CoralContext, withContext } from "coral-framework/lib/bootstrap"; @@ -20,6 +18,9 @@ import { withFragmentContainer } from "coral-framework/lib/relay"; import { GQLSettings } from "coral-framework/schema"; import { HorizontalGutter } from "coral-ui/components"; +import { AuthConfigContainer_auth as AuthData } from "coral-admin/__generated__/AuthConfigContainer_auth.graphql"; +import { AuthConfigContainer_settings as SettingsData } from "coral-admin/__generated__/AuthConfigContainer_settings.graphql"; + import AccountFeaturesConfigContainer from "./AccountFeaturesConfigContainer"; import AuthConfig from "./AuthConfig"; diff --git a/src/core/client/admin/routes/Configure/sections/Auth/AuthConfigRoute.tsx b/src/core/client/admin/routes/Configure/sections/Auth/AuthConfigRoute.tsx index c56de4370..46b31c673 100644 --- a/src/core/client/admin/routes/Configure/sections/Auth/AuthConfigRoute.tsx +++ b/src/core/client/admin/routes/Configure/sections/Auth/AuthConfigRoute.tsx @@ -2,10 +2,11 @@ import { FormApi } from "final-form"; import React from "react"; import { graphql } from "react-relay"; -import { AuthConfigRouteContainerQueryResponse } from "coral-admin/__generated__/AuthConfigRouteContainerQuery.graphql"; import { withRouteConfig } from "coral-framework/lib/router"; import { Delay, Spinner } from "coral-ui/components"; +import { AuthConfigRouteContainerQueryResponse } from "coral-admin/__generated__/AuthConfigRouteContainerQuery.graphql"; + import AuthConfigContainer from "./AuthConfigContainer"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/Auth/ConfigBoxWithToggleField.tsx b/src/core/client/admin/routes/Configure/sections/Auth/ConfigBoxWithToggleField.tsx index 483d1a73a..d0c883712 100644 --- a/src/core/client/admin/routes/Configure/sections/Auth/ConfigBoxWithToggleField.tsx +++ b/src/core/client/admin/routes/Configure/sections/Auth/ConfigBoxWithToggleField.tsx @@ -1,8 +1,8 @@ -import { parseBool } from "coral-framework/lib/form"; import { Localized } from "fluent-react/compat"; import React, { FunctionComponent } from "react"; import { Field } from "react-final-form"; +import { parseBool } from "coral-framework/lib/form"; import { CheckBox, FormField } from "coral-ui/components"; import ConfigBox from "../../ConfigBox"; diff --git a/src/core/client/admin/routes/Configure/sections/Auth/DiscoverOIDCConfigurationFetch.ts b/src/core/client/admin/routes/Configure/sections/Auth/DiscoverOIDCConfigurationFetch.ts index 8cb933d65..829c02dc8 100644 --- a/src/core/client/admin/routes/Configure/sections/Auth/DiscoverOIDCConfigurationFetch.ts +++ b/src/core/client/admin/routes/Configure/sections/Auth/DiscoverOIDCConfigurationFetch.ts @@ -1,13 +1,14 @@ import { graphql } from "react-relay"; import { Environment } from "relay-runtime"; -import { DiscoverOIDCConfigurationFetchQuery as QueryTypes } from "coral-admin/__generated__/DiscoverOIDCConfigurationFetchQuery.graphql"; import { createFetch, fetchQuery, FetchVariables, } from "coral-framework/lib/relay"; +import { DiscoverOIDCConfigurationFetchQuery as QueryTypes } from "coral-admin/__generated__/DiscoverOIDCConfigurationFetchQuery.graphql"; + const DiscoverOIDCConfigurationFetch = createFetch( "discoverOIDCConfiguration", (environment: Environment, variables: FetchVariables) => { diff --git a/src/core/client/admin/routes/Configure/sections/Auth/FacebookConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Auth/FacebookConfigContainer.tsx index f3ab60713..7814afd2f 100644 --- a/src/core/client/admin/routes/Configure/sections/Auth/FacebookConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Auth/FacebookConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; +import { withFragmentContainer } from "coral-framework/lib/relay"; + import { FacebookConfigContainer_auth as AuthData } from "coral-admin/__generated__/FacebookConfigContainer_auth.graphql"; import { FacebookConfigContainer_authReadOnly as AuthReadOnlyData } from "coral-admin/__generated__/FacebookConfigContainer_authReadOnly.graphql"; -import { withFragmentContainer } from "coral-framework/lib/relay"; import { OnInitValuesFct } from "./AuthConfigContainer"; import FacebookConfig from "./FacebookConfig"; diff --git a/src/core/client/admin/routes/Configure/sections/Auth/GoogleConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Auth/GoogleConfigContainer.tsx index 0a42244b4..b6d7883f2 100644 --- a/src/core/client/admin/routes/Configure/sections/Auth/GoogleConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Auth/GoogleConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; +import { withFragmentContainer } from "coral-framework/lib/relay"; + import { GoogleConfigContainer_auth as AuthData } from "coral-admin/__generated__/GoogleConfigContainer_auth.graphql"; import { GoogleConfigContainer_authReadOnly as AuthReadOnlyData } from "coral-admin/__generated__/GoogleConfigContainer_authReadOnly.graphql"; -import { withFragmentContainer } from "coral-framework/lib/relay"; import { OnInitValuesFct } from "./AuthConfigContainer"; import GoogleConfig from "./GoogleConfig"; diff --git a/src/core/client/admin/routes/Configure/sections/Auth/LocalAuthConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Auth/LocalAuthConfigContainer.tsx index 908114d04..889c481b5 100644 --- a/src/core/client/admin/routes/Configure/sections/Auth/LocalAuthConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Auth/LocalAuthConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { LocalAuthConfigContainer_auth as AuthData } from "coral-admin/__generated__/LocalAuthConfigContainer_auth.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { LocalAuthConfigContainer_auth as AuthData } from "coral-admin/__generated__/LocalAuthConfigContainer_auth.graphql"; + import { OnInitValuesFct } from "./AuthConfigContainer"; import LocalAuthConfig from "./LocalAuthConfig"; diff --git a/src/core/client/admin/routes/Configure/sections/Auth/OIDCConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Auth/OIDCConfigContainer.tsx index bbc2f5dd4..bec1371bc 100644 --- a/src/core/client/admin/routes/Configure/sections/Auth/OIDCConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Auth/OIDCConfigContainer.tsx @@ -4,14 +4,15 @@ import { ReactContext, withReactFinalForm } from "react-final-form"; import { graphql } from "react-relay"; import { InferableComponentEnhancer } from "recompose"; -import { OIDCConfigContainer_auth as AuthData } from "coral-admin/__generated__/OIDCConfigContainer_auth.graphql"; -import { OIDCConfigContainer_authReadOnly as AuthReadOnlyData } from "coral-admin/__generated__/OIDCConfigContainer_authReadOnly.graphql"; import { FetchProp, withFetch, withFragmentContainer, } from "coral-framework/lib/relay"; +import { OIDCConfigContainer_auth as AuthData } from "coral-admin/__generated__/OIDCConfigContainer_auth.graphql"; +import { OIDCConfigContainer_authReadOnly as AuthReadOnlyData } from "coral-admin/__generated__/OIDCConfigContainer_authReadOnly.graphql"; + import { OnInitValuesFct } from "./AuthConfigContainer"; import DiscoverOIDCConfigurationFetch from "./DiscoverOIDCConfigurationFetch"; import OIDCConfig from "./OIDCConfig"; @@ -54,7 +55,7 @@ class OIDCConfigContainer extends React.Component { } } catch (error) { // FIXME: (wyattjoh) handle error - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.warn(error); } this.setState({ awaitingResponse: false }); diff --git a/src/core/client/admin/routes/Configure/sections/Auth/RegenerateSSOKeyMutation.ts b/src/core/client/admin/routes/Configure/sections/Auth/RegenerateSSOKeyMutation.ts index d9558dfa6..b729ddb38 100644 --- a/src/core/client/admin/routes/Configure/sections/Auth/RegenerateSSOKeyMutation.ts +++ b/src/core/client/admin/routes/Configure/sections/Auth/RegenerateSSOKeyMutation.ts @@ -1,12 +1,13 @@ import { graphql } from "react-relay"; import { Environment } from "relay-runtime"; -import { RegenerateSSOKeyMutation as MutationTypes } from "coral-admin/__generated__/RegenerateSSOKeyMutation.graphql"; import { commitMutationPromiseNormalized, createMutation, } from "coral-framework/lib/relay"; +import { RegenerateSSOKeyMutation as MutationTypes } from "coral-admin/__generated__/RegenerateSSOKeyMutation.graphql"; + let clientMutationId = 0; const RegenerateSSOKeyMutation = createMutation( diff --git a/src/core/client/admin/routes/Configure/sections/Auth/SSOConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Auth/SSOConfigContainer.tsx index be1073aa2..f72b87f5e 100644 --- a/src/core/client/admin/routes/Configure/sections/Auth/SSOConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Auth/SSOConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; +import { withFragmentContainer } from "coral-framework/lib/relay"; + import { SSOConfigContainer_auth as AuthData } from "coral-admin/__generated__/SSOConfigContainer_auth.graphql"; import { SSOConfigContainer_authReadOnly as AuthReadOnlyData } from "coral-admin/__generated__/SSOConfigContainer_authReadOnly.graphql"; -import { withFragmentContainer } from "coral-framework/lib/relay"; import { OnInitValuesFct } from "./AuthConfigContainer"; import SSOConfig from "./SSOConfig"; diff --git a/src/core/client/admin/routes/Configure/sections/Auth/SSOKeyFieldContainer.tsx b/src/core/client/admin/routes/Configure/sections/Auth/SSOKeyFieldContainer.tsx index b532f0ace..4c1fa0eff 100644 --- a/src/core/client/admin/routes/Configure/sections/Auth/SSOKeyFieldContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Auth/SSOKeyFieldContainer.tsx @@ -1,13 +1,14 @@ import React from "react"; import { graphql } from "react-relay"; -import { SSOKeyFieldContainer_sso as SSOData } from "coral-admin/__generated__/SSOKeyFieldContainer_sso.graphql"; import { MutationProp, withFragmentContainer, withMutation, } from "coral-framework/lib/relay"; +import { SSOKeyFieldContainer_sso as SSOData } from "coral-admin/__generated__/SSOKeyFieldContainer_sso.graphql"; + import RegenerateSSOKeyMutation from "./RegenerateSSOKeyMutation"; import SSOKeyField from "./SSOKeyField"; diff --git a/src/core/client/admin/routes/Configure/sections/Auth/SessionConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Auth/SessionConfigContainer.tsx index a9fac1ff4..7fe3f4ddf 100644 --- a/src/core/client/admin/routes/Configure/sections/Auth/SessionConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Auth/SessionConfigContainer.tsx @@ -1,8 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { SessionConfigContainer_auth as AuthData } from "coral-admin/__generated__/SessionConfigContainer_auth.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; + +import { SessionConfigContainer_auth as AuthData } from "coral-admin/__generated__/SessionConfigContainer_auth.graphql"; + import { OnInitValuesFct } from "./AuthConfigContainer"; import SessionConfig from "./SessionConfig"; diff --git a/src/core/client/admin/routes/Configure/sections/Auth/TargetFilterField.tsx b/src/core/client/admin/routes/Configure/sections/Auth/TargetFilterField.tsx index 37c98b25f..58e02d95c 100644 --- a/src/core/client/admin/routes/Configure/sections/Auth/TargetFilterField.tsx +++ b/src/core/client/admin/routes/Configure/sections/Auth/TargetFilterField.tsx @@ -1,8 +1,8 @@ -import { parseBool } from "coral-framework/lib/form"; import { Localized } from "fluent-react/compat"; import React, { FunctionComponent } from "react"; import { Field } from "react-final-form"; +import { parseBool } from "coral-framework/lib/form"; import { CheckBox, Flex, FormField, InputLabel } from "coral-ui/components"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/Email/EmailConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Email/EmailConfigContainer.tsx index 684ba45a2..134390d70 100644 --- a/src/core/client/admin/routes/Configure/sections/Email/EmailConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Email/EmailConfigContainer.tsx @@ -5,7 +5,6 @@ import React from "react"; import { Field } from "react-final-form"; import { graphql } from "react-relay"; -import { EmailConfigContainer_email } from "coral-admin/__generated__/EmailConfigContainer_email.graphql"; import { DeepNullable, DeepPartial } from "coral-common/types"; import { pureMerge } from "coral-common/utils"; import { parseBool } from "coral-framework/lib/form"; @@ -18,6 +17,8 @@ import { HorizontalGutter, } from "coral-ui/components"; +import { EmailConfigContainer_email } from "coral-admin/__generated__/EmailConfigContainer_email.graphql"; + import Header from "../../Header"; import SectionContent from "../../SectionContent"; import FromContainer from "./FromContainer"; diff --git a/src/core/client/admin/routes/Configure/sections/Email/EmailConfigRoute.tsx b/src/core/client/admin/routes/Configure/sections/Email/EmailConfigRoute.tsx index 57c96298c..73ad3ea00 100644 --- a/src/core/client/admin/routes/Configure/sections/Email/EmailConfigRoute.tsx +++ b/src/core/client/admin/routes/Configure/sections/Email/EmailConfigRoute.tsx @@ -2,10 +2,11 @@ import { FormApi } from "final-form"; import React from "react"; import { graphql } from "react-relay"; -import { EmailConfigRouteQueryResponse } from "coral-admin/__generated__/EmailConfigRouteQuery.graphql"; import { withRouteConfig } from "coral-framework/lib/router"; import { Delay, Spinner } from "coral-ui/components"; +import { EmailConfigRouteQueryResponse } from "coral-admin/__generated__/EmailConfigRouteQuery.graphql"; + import EmailConfigContainer from "./EmailConfigContainer"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/Email/FromContainer.tsx b/src/core/client/admin/routes/Configure/sections/Email/FromContainer.tsx index 95ae2c688..56c6d8916 100644 --- a/src/core/client/admin/routes/Configure/sections/Email/FromContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Email/FromContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { FromContainer_email } from "coral-admin/__generated__/FromContainer_email.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { FromContainer_email } from "coral-admin/__generated__/FromContainer_email.graphql"; + import { OnInitValuesFct } from "./EmailConfigContainer"; import From from "./From"; diff --git a/src/core/client/admin/routes/Configure/sections/Email/SMTPContainer.tsx b/src/core/client/admin/routes/Configure/sections/Email/SMTPContainer.tsx index 8e5e87f28..8b05507fa 100644 --- a/src/core/client/admin/routes/Configure/sections/Email/SMTPContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Email/SMTPContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { SMTPContainer_email } from "coral-admin/__generated__/SMTPContainer_email.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { SMTPContainer_email } from "coral-admin/__generated__/SMTPContainer_email.graphql"; + import { OnInitValuesFct } from "./EmailConfigContainer"; import SMTP from "./SMTP"; diff --git a/src/core/client/admin/routes/Configure/sections/General/ClosedStreamMessageConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/General/ClosedStreamMessageConfigContainer.tsx index 1281f24d6..c59163c2b 100644 --- a/src/core/client/admin/routes/Configure/sections/General/ClosedStreamMessageConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/General/ClosedStreamMessageConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { ClosedStreamMessageConfigContainer_settings as SettingsData } from "coral-admin/__generated__/ClosedStreamMessageConfigContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { ClosedStreamMessageConfigContainer_settings as SettingsData } from "coral-admin/__generated__/ClosedStreamMessageConfigContainer_settings.graphql"; + import ClosedStreamMessageConfig from "./ClosedStreamMessageConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/General/ClosingCommentStreamsConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/General/ClosingCommentStreamsConfigContainer.tsx index 3f09d69f4..7f230e617 100644 --- a/src/core/client/admin/routes/Configure/sections/General/ClosingCommentStreamsConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/General/ClosingCommentStreamsConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { ClosingCommentStreamsConfigContainer_settings as SettingsData } from "coral-admin/__generated__/ClosingCommentStreamsConfigContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { ClosingCommentStreamsConfigContainer_settings as SettingsData } from "coral-admin/__generated__/ClosingCommentStreamsConfigContainer_settings.graphql"; + import ClosingCommentStreamsConfig from "./ClosingCommentStreamsConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/General/CommentEditingConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/General/CommentEditingConfigContainer.tsx index 7b3aca4ac..80bc4bfa3 100644 --- a/src/core/client/admin/routes/Configure/sections/General/CommentEditingConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/General/CommentEditingConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { CommentEditingConfigContainer_settings as SettingsData } from "coral-admin/__generated__/CommentEditingConfigContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { CommentEditingConfigContainer_settings as SettingsData } from "coral-admin/__generated__/CommentEditingConfigContainer_settings.graphql"; + import CommentEditingConfig from "./CommentEditingConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/General/CommentLengthConfig.tsx b/src/core/client/admin/routes/Configure/sections/General/CommentLengthConfig.tsx index 4c92924e5..77c72ba4b 100644 --- a/src/core/client/admin/routes/Configure/sections/General/CommentLengthConfig.tsx +++ b/src/core/client/admin/routes/Configure/sections/General/CommentLengthConfig.tsx @@ -2,6 +2,7 @@ import { Localized } from "fluent-react/compat"; import React, { FunctionComponent } from "react"; import { Field } from "react-final-form"; +import { formatEmpty, parseEmptyAsNull } from "coral-framework/lib/form"; import { composeValidators, createValidator, @@ -18,8 +19,6 @@ import { import Header from "../../Header"; import OnOffField from "../../OnOffField"; - -import { formatEmpty, parseEmptyAsNull } from "coral-framework/lib/form"; import SectionContent from "../../SectionContent"; import ValidationMessage from "../../ValidationMessage"; @@ -30,7 +29,7 @@ const validateMaxLongerThanMin = createValidator( v === null || values.charCount.min === null || parseInt(v, 10) > parseInt(values.charCount.min, 10), - // tslint:disable-next-line:jsx-wrap-multiline + // eslint-disable-next-line:jsx-wrap-multiline Please enter a number longer than the minimum length diff --git a/src/core/client/admin/routes/Configure/sections/General/CommentLengthConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/General/CommentLengthConfigContainer.tsx index 915be0a21..5c4ed6ca6 100644 --- a/src/core/client/admin/routes/Configure/sections/General/CommentLengthConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/General/CommentLengthConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { CommentLengthConfigContainer_settings as SettingsData } from "coral-admin/__generated__/CommentLengthConfigContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { CommentLengthConfigContainer_settings as SettingsData } from "coral-admin/__generated__/CommentLengthConfigContainer_settings.graphql"; + import CommentLengthConfig from "./CommentLengthConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/General/GeneralConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/General/GeneralConfigContainer.tsx index 833b97bd6..da044ed61 100644 --- a/src/core/client/admin/routes/Configure/sections/General/GeneralConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/General/GeneralConfigContainer.tsx @@ -3,10 +3,11 @@ import { RouteProps } from "found"; import React from "react"; import { graphql } from "react-relay"; -import { GeneralConfigContainer_settings as SettingsData } from "coral-admin/__generated__/GeneralConfigContainer_settings.graphql"; import { pureMerge } from "coral-common/utils"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { GeneralConfigContainer_settings as SettingsData } from "coral-admin/__generated__/GeneralConfigContainer_settings.graphql"; + import GeneralConfig from "./GeneralConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/General/GeneralConfigRoute.tsx b/src/core/client/admin/routes/Configure/sections/General/GeneralConfigRoute.tsx index 5cd7d197e..f6178e3e6 100644 --- a/src/core/client/admin/routes/Configure/sections/General/GeneralConfigRoute.tsx +++ b/src/core/client/admin/routes/Configure/sections/General/GeneralConfigRoute.tsx @@ -2,11 +2,12 @@ import { FormApi } from "final-form"; import React from "react"; import { graphql } from "react-relay"; -import { GeneralConfigRouteQueryResponse } from "coral-admin/__generated__/GeneralConfigRouteQuery.graphql"; import { loadMarkdownEditor } from "coral-framework/components/loadables"; import { withRouteConfig } from "coral-framework/lib/router"; import { Delay, Spinner } from "coral-ui/components"; +import { GeneralConfigRouteQueryResponse } from "coral-admin/__generated__/GeneralConfigRouteQuery.graphql"; + import GeneralConfigContainer from "./GeneralConfigContainer"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/General/GuidelinesConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/General/GuidelinesConfigContainer.tsx index bef65124e..bf58130f7 100644 --- a/src/core/client/admin/routes/Configure/sections/General/GuidelinesConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/General/GuidelinesConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { GuidelinesConfigContainer_settings as SettingsData } from "coral-admin/__generated__/GuidelinesConfigContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { GuidelinesConfigContainer_settings as SettingsData } from "coral-admin/__generated__/GuidelinesConfigContainer_settings.graphql"; + import GuidelinesConfig from "./GuidelinesConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/General/LocaleConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/General/LocaleConfigContainer.tsx index 0363239e0..82088f998 100644 --- a/src/core/client/admin/routes/Configure/sections/General/LocaleConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/General/LocaleConfigContainer.tsx @@ -3,12 +3,13 @@ import React, { useMemo } from "react"; import { Field } from "react-final-form"; import { graphql } from "react-relay"; -import { LocaleConfigContainer_settings } from "coral-admin/__generated__/LocaleConfigContainer_settings.graphql"; import { LocaleField } from "coral-framework/components"; import { withFragmentContainer } from "coral-framework/lib/relay"; import { required } from "coral-framework/lib/validation"; import { FormField, HorizontalGutter, Typography } from "coral-ui/components"; +import { LocaleConfigContainer_settings } from "coral-admin/__generated__/LocaleConfigContainer_settings.graphql"; + import Header from "../../Header"; import SectionContent from "../../SectionContent"; import ValidationMessage from "../../ValidationMessage"; diff --git a/src/core/client/admin/routes/Configure/sections/General/ReactionConfig.tsx b/src/core/client/admin/routes/Configure/sections/General/ReactionConfig.tsx index 4021e9a45..e40c2e507 100644 --- a/src/core/client/admin/routes/Configure/sections/General/ReactionConfig.tsx +++ b/src/core/client/admin/routes/Configure/sections/General/ReactionConfig.tsx @@ -2,7 +2,6 @@ import { Localized } from "fluent-react/compat"; import React, { FunctionComponent } from "react"; import { Field } from "react-final-form"; -import { ReactionConfigContainer_settings as SettingsData } from "coral-admin/__generated__/ReactionConfigContainer_settings.graphql"; import { required } from "coral-framework/lib/validation"; import ReactionButton from "coral-stream/tabs/Comments/Comment/ReactionButton/ReactionButton"; import { @@ -17,6 +16,8 @@ import { Typography, } from "coral-ui/components"; +import { ReactionConfigContainer_settings as SettingsData } from "coral-admin/__generated__/ReactionConfigContainer_settings.graphql"; + import Header from "../../Header"; import SectionContent from "../../SectionContent"; import ValidationMessage from "../../ValidationMessage"; diff --git a/src/core/client/admin/routes/Configure/sections/General/ReactionConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/General/ReactionConfigContainer.tsx index f6c488bbc..87a918696 100644 --- a/src/core/client/admin/routes/Configure/sections/General/ReactionConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/General/ReactionConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { ReactionConfigContainer_settings as SettingsData } from "coral-admin/__generated__/ReactionConfigContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { ReactionConfigContainer_settings as SettingsData } from "coral-admin/__generated__/ReactionConfigContainer_settings.graphql"; + import ReactionConfig from "./ReactionConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/General/SitewideCommentingConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/General/SitewideCommentingConfigContainer.tsx index 5aaca1f1a..8541817b5 100644 --- a/src/core/client/admin/routes/Configure/sections/General/SitewideCommentingConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/General/SitewideCommentingConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { SitewideCommentingConfigContainer_settings as SettingsData } from "coral-admin/__generated__/SitewideCommentingConfigContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { SitewideCommentingConfigContainer_settings as SettingsData } from "coral-admin/__generated__/SitewideCommentingConfigContainer_settings.graphql"; + import SitewideCommentingConfig from "./SitewideCommentingConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/Moderation/AkismetConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Moderation/AkismetConfigContainer.tsx index 11105e26c..53269a85e 100644 --- a/src/core/client/admin/routes/Configure/sections/Moderation/AkismetConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Moderation/AkismetConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { AkismetConfigContainer_settings as SettingsData } from "coral-admin/__generated__/AkismetConfigContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { AkismetConfigContainer_settings as SettingsData } from "coral-admin/__generated__/AkismetConfigContainer_settings.graphql"; + import AkismetConfig from "./AkismetConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/Moderation/ModerationConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Moderation/ModerationConfigContainer.tsx index 64ff234c5..b7be25f10 100644 --- a/src/core/client/admin/routes/Configure/sections/Moderation/ModerationConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Moderation/ModerationConfigContainer.tsx @@ -3,10 +3,11 @@ import { RouteProps } from "found"; import React from "react"; import { graphql } from "react-relay"; -import { ModerationConfigContainer_settings as SettingsData } from "coral-admin/__generated__/ModerationConfigContainer_settings.graphql"; import { pureMerge } from "coral-common/utils"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { ModerationConfigContainer_settings as SettingsData } from "coral-admin/__generated__/ModerationConfigContainer_settings.graphql"; + import ModerationConfig from "./ModerationConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/Moderation/ModerationConfigRoute.tsx b/src/core/client/admin/routes/Configure/sections/Moderation/ModerationConfigRoute.tsx index fec1cb7c7..05c57f7c7 100644 --- a/src/core/client/admin/routes/Configure/sections/Moderation/ModerationConfigRoute.tsx +++ b/src/core/client/admin/routes/Configure/sections/Moderation/ModerationConfigRoute.tsx @@ -2,10 +2,11 @@ import { FormApi } from "final-form"; import React from "react"; import { graphql } from "react-relay"; -import { ModerationConfigRouteQueryResponse } from "coral-admin/__generated__/ModerationConfigRouteQuery.graphql"; import { withRouteConfig } from "coral-framework/lib/router"; import { Delay, Spinner } from "coral-ui/components"; +import { ModerationConfigRouteQueryResponse } from "coral-admin/__generated__/ModerationConfigRouteQuery.graphql"; + import ModerationConfigContainer from "./ModerationConfigContainer"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/Moderation/PerspectiveConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Moderation/PerspectiveConfigContainer.tsx index a26ce1fae..00d3a4070 100644 --- a/src/core/client/admin/routes/Configure/sections/Moderation/PerspectiveConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Moderation/PerspectiveConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { PerspectiveConfigContainer_settings as SettingsData } from "coral-admin/__generated__/PerspectiveConfigContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { PerspectiveConfigContainer_settings as SettingsData } from "coral-admin/__generated__/PerspectiveConfigContainer_settings.graphql"; + import PerspectiveConfig from "./PerspectiveConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/Moderation/PreModerationConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Moderation/PreModerationConfigContainer.tsx index 95e5198a5..8ee7fee2a 100644 --- a/src/core/client/admin/routes/Configure/sections/Moderation/PreModerationConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Moderation/PreModerationConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { PreModerationConfigContainer_settings as SettingsData } from "coral-admin/__generated__/PreModerationConfigContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { PreModerationConfigContainer_settings as SettingsData } from "coral-admin/__generated__/PreModerationConfigContainer_settings.graphql"; + import PreModerationConfig from "./PreModerationConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/Moderation/RecentCommentHistoryConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Moderation/RecentCommentHistoryConfigContainer.tsx index a136ee232..3e55c9072 100644 --- a/src/core/client/admin/routes/Configure/sections/Moderation/RecentCommentHistoryConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Moderation/RecentCommentHistoryConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { RecentCommentHistoryConfigContainer_settings as SettingsData } from "coral-admin/__generated__/RecentCommentHistoryConfigContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { RecentCommentHistoryConfigContainer_settings as SettingsData } from "coral-admin/__generated__/RecentCommentHistoryConfigContainer_settings.graphql"; + import RecentCommentHistoryConfig from "./RecentCommentHistoryConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/Organization/OrganizationConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Organization/OrganizationConfigContainer.tsx index bfbc2a3e2..b4480c0f4 100644 --- a/src/core/client/admin/routes/Configure/sections/Organization/OrganizationConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Organization/OrganizationConfigContainer.tsx @@ -3,10 +3,11 @@ import { RouteProps } from "found"; import React from "react"; import { graphql } from "react-relay"; -import { OrganizationConfigContainer_settings as SettingsData } from "coral-admin/__generated__/OrganizationConfigContainer_settings.graphql"; import { pureMerge } from "coral-common/utils"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { OrganizationConfigContainer_settings as SettingsData } from "coral-admin/__generated__/OrganizationConfigContainer_settings.graphql"; + import OrganizationConfig from "./OrganizationConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/Organization/OrganizationConfigRoute.tsx b/src/core/client/admin/routes/Configure/sections/Organization/OrganizationConfigRoute.tsx index fe52e38cb..18494effc 100644 --- a/src/core/client/admin/routes/Configure/sections/Organization/OrganizationConfigRoute.tsx +++ b/src/core/client/admin/routes/Configure/sections/Organization/OrganizationConfigRoute.tsx @@ -2,10 +2,11 @@ import { FormApi } from "final-form"; import React from "react"; import { graphql } from "react-relay"; -import { OrganizationConfigRouteQueryResponse } from "coral-admin/__generated__/OrganizationConfigRouteQuery.graphql"; import { withRouteConfig } from "coral-framework/lib/router"; import { Delay, Spinner } from "coral-ui/components"; +import { OrganizationConfigRouteQueryResponse } from "coral-admin/__generated__/OrganizationConfigRouteQuery.graphql"; + import OrganizationConfigContainer from "./OrganizationConfigContainer"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/Organization/OrganizationContactEmailConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Organization/OrganizationContactEmailConfigContainer.tsx index 6d6e531fa..ae4d6ade4 100644 --- a/src/core/client/admin/routes/Configure/sections/Organization/OrganizationContactEmailConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Organization/OrganizationContactEmailConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { OrganizationContactEmailConfigContainer_settings as SettingsData } from "coral-admin/__generated__/OrganizationContactEmailConfigContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { OrganizationContactEmailConfigContainer_settings as SettingsData } from "coral-admin/__generated__/OrganizationContactEmailConfigContainer_settings.graphql"; + import OrganizationContactEmailConfig from "./OrganizationContactEmailConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/Organization/OrganizationNameConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Organization/OrganizationNameConfigContainer.tsx index ea1ab07f7..fb96baace 100644 --- a/src/core/client/admin/routes/Configure/sections/Organization/OrganizationNameConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Organization/OrganizationNameConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { OrganizationNameConfigContainer_settings as SettingsData } from "coral-admin/__generated__/OrganizationNameConfigContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { OrganizationNameConfigContainer_settings as SettingsData } from "coral-admin/__generated__/OrganizationNameConfigContainer_settings.graphql"; + import OrganizationNameConfig from "./OrganizationNameConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/Organization/OrganizationURLConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/Organization/OrganizationURLConfigContainer.tsx index 96b379423..a6b907c3e 100644 --- a/src/core/client/admin/routes/Configure/sections/Organization/OrganizationURLConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/Organization/OrganizationURLConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { OrganizationURLConfigContainer_settings as SettingsData } from "coral-admin/__generated__/OrganizationURLConfigContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { OrganizationURLConfigContainer_settings as SettingsData } from "coral-admin/__generated__/OrganizationURLConfigContainer_settings.graphql"; + import OrganizationURLConfig from "./OrganizationURLConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/WordList/BannedWordListConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/WordList/BannedWordListConfigContainer.tsx index 364e4c82a..d55700e31 100644 --- a/src/core/client/admin/routes/Configure/sections/WordList/BannedWordListConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/WordList/BannedWordListConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { BannedWordListConfigContainer_settings as SettingsData } from "coral-admin/__generated__/BannedWordListConfigContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { BannedWordListConfigContainer_settings as SettingsData } from "coral-admin/__generated__/BannedWordListConfigContainer_settings.graphql"; + import BannedWordListConfig from "./BannedWordListConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/WordList/SuspectWordListConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/WordList/SuspectWordListConfigContainer.tsx index 3f8cf6ff4..8cf9c570a 100644 --- a/src/core/client/admin/routes/Configure/sections/WordList/SuspectWordListConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/WordList/SuspectWordListConfigContainer.tsx @@ -1,9 +1,10 @@ import React from "react"; import { graphql } from "react-relay"; -import { SuspectWordListConfigContainer_settings as SettingsData } from "coral-admin/__generated__/SuspectWordListConfigContainer_settings.graphql"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { SuspectWordListConfigContainer_settings as SettingsData } from "coral-admin/__generated__/SuspectWordListConfigContainer_settings.graphql"; + import SuspectWordListConfig from "./SuspectWordListConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/WordList/WordListConfigContainer.tsx b/src/core/client/admin/routes/Configure/sections/WordList/WordListConfigContainer.tsx index fae5ee4a2..c333f6d2c 100644 --- a/src/core/client/admin/routes/Configure/sections/WordList/WordListConfigContainer.tsx +++ b/src/core/client/admin/routes/Configure/sections/WordList/WordListConfigContainer.tsx @@ -3,10 +3,11 @@ import { RouteProps } from "found"; import React from "react"; import { graphql } from "react-relay"; -import { WordListConfigContainer_settings as SettingsData } from "coral-admin/__generated__/WordListConfigContainer_settings.graphql"; import { pureMerge } from "coral-common/utils"; import { withFragmentContainer } from "coral-framework/lib/relay"; +import { WordListConfigContainer_settings as SettingsData } from "coral-admin/__generated__/WordListConfigContainer_settings.graphql"; + import WordListConfig from "./WordListConfig"; interface Props { diff --git a/src/core/client/admin/routes/Configure/sections/WordList/WordListConfigRoute.tsx b/src/core/client/admin/routes/Configure/sections/WordList/WordListConfigRoute.tsx index b6372d3f4..f774b7fd5 100644 --- a/src/core/client/admin/routes/Configure/sections/WordList/WordListConfigRoute.tsx +++ b/src/core/client/admin/routes/Configure/sections/WordList/WordListConfigRoute.tsx @@ -2,10 +2,11 @@ import { FormApi } from "final-form"; import React from "react"; import { graphql } from "react-relay"; -import { WordListConfigRouteQueryResponse } from "coral-admin/__generated__/WordListConfigRouteQuery.graphql"; import { withRouteConfig } from "coral-framework/lib/router"; import { Delay, Spinner } from "coral-ui/components"; +import { WordListConfigRouteQueryResponse } from "coral-admin/__generated__/WordListConfigRouteQuery.graphql"; + import WordListConfigContainer from "./WordListConfigContainer"; interface Props { diff --git a/src/core/client/admin/routes/ForgotPassword/ForgotPasswordContainer.tsx b/src/core/client/admin/routes/ForgotPassword/ForgotPasswordContainer.tsx index 8abf89ef6..e3dcf1c10 100644 --- a/src/core/client/admin/routes/ForgotPassword/ForgotPasswordContainer.tsx +++ b/src/core/client/admin/routes/ForgotPassword/ForgotPasswordContainer.tsx @@ -4,6 +4,7 @@ import React, { FunctionComponent, useState } from "react"; import { Bar, SubBar, Title } from "coral-auth/components/Header"; import { Flex, Typography } from "coral-ui/components"; + import CheckEmail from "./CheckEmail"; import ForgotPasswordForm from "./ForgotPasswordForm"; diff --git a/src/core/client/admin/routes/ForgotPassword/ForgotPasswordRoute.tsx b/src/core/client/admin/routes/ForgotPassword/ForgotPasswordRoute.tsx index 2ec0390fb..99689a433 100644 --- a/src/core/client/admin/routes/ForgotPassword/ForgotPasswordRoute.tsx +++ b/src/core/client/admin/routes/ForgotPassword/ForgotPasswordRoute.tsx @@ -1,5 +1,7 @@ -import { withRouteConfig } from "coral-framework/lib/router"; import React from "react"; + +import { withRouteConfig } from "coral-framework/lib/router"; + import ForgotPasswordContainer from "./ForgotPasswordContainer"; const ForgotPasswordRoute: React.FunctionComponent = () => { diff --git a/src/core/client/admin/routes/Invite/InviteCompleteFormContainer.tsx b/src/core/client/admin/routes/Invite/InviteCompleteFormContainer.tsx index 3ad49a8eb..c0ffda613 100644 --- a/src/core/client/admin/routes/Invite/InviteCompleteFormContainer.tsx +++ b/src/core/client/admin/routes/Invite/InviteCompleteFormContainer.tsx @@ -1,8 +1,9 @@ import React, { FunctionComponent } from "react"; -import { InviteCompleteFormContainer_settings } from "coral-admin/__generated__/InviteCompleteFormContainer_settings.graphql"; import { graphql, withFragmentContainer } from "coral-framework/lib/relay"; +import { InviteCompleteFormContainer_settings } from "coral-admin/__generated__/InviteCompleteFormContainer_settings.graphql"; + import InviteCompleteForm from "./InviteCompleteForm"; interface Props { diff --git a/src/core/client/admin/routes/Invite/InviteRoute.tsx b/src/core/client/admin/routes/Invite/InviteRoute.tsx index e370c1112..f81cb4c75 100644 --- a/src/core/client/admin/routes/Invite/InviteRoute.tsx +++ b/src/core/client/admin/routes/Invite/InviteRoute.tsx @@ -2,13 +2,14 @@ import React, { useCallback, useState } from "react"; import { graphql } from "react-relay"; import { Environment } from "relay-runtime"; -import { InviteRouteQueryResponse } from "coral-admin/__generated__/InviteRouteQuery.graphql"; import { useToken } from "coral-framework/hooks"; import { createFetch } from "coral-framework/lib/relay"; import { withRouteConfig } from "coral-framework/lib/router"; import { parseHashQuery } from "coral-framework/utils"; import { Delay, Flex, Spinner } from "coral-ui/components"; +import { InviteRouteQueryResponse } from "coral-admin/__generated__/InviteRouteQuery.graphql"; + import InviteCompleteFormContainer from "./InviteCompleteFormContainer"; import InviteLayout from "./InviteLayout"; import Sorry from "./Sorry"; @@ -82,12 +83,14 @@ const enhanced = withRouteConfig({ } } `, - render: ({ match, Component, ...rest }) => ( - - ), + render: function InviteRouteRender({ match, Component, ...rest }) { + return ( + + ); + }, })(InviteRoute); export default enhanced; diff --git a/src/core/client/admin/routes/Invite/SuccessContainer.tsx b/src/core/client/admin/routes/Invite/SuccessContainer.tsx index 9c5e51355..4cb48e8ce 100644 --- a/src/core/client/admin/routes/Invite/SuccessContainer.tsx +++ b/src/core/client/admin/routes/Invite/SuccessContainer.tsx @@ -1,6 +1,7 @@ -import { graphql, withFragmentContainer } from "coral-framework/lib/relay"; import React, { FunctionComponent } from "react"; +import { graphql, withFragmentContainer } from "coral-framework/lib/relay"; + import { SuccessContainer_settings } from "coral-admin/__generated__/SuccessContainer_settings.graphql"; import Success from "./Success"; diff --git a/src/core/client/admin/routes/Login/AccountCompletionContainer.tsx b/src/core/client/admin/routes/Login/AccountCompletionContainer.tsx index e8fb4a75b..99cbd2e7a 100644 --- a/src/core/client/admin/routes/Login/AccountCompletionContainer.tsx +++ b/src/core/client/admin/routes/Login/AccountCompletionContainer.tsx @@ -1,9 +1,6 @@ import { RouterState, withRouter } from "found"; import React, { Component } from "react"; -import { AccountCompletionContainer_auth as AuthData } from "coral-admin/__generated__/AccountCompletionContainer_auth.graphql"; -import { AccountCompletionContainer_viewer as UserData } from "coral-admin/__generated__/AccountCompletionContainer_viewer.graphql"; -import { AccountCompletionContainerLocal as Local } from "coral-admin/__generated__/AccountCompletionContainerLocal.graphql"; import { SetRedirectPathMutation } from "coral-admin/mutations"; import { graphql, @@ -13,6 +10,10 @@ import { withMutation, } from "coral-framework/lib/relay"; +import { AccountCompletionContainer_auth as AuthData } from "coral-admin/__generated__/AccountCompletionContainer_auth.graphql"; +import { AccountCompletionContainer_viewer as UserData } from "coral-admin/__generated__/AccountCompletionContainer_viewer.graphql"; +import { AccountCompletionContainerLocal as Local } from "coral-admin/__generated__/AccountCompletionContainerLocal.graphql"; + import CompleteAccountMutation from "./CompleteAccountMutation"; import SetAuthViewMutation from "./SetAuthViewMutation"; diff --git a/src/core/client/admin/routes/Login/LoginRoute.tsx b/src/core/client/admin/routes/Login/LoginRoute.tsx index 40460e92c..1a4f6dace 100644 --- a/src/core/client/admin/routes/Login/LoginRoute.tsx +++ b/src/core/client/admin/routes/Login/LoginRoute.tsx @@ -1,11 +1,12 @@ import { RouteProps } from "found"; import React, { Component } from "react"; -import { LoginRouteLocal as LocalData } from "coral-admin/__generated__/LoginRouteLocal.graphql"; -import { LoginRouteQueryResponse } from "coral-admin/__generated__/LoginRouteQuery.graphql"; import { graphql, withLocalStateContainer } from "coral-framework/lib/relay"; import { withRouteConfig } from "coral-framework/lib/router"; +import { LoginRouteLocal as LocalData } from "coral-admin/__generated__/LoginRouteLocal.graphql"; +import { LoginRouteQueryResponse } from "coral-admin/__generated__/LoginRouteQuery.graphql"; + import AccountCompletionContainer from "./AccountCompletionContainer"; import Login from "./Login"; diff --git a/src/core/client/admin/routes/Login/SetAuthViewMutation.ts b/src/core/client/admin/routes/Login/SetAuthViewMutation.ts index a50f0d2b3..2e573e6e1 100644 --- a/src/core/client/admin/routes/Login/SetAuthViewMutation.ts +++ b/src/core/client/admin/routes/Login/SetAuthViewMutation.ts @@ -1,7 +1,6 @@ import { commitLocalUpdate, Environment } from "relay-runtime"; -import { createMutation } from "coral-framework/lib/relay"; -import { LOCAL_ID } from "coral-framework/lib/relay"; +import { createMutation, LOCAL_ID } from "coral-framework/lib/relay"; export interface SetAuthViewInput { // TODO: replace with generated typescript types. diff --git a/src/core/client/admin/routes/Login/views/AddEmailAddress/AddEmailAddressContainer.tsx b/src/core/client/admin/routes/Login/views/AddEmailAddress/AddEmailAddressContainer.tsx index e74fd4621..e518292f3 100644 --- a/src/core/client/admin/routes/Login/views/AddEmailAddress/AddEmailAddressContainer.tsx +++ b/src/core/client/admin/routes/Login/views/AddEmailAddress/AddEmailAddressContainer.tsx @@ -24,7 +24,7 @@ class AddEmailAddressContainer extends Component { }; public render() { - // tslint:disable-next-line:no-empty + // eslint-disable-next-line:no-empty return ; } } diff --git a/src/core/client/admin/routes/Login/views/AddEmailAddress/SetEmailMutation.ts b/src/core/client/admin/routes/Login/views/AddEmailAddress/SetEmailMutation.ts index 90a84002f..198642bcf 100644 --- a/src/core/client/admin/routes/Login/views/AddEmailAddress/SetEmailMutation.ts +++ b/src/core/client/admin/routes/Login/views/AddEmailAddress/SetEmailMutation.ts @@ -1,13 +1,14 @@ import { graphql } from "react-relay"; import { Environment } from "relay-runtime"; -import { SetEmailMutation as MutationTypes } from "coral-admin/__generated__/SetEmailMutation.graphql"; import { commitMutationPromiseNormalized, createMutation, MutationInput, } from "coral-framework/lib/relay"; +import { SetEmailMutation as MutationTypes } from "coral-admin/__generated__/SetEmailMutation.graphql"; + let clientMutationId = 0; const SetEmailMutation = createMutation( diff --git a/src/core/client/admin/routes/Login/views/CreatePassword/CreatePasswordContainer.tsx b/src/core/client/admin/routes/Login/views/CreatePassword/CreatePasswordContainer.tsx index a15cf122d..72127d8f2 100644 --- a/src/core/client/admin/routes/Login/views/CreatePassword/CreatePasswordContainer.tsx +++ b/src/core/client/admin/routes/Login/views/CreatePassword/CreatePasswordContainer.tsx @@ -25,7 +25,7 @@ class CreatePasswordContainer extends Component { }; public render() { - // tslint:disable-next-line:no-empty + // eslint-disable-next-line:no-empty return ; } } diff --git a/src/core/client/admin/routes/Login/views/CreatePassword/SetPasswordMutation.ts b/src/core/client/admin/routes/Login/views/CreatePassword/SetPasswordMutation.ts index b0b8aa9e1..2eb10ad59 100644 --- a/src/core/client/admin/routes/Login/views/CreatePassword/SetPasswordMutation.ts +++ b/src/core/client/admin/routes/Login/views/CreatePassword/SetPasswordMutation.ts @@ -1,13 +1,14 @@ import { graphql } from "react-relay"; import { Environment } from "relay-runtime"; -import { SetPasswordMutation as MutationTypes } from "coral-admin/__generated__/SetPasswordMutation.graphql"; import { commitMutationPromiseNormalized, createMutation, MutationInput, } from "coral-framework/lib/relay"; +import { SetPasswordMutation as MutationTypes } from "coral-admin/__generated__/SetPasswordMutation.graphql"; + let clientMutationId = 0; const SetPasswordMutation = createMutation( diff --git a/src/core/client/admin/routes/Login/views/CreateUsername/CreateUsernameContainer.tsx b/src/core/client/admin/routes/Login/views/CreateUsername/CreateUsernameContainer.tsx index d59830e6e..86cd64842 100644 --- a/src/core/client/admin/routes/Login/views/CreateUsername/CreateUsernameContainer.tsx +++ b/src/core/client/admin/routes/Login/views/CreateUsername/CreateUsernameContainer.tsx @@ -25,7 +25,7 @@ class CreateUsernameContainer extends Component { }; public render() { - // tslint:disable-next-line:no-empty + // eslint-disable-next-line:no-empty return ; } } diff --git a/src/core/client/admin/routes/Login/views/CreateUsername/SetUsernameMutation.ts b/src/core/client/admin/routes/Login/views/CreateUsername/SetUsernameMutation.ts index 5fd5654dd..7d6f87062 100644 --- a/src/core/client/admin/routes/Login/views/CreateUsername/SetUsernameMutation.ts +++ b/src/core/client/admin/routes/Login/views/CreateUsername/SetUsernameMutation.ts @@ -1,13 +1,14 @@ import { graphql } from "react-relay"; import { Environment } from "relay-runtime"; -import { SetUsernameMutation as MutationTypes } from "coral-admin/__generated__/SetUsernameMutation.graphql"; import { commitMutationPromiseNormalized, createMutation, MutationInput, } from "coral-framework/lib/relay"; +import { SetUsernameMutation as MutationTypes } from "coral-admin/__generated__/SetUsernameMutation.graphql"; + let clientMutationId = 0; const SetUsernameMutation = createMutation( diff --git a/src/core/client/admin/routes/Login/views/SignIn/ClearAuthErrorMutation.ts b/src/core/client/admin/routes/Login/views/SignIn/ClearAuthErrorMutation.ts index c2a7e1400..32e9348cc 100644 --- a/src/core/client/admin/routes/Login/views/SignIn/ClearAuthErrorMutation.ts +++ b/src/core/client/admin/routes/Login/views/SignIn/ClearAuthErrorMutation.ts @@ -1,7 +1,6 @@ import { commitLocalUpdate, Environment } from "relay-runtime"; -import { createMutation } from "coral-framework/lib/relay"; -import { LOCAL_ID } from "coral-framework/lib/relay"; +import { createMutation, LOCAL_ID } from "coral-framework/lib/relay"; const ClearAuthErrorMutation = createMutation( "clearAuthError", diff --git a/src/core/client/admin/routes/Login/views/SignIn/SignInContainer.tsx b/src/core/client/admin/routes/Login/views/SignIn/SignInContainer.tsx index f675a06e7..b0ccbf2d4 100644 --- a/src/core/client/admin/routes/Login/views/SignIn/SignInContainer.tsx +++ b/src/core/client/admin/routes/Login/views/SignIn/SignInContainer.tsx @@ -1,8 +1,6 @@ import { RouteProps } from "found"; import React, { Component } from "react"; -import { SignInContainer_auth as AuthData } from "coral-admin/__generated__/SignInContainer_auth.graphql"; -import { SignInContainerLocal as LocalData } from "coral-admin/__generated__/SignInContainerLocal.graphql"; import { graphql, MutationProp, @@ -11,6 +9,9 @@ import { withMutation, } from "coral-framework/lib/relay"; +import { SignInContainer_auth as AuthData } from "coral-admin/__generated__/SignInContainer_auth.graphql"; +import { SignInContainerLocal as LocalData } from "coral-admin/__generated__/SignInContainerLocal.graphql"; + import ClearAuthErrorMutation from "./ClearAuthErrorMutation"; import SignIn from "./SignIn"; import SignInMutation from "./SignInMutation"; diff --git a/src/core/client/admin/routes/Login/views/SignIn/SignInWithFacebookContainer.tsx b/src/core/client/admin/routes/Login/views/SignIn/SignInWithFacebookContainer.tsx index 1544562d7..17de7d71b 100644 --- a/src/core/client/admin/routes/Login/views/SignIn/SignInWithFacebookContainer.tsx +++ b/src/core/client/admin/routes/Login/views/SignIn/SignInWithFacebookContainer.tsx @@ -1,11 +1,12 @@ import { Localized } from "fluent-react/compat"; import React, { Component } from "react"; -import { SignInWithFacebookContainer_auth as AuthData } from "coral-admin/__generated__/SignInWithFacebookContainer_auth.graphql"; import FacebookButton from "coral-framework/components/FacebookButton"; import { redirectOAuth2 } from "coral-framework/helpers"; import { graphql, withFragmentContainer } from "coral-framework/lib/relay"; +import { SignInWithFacebookContainer_auth as AuthData } from "coral-admin/__generated__/SignInWithFacebookContainer_auth.graphql"; + interface Props { auth: AuthData; } diff --git a/src/core/client/admin/routes/Login/views/SignIn/SignInWithGoogleContainer.tsx b/src/core/client/admin/routes/Login/views/SignIn/SignInWithGoogleContainer.tsx index e1941e9ce..ae8b7d887 100644 --- a/src/core/client/admin/routes/Login/views/SignIn/SignInWithGoogleContainer.tsx +++ b/src/core/client/admin/routes/Login/views/SignIn/SignInWithGoogleContainer.tsx @@ -1,11 +1,12 @@ import { Localized } from "fluent-react/compat"; import React, { Component } from "react"; -import { SignInWithGoogleContainer_auth as AuthData } from "coral-admin/__generated__/SignInWithGoogleContainer_auth.graphql"; import GoogleButton from "coral-framework/components/GoogleButton"; import { redirectOAuth2 } from "coral-framework/helpers"; import { graphql, withFragmentContainer } from "coral-framework/lib/relay"; +import { SignInWithGoogleContainer_auth as AuthData } from "coral-admin/__generated__/SignInWithGoogleContainer_auth.graphql"; + interface Props { auth: AuthData; } diff --git a/src/core/client/admin/routes/Login/views/SignIn/SignInWithOIDCContainer.tsx b/src/core/client/admin/routes/Login/views/SignIn/SignInWithOIDCContainer.tsx index a56c6e4dc..051f407ed 100644 --- a/src/core/client/admin/routes/Login/views/SignIn/SignInWithOIDCContainer.tsx +++ b/src/core/client/admin/routes/Login/views/SignIn/SignInWithOIDCContainer.tsx @@ -1,11 +1,12 @@ import { Localized } from "fluent-react/compat"; import React, { Component } from "react"; -import { SignInWithOIDCContainer_auth as AuthData } from "coral-admin/__generated__/SignInWithOIDCContainer_auth.graphql"; import OIDCButton from "coral-framework/components/OIDCButton"; import { redirectOAuth2 } from "coral-framework/helpers"; import { graphql, withFragmentContainer } from "coral-framework/lib/relay"; +import { SignInWithOIDCContainer_auth as AuthData } from "coral-admin/__generated__/SignInWithOIDCContainer_auth.graphql"; + interface Props { auth: AuthData; } diff --git a/src/core/client/admin/routes/Moderate/ModerateContainer.tsx b/src/core/client/admin/routes/Moderate/ModerateContainer.tsx index 7d7cf803a..e93b19f94 100644 --- a/src/core/client/admin/routes/Moderate/ModerateContainer.tsx +++ b/src/core/client/admin/routes/Moderate/ModerateContainer.tsx @@ -2,10 +2,11 @@ import { Match, RouteProps, Router, withRouter } from "found"; import React from "react"; import { graphql } from "react-relay"; -import { ModerateContainerQueryResponse } from "coral-admin/__generated__/ModerateContainerQuery.graphql"; import { withRouteConfig } from "coral-framework/lib/router"; import { Spinner } from "coral-ui/components"; +import { ModerateContainerQueryResponse } from "coral-admin/__generated__/ModerateContainerQuery.graphql"; + import Moderate from "./Moderate"; interface RouteParams { diff --git a/src/core/client/admin/routes/Moderate/ModerateNavigation/ModerateCountsCommentEnteredSubscription.tsx b/src/core/client/admin/routes/Moderate/ModerateNavigation/ModerateCountsCommentEnteredSubscription.tsx index df927491d..22c2b62c3 100644 --- a/src/core/client/admin/routes/Moderate/ModerateNavigation/ModerateCountsCommentEnteredSubscription.tsx +++ b/src/core/client/admin/routes/Moderate/ModerateNavigation/ModerateCountsCommentEnteredSubscription.tsx @@ -1,13 +1,14 @@ import { graphql, requestSubscription } from "react-relay"; import { Environment } from "relay-runtime"; -import { ModerateCountsCommentEnteredSubscription } from "coral-admin/__generated__/ModerateCountsCommentEnteredSubscription.graphql"; import { createSubscription, SubscriptionVariables, } from "coral-framework/lib/relay"; import { GQLMODERATION_QUEUE } from "coral-framework/schema"; +import { ModerateCountsCommentEnteredSubscription } from "coral-admin/__generated__/ModerateCountsCommentEnteredSubscription.graphql"; + import changeQueueCount from "./changeQueueCount"; const ModerateCountsCommentEnteredSubscription = createSubscription( diff --git a/src/core/client/admin/routes/Moderate/ModerateNavigation/ModerateCountsCommentLeftSubscription.tsx b/src/core/client/admin/routes/Moderate/ModerateNavigation/ModerateCountsCommentLeftSubscription.tsx index ee0346c0e..23194e25a 100644 --- a/src/core/client/admin/routes/Moderate/ModerateNavigation/ModerateCountsCommentLeftSubscription.tsx +++ b/src/core/client/admin/routes/Moderate/ModerateNavigation/ModerateCountsCommentLeftSubscription.tsx @@ -1,13 +1,14 @@ import { graphql, requestSubscription } from "react-relay"; import { Environment } from "relay-runtime"; -import { ModerateCountsCommentLeftSubscription } from "coral-admin/__generated__/ModerateCountsCommentLeftSubscription.graphql"; import { createSubscription, SubscriptionVariables, } from "coral-framework/lib/relay"; import { GQLMODERATION_QUEUE } from "coral-framework/schema"; +import { ModerateCountsCommentLeftSubscription } from "coral-admin/__generated__/ModerateCountsCommentLeftSubscription.graphql"; + import changeQueueCount from "./changeQueueCount"; const ModerateCountsCommentLeftSubscription = createSubscription( diff --git a/src/core/client/admin/routes/Moderate/ModerateNavigation/ModerateNavigationContainer.tsx b/src/core/client/admin/routes/Moderate/ModerateNavigation/ModerateNavigationContainer.tsx index 6bd1acad7..eee34ea16 100644 --- a/src/core/client/admin/routes/Moderate/ModerateNavigation/ModerateNavigationContainer.tsx +++ b/src/core/client/admin/routes/Moderate/ModerateNavigation/ModerateNavigationContainer.tsx @@ -1,14 +1,15 @@ import React, { useEffect } from "react"; import { graphql } from "react-relay"; -import { ModerateNavigationContainer_moderationQueues as ModerationQueuesData } from "coral-admin/__generated__/ModerateNavigationContainer_moderationQueues.graphql"; -import { ModerateNavigationContainer_story as StoryData } from "coral-admin/__generated__/ModerateNavigationContainer_story.graphql"; import { combineDisposables, useSubscription, withFragmentContainer, } from "coral-framework/lib/relay"; +import { ModerateNavigationContainer_moderationQueues as ModerationQueuesData } from "coral-admin/__generated__/ModerateNavigationContainer_moderationQueues.graphql"; +import { ModerateNavigationContainer_story as StoryData } from "coral-admin/__generated__/ModerateNavigationContainer_story.graphql"; + import ModerateCountsCommentEnteredSubscription from "./ModerateCountsCommentEnteredSubscription"; import ModerateCountsCommentLeftSubscription from "./ModerateCountsCommentLeftSubscription"; import Navigation from "./Navigation"; diff --git a/src/core/client/admin/routes/Moderate/ModerateNavigation/ModerationCountsSubscription.tsx b/src/core/client/admin/routes/Moderate/ModerateNavigation/ModerationCountsSubscription.tsx index d21915478..e15431153 100644 --- a/src/core/client/admin/routes/Moderate/ModerateNavigation/ModerationCountsSubscription.tsx +++ b/src/core/client/admin/routes/Moderate/ModerateNavigation/ModerationCountsSubscription.tsx @@ -1,12 +1,13 @@ import { graphql, requestSubscription } from "react-relay"; import { Environment } from "relay-runtime"; -import { ModerationCountsSubscription } from "coral-admin/__generated__/ModerationCountsSubscription.graphql"; import { createSubscription, SubscriptionVariables, } from "coral-framework/lib/relay"; +import { ModerationCountsSubscription } from "coral-admin/__generated__/ModerationCountsSubscription.graphql"; + const ModerationCountsSubscription = createSubscription( "subscribeToCounts", ( diff --git a/src/core/client/admin/routes/Moderate/ModerateNavigation/Navigation.spec.tsx b/src/core/client/admin/routes/Moderate/ModerateNavigation/Navigation.spec.tsx index 3442b02b5..9fbb4246b 100644 --- a/src/core/client/admin/routes/Moderate/ModerateNavigation/Navigation.spec.tsx +++ b/src/core/client/admin/routes/Moderate/ModerateNavigation/Navigation.spec.tsx @@ -1,9 +1,10 @@ import React from "react"; import { createRenderer } from "react-test-renderer/shallow"; +import { PropTypesOf } from "coral-framework/types"; + import Navigation from "./Navigation"; -import { PropTypesOf } from "coral-framework/types"; it("renders correctly", () => { const renderer = createRenderer(); renderer.render(); diff --git a/src/core/client/admin/routes/Moderate/ModerateNavigation/changeQueueCount.ts b/src/core/client/admin/routes/Moderate/ModerateNavigation/changeQueueCount.ts index 8ad208bd6..fe50d0be6 100644 --- a/src/core/client/admin/routes/Moderate/ModerateNavigation/changeQueueCount.ts +++ b/src/core/client/admin/routes/Moderate/ModerateNavigation/changeQueueCount.ts @@ -1,6 +1,7 @@ -import { GQLMODERATION_QUEUE } from "coral-framework/schema"; import { RecordSourceSelectorProxy } from "relay-runtime"; +import { GQLMODERATION_QUEUE } from "coral-framework/schema"; + export default function changeQueueCount( store: RecordSourceSelectorProxy, change: number, @@ -14,7 +15,7 @@ export default function changeQueueCount( return; } const queueProxy = moderationQueuesProxy.getLinkedRecord( - queue!.toLocaleLowerCase() + queue.toLocaleLowerCase() ); if (!queueProxy) { return; diff --git a/src/core/client/admin/routes/Moderate/ModerateSearchBar/Field.tsx b/src/core/client/admin/routes/Moderate/ModerateSearchBar/Field.tsx index 071464b3a..2be24c9a9 100644 --- a/src/core/client/admin/routes/Moderate/ModerateSearchBar/Field.tsx +++ b/src/core/client/admin/routes/Moderate/ModerateSearchBar/Field.tsx @@ -83,7 +83,7 @@ const Field: FunctionComponent = ({ Search diff --git a/src/core/client/admin/routes/Moderate/ModerateSearchBar/ModerateAllOption.tsx b/src/core/client/admin/routes/Moderate/ModerateSearchBar/ModerateAllOption.tsx index ded840df3..67e9fbe7f 100644 --- a/src/core/client/admin/routes/Moderate/ModerateSearchBar/ModerateAllOption.tsx +++ b/src/core/client/admin/routes/Moderate/ModerateSearchBar/ModerateAllOption.tsx @@ -16,10 +16,16 @@ interface Props extends HTMLAttributes { const ModerateAllOption: FunctionComponent = ({ className, href, + "aria-selected": selected, ...rest }) => { return ( -
  • +