refactor: fix hidden eslint errors (#49365)

* refactor: explicit types for validate

* refactor: explicit return types for ui-components

* refactor: use exec instead of match

* refactor: add lots more boundary types

* refactor: more eslint warnings

* refactor: more explicit exports

* refactor: more explicit types

* refactor: even more explicit types

* fix: relax type contrainsts for superblock-order

* refactor: final boundaries

* refactor: avoid using 'object' type

* fix: use named import for captureException

This uses TypeScript (which works) instead of import/namespace
(which doesn't) to check if captureException exists in sentry/gatsby
(it does)
This commit is contained in:
Oliver Eyton-Williams
2023-02-13 16:13:50 +01:00
committed by GitHub
parent 218fe6605b
commit 4ff00922da
40 changed files with 196 additions and 84 deletions

View File

@@ -9,7 +9,7 @@ type Props = {
};
type Solution = Pick<ChallengeFile, 'ext' | 'contents' | 'fileKey'>;
function SolutionViewer({ challengeFiles, solution }: Props) {
function SolutionViewer({ challengeFiles, solution }: Props): JSX.Element {
const isLegacy = !challengeFiles || !challengeFiles.length;
const solutions = isLegacy
? [