Skip to content

Commit 3aa62fd

Browse files
committed
lint fixes
1 parent c63e273 commit 3aa62fd

File tree

18 files changed

+46
-37
lines changed

18 files changed

+46
-37
lines changed

src-ts/tools/learn/Learn.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
routeContext,
77
RouteContextData,
88
} from '../../lib'
9+
910
import { LearnSwr } from './learn-lib'
1011

1112
export const toolTitle: string = ToolTitle.learn

src-ts/tools/learn/course-certificate/certificate-view/CertificateView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import {
1717
CoursesProviderData,
1818
useGetCertification,
1919
useGetCourses,
20-
UserCompletedCertificationsProviderData,
2120
useGetUserCompletedCertifications,
21+
UserCompletedCertificationsProviderData,
2222
} from '../../learn-lib'
2323
import { getCoursePath, getUserCertificateSsr } from '../../learn.routes'
2424

src-ts/tools/learn/course-completed/CourseCompletedPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ import {
1616
CourseTitle,
1717
useGetCertification,
1818
useGetCourses,
19+
useGetUserCertificationProgress,
1920
useLearnBreadcrumb,
2021
UserCertificationProgressProviderData,
21-
UserCertificationProgressStatus,
22-
useGetUserCertificationProgress
22+
UserCertificationProgressStatus
2323
} from '../learn-lib'
2424
import { getCertificatePath, getCoursePath, LEARN_PATHS, rootRoute } from '../learn.routes'
2525

src-ts/tools/learn/course-details/CourseDetailsPage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ import {
1717
ResourceProviderData,
1818
useGetCertification,
1919
useGetCourses,
20+
useGetResourceProvider,
21+
useGetUserCertificationProgress,
2022
useLearnBreadcrumb,
2123
UserCertificationProgressProviderData,
22-
UserCertificationProgressStatus,
23-
useGetResourceProvider,
24-
useGetUserCertificationProgress
24+
UserCertificationProgressStatus
2525
} from '../learn-lib'
2626
import { getCoursePath } from '../learn.routes'
2727

src-ts/tools/learn/free-code-camp/FreeCodeCamp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ import {
2525
LearnModuleProgress,
2626
LessonProviderData,
2727
useGetCourses,
28-
useLearnBreadcrumb,
2928
useGetLesson,
29+
useGetUserCertificationProgress,
30+
useLearnBreadcrumb,
3031
userCertificationProgressCompleteCourseAsync,
3132
UserCertificationProgressProviderData,
3233
userCertificationProgressStartAsync,
3334
UserCertificationProgressStatus,
3435
userCertificationProgressUpdateAsync,
3536
UserCertificationUpdateProgressActions,
36-
useGetUserCertificationProgress,
3737
} from '../learn-lib'
3838
import { getCertificationCompletedPath, getCoursePath, getLessonPathFromModule } from '../learn.routes'
3939

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { LearnCertification } from "./learn-certification.model"
1+
import { LearnCertification } from './learn-certification.model'
22

33
export interface AllCertificationsProviderData {
44
certification?: LearnCertification
55
certifications: Array<LearnCertification>
6+
error: boolean
67
loading: boolean
78
ready: boolean
8-
error: boolean
99
}

src-ts/tools/learn/learn-lib/data-providers/all-certifications-provider/all-certifications.provider.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import useSWR, { SWRConfiguration, SWRResponse } from 'swr'
2+
23
import { learnUrlGet } from '../../functions'
34
import { useSwrCache } from '../../learn-swr'
45

@@ -21,14 +22,14 @@ export function useGetAllCertifications(
2122

2223
const {data, error}: SWRResponse = useSWR(url, {
2324
...swrCacheConfig,
24-
isPaused: () => options?.enabled === false
25+
isPaused: () => options?.enabled === false,
2526
})
2627

2728
return {
2829
certifications: data ?? [],
30+
error: !!error,
2931
loading: !data,
3032
ready: !!data,
31-
error: !!error,
3233
}
3334
}
3435

@@ -45,13 +46,13 @@ export function useGetCertification(
4546
)
4647

4748
const {data, error}: SWRResponse = useSWR(url, {
48-
isPaused: () => options?.enabled === false
49+
isPaused: () => options?.enabled === false,
4950
})
5051
return {
51-
certifications: [],
5252
certification: data ?? undefined,
53+
certifications: [],
54+
error: !!error,
5355
loading: !data,
5456
ready: !!data,
55-
error: !!error,
5657
}
5758
}

src-ts/tools/learn/learn-lib/data-providers/courses-provider/courses-provider-data.model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { LearnCourse } from "./learn-course.model"
1+
import { LearnCourse } from './learn-course.model'
22

33
export interface CoursesProviderData {
44
course?: LearnCourse

src-ts/tools/learn/learn-lib/data-providers/courses-provider/courses.provider.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { get } from 'lodash'
22
import useSWR, { SWRConfiguration, SWRResponse } from 'swr'
3+
34
import { learnUrlGet } from '../../functions'
45
import { useSwrCache } from '../../learn-swr'
56

src-ts/tools/learn/learn-lib/data-providers/resource-provider-provider/resource-provider.provider.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { find } from 'lodash'
22
import useSWR, { SWRConfiguration, SWRResponse } from 'swr'
3+
34
import { learnUrlGet } from '../../functions'
45
import { useSwrCache } from '../../learn-swr'
56

@@ -14,8 +15,8 @@ export function useGetResourceProvider(providerName?: string): ResourceProviderD
1415
const {data, error}: SWRResponse<ReadonlyArray<ResourceProvider>> = useSWR(url, swrCacheConfig)
1516

1617
return {
17-
provider: find(data, {name: providerName}),
1818
loading: !data && !error,
19+
provider: find(data, {name: providerName}),
1920
ready: !!data || !!error,
2021
}
2122
}

0 commit comments

Comments
 (0)