chore: use constants for superblocks (#43886)

* chore: use constants for superblocks

* add prettier ts dec to challenge-helper-scripts

* config/ to ts. broken

* typescripterise tools/ and config/

* create global tsconfig, remove alternate configs

* delete temp ts->js, add to gitignore

* fix gitignore

* re-import SuperBlocks in super-block-intro.tsx

* remove renamed files added again

* fix config

* remove accidental files

* remove snap

* delete built files

* adjust eslintrc for enums

* add node types to root

* ignore build files in lint and prettier

* fix tools/ in tsconfig

* ignore annoying ts warnings

* prettierise Map/index.tsx

* fix enum to match lint rule

* rejig Map to render RWD superblock

* 'pretty minor' - implicitly tsc within root

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

* fix client/package.json for Gitpod

* broken: migrate @types to root

* fix: use typeRoots to prevent duplication

* fix show.tsx, try typeroots in root

* silly fix for duplicate node_modules types

* remove typeRoots from root

* fix: tsconfig or not tsconfig, that is the...

* fix: ...question: Whether 'tis nobler in the mind

to suffer the slings and arrows of outrageous configs...

* fix: Or to take Arms against a Sea of lint errors
And by opposing end them

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Shaun Hamilton
2021-11-19 14:19:40 +00:00
committed by GitHub
parent d944fa0c8e
commit d75e43a1e7
29 changed files with 1391 additions and 262 deletions

View File

@@ -2,6 +2,7 @@ import { uniqBy } from 'lodash-es';
import { createAction, handleActions } from 'redux-actions';
import store from 'store';
import { SuperBlocks } from '../../../config/certification-settings';
import { actionTypes as challengeTypes } from '../templates/Challenges/redux/action-types';
import { CURRENT_CHALLENGE_KEY } from '../templates/Challenges/redux/current-challenge-saga';
import { createAcceptTermsSaga } from './accept-terms-saga';
@@ -292,27 +293,27 @@ export const certificatesByNameSelector = username => state => {
{
show: isRespWebDesignCert,
title: 'Responsive Web Design Certification',
certSlug: 'responsive-web-design'
certSlug: SuperBlocks.RespWebDesign
},
{
show: isJsAlgoDataStructCert,
title: 'JavaScript Algorithms and Data Structures Certification',
certSlug: 'javascript-algorithms-and-data-structures'
certSlug: SuperBlocks.JsAlgoDataStruct
},
{
show: isFrontEndLibsCert,
title: 'Front End Development Libraries Certification',
certSlug: 'front-end-development-libraries'
certSlug: SuperBlocks.FrontEndDevLibs
},
{
show: is2018DataVisCert,
title: 'Data Visualization Certification',
certSlug: 'data-visualization'
certSlug: SuperBlocks.DataVis
},
{
show: isApisMicroservicesCert,
title: 'Back End Development and APIs Certification',
certSlug: 'back-end-development-and-apis'
certSlug: SuperBlocks.BackEndDevApis
},
{
show: isQaCertV7,

View File

@@ -1,5 +1,6 @@
import PropTypes from 'prop-types';
import { HandlerProps } from 'react-reflex';
import { SuperBlocks } from '../../../config/certification-settings';
export const UserPropType = PropTypes.shape({
about: PropTypes.string,
@@ -81,7 +82,7 @@ export type MarkdownRemark = {
frontmatter: {
block: string;
isBeta: boolean;
superBlock: string;
superBlock: SuperBlocks;
title: string;
};
headings: [
@@ -159,7 +160,7 @@ export type ChallengeNode = {
};
sourceInstanceName: string;
superOrder: number;
superBlock: string;
superBlock: SuperBlocks;
tail: string[];
template: string;
tests: Test[];
@@ -302,7 +303,7 @@ export type ChallengeMeta = {
nextChallengePath: string;
prevChallengePath: string;
removeComments: boolean;
superBlock: string;
superBlock: SuperBlocks;
title?: string;
challengeType?: number;
helpCategory: string;