Enable @typescript-eslint/explicit-function-return-type
in /src (#9788)
* Enable `@typescript-eslint/explicit-member-accessibility` on /src * Prettier * Enable `@typescript-eslint/explicit-function-return-type` in /src * Fix types * tsc strict fixes * Delint * Fix test * Fix bad merge
This commit is contained in:
parent
7a36ba0fde
commit
030b7e90bf
683 changed files with 3459 additions and 3013 deletions
|
@ -34,7 +34,7 @@ interface Props {
|
|||
minimized: boolean;
|
||||
}
|
||||
|
||||
export function UserOnboardingButton({ selected, minimized }: Props) {
|
||||
export function UserOnboardingButton({ selected, minimized }: Props): JSX.Element {
|
||||
const useCase = useSettingValue<UseCase | null>("FTUE.useCaseSelection");
|
||||
const visible = useSettingValue<boolean>("FTUE.userOnboardingButton");
|
||||
|
||||
|
@ -45,7 +45,7 @@ export function UserOnboardingButton({ selected, minimized }: Props) {
|
|||
return <UserOnboardingButtonInternal selected={selected} minimized={minimized} />;
|
||||
}
|
||||
|
||||
function UserOnboardingButtonInternal({ selected, minimized }: Props) {
|
||||
function UserOnboardingButtonInternal({ selected, minimized }: Props): JSX.Element {
|
||||
const onDismiss = useCallback((ev: ButtonEvent) => {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
|
|
|
@ -24,7 +24,7 @@ import Heading from "../../views/typography/Heading";
|
|||
import FeedbackDialog from "../dialogs/FeedbackDialog";
|
||||
import { shouldShowFeedback } from "../../../utils/Feedback";
|
||||
|
||||
export function UserOnboardingFeedback() {
|
||||
export function UserOnboardingFeedback(): JSX.Element {
|
||||
if (!shouldShowFeedback()) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ import { UseCase } from "../../../settings/enums/UseCase";
|
|||
import AccessibleButton, { ButtonEvent } from "../../views/elements/AccessibleButton";
|
||||
import Heading from "../../views/typography/Heading";
|
||||
|
||||
const onClickSendDm = (ev: ButtonEvent) => {
|
||||
const onClickSendDm = (ev: ButtonEvent): void => {
|
||||
PosthogTrackers.trackInteraction("WebUserOnboardingHeaderSendDm", ev);
|
||||
defaultDispatcher.dispatch({ action: "view_create_chat" });
|
||||
};
|
||||
|
@ -33,7 +33,7 @@ interface Props {
|
|||
useCase: UseCase;
|
||||
}
|
||||
|
||||
export function UserOnboardingHeader({ useCase }: Props) {
|
||||
export function UserOnboardingHeader({ useCase }: Props): JSX.Element {
|
||||
let title: string;
|
||||
let description: string;
|
||||
let image;
|
||||
|
|
|
@ -24,7 +24,13 @@ import Heading from "../../views/typography/Heading";
|
|||
import { UserOnboardingFeedback } from "./UserOnboardingFeedback";
|
||||
import { UserOnboardingTask } from "./UserOnboardingTask";
|
||||
|
||||
export const getUserOnboardingCounters = (tasks: UserOnboardingTaskWithResolvedCompletion[]) => {
|
||||
export const getUserOnboardingCounters = (
|
||||
tasks: UserOnboardingTaskWithResolvedCompletion[],
|
||||
): {
|
||||
completed: number;
|
||||
waiting: number;
|
||||
total: number;
|
||||
} => {
|
||||
const completed = tasks.filter((task) => task.completed === true).length;
|
||||
const waiting = tasks.filter((task) => task.completed === false).length;
|
||||
|
||||
|
@ -39,7 +45,7 @@ interface Props {
|
|||
tasks: UserOnboardingTaskWithResolvedCompletion[];
|
||||
}
|
||||
|
||||
export function UserOnboardingList({ tasks }: Props) {
|
||||
export function UserOnboardingList({ tasks }: Props): JSX.Element {
|
||||
const { completed, waiting, total } = getUserOnboardingCounters(tasks);
|
||||
|
||||
return (
|
||||
|
|
|
@ -43,7 +43,7 @@ export function showUserOnboardingPage(useCase: UseCase): boolean {
|
|||
}
|
||||
|
||||
const ANIMATION_DURATION = 2800;
|
||||
export function UserOnboardingPage({ justRegistered = false }: Props) {
|
||||
export function UserOnboardingPage({ justRegistered = false }: Props): JSX.Element {
|
||||
const config = SdkConfig.get();
|
||||
const pageUrl = getHomePageUrl(config);
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ interface Props {
|
|||
completed?: boolean;
|
||||
}
|
||||
|
||||
export function UserOnboardingTask({ task, completed = false }: Props) {
|
||||
export function UserOnboardingTask({ task, completed = false }: Props): JSX.Element {
|
||||
const title = typeof task.title === "function" ? task.title() : task.title;
|
||||
const description = typeof task.description === "function" ? task.description() : task.description;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue