Repository: freeCodeCamp/freeCodeCamp
File: client/src/templates/Challenges/redux/index.js (JavaScript)

Code before:

export const sagas = [
  ...createExecuteChallengeSaga(actionTypes),
  ...createCurrentChallengeSaga(actionTypes)
];

export const reducer = handleActions(
  {
    [actionTypes.submitChallenge]: state => ({
      ...state,
      isSubmitting: true
    }),
    [actionTypes.submitChallengeComplete]: state => ({
      ...state,
      isSubmitting: false
    }),
    [actionTypes.submitChallengeError]: state => ({
      ...state,
      isSubmitting: false
    }),
    [actionTypes.createFiles]: (state, { payload }) => {
      let visibleEditors = state.visibleEditors;

      if (Object.keys(visibleEditors).length === 0) {
        visibleEditors = { [getTargetEditor(payload)]: true };
      };

      return {
        ...state,
        challengeFiles: payload,
        visibleEditors
      };
    },
    [actionTypes.updateFile]: (
      state,
      { payload: { fileKey, editorValue, editableRegionBoundaries } }
    ) => {
      const updates = {};
      // if a given part of the payload is null, we leave that part of the state
      // unchanged
      if (editableRegionBoundaries !== null)
        updates.editableRegionBoundaries = editableRegionBoundaries;
      if (editorValue !== null) updates.contents = editorValue;
      if (editableRegionBoundaries !== null && editorValue !== null)
        updates.editableContents = getLines(
          editorValue,
          editableRegionBoundaries
        );
      return {
        ...state,
        challengeFiles: state.challengeFiles.map(challengeFile =>

Review comment (suggestion):
```suggestion
      }
```
This semicolon is cause of the CI error.

Code after:

export const sagas = [
  ...createExecuteChallengeSaga(actionTypes),
  ...createCurrentChallengeSaga(actionTypes)
];

export const reducer = handleActions(
  {
    [actionTypes.submitChallenge]: state => ({
      ...state,
      isSubmitting: true
    }),
    [actionTypes.submitChallengeComplete]: state => ({
      ...state,
      isSubmitting: false
    }),
    [actionTypes.submitChallengeError]: state => ({
      ...state,
      isSubmitting: false
    }),
    [actionTypes.createFiles]: (state, { payload }) => ({
      ...state,
      challengeFiles: payload
    }),
    [actionTypes.updateFile]: (
      state,
      { payload: { fileKey, editorValue, editableRegionBoundaries } }
    ) => {
      const updates = {};
      // if a given part of the payload is null, we leave that part of the state
      // unchanged
      if (editableRegionBoundaries !== null)
        updates.editableRegionBoundaries = editableRegionBoundaries;
      if (editorValue !== null) updates.contents = editorValue;
      if (editableRegionBoundaries !== null && editorValue !== null)
        updates.editableContents = getLines(
          editorValue,
          editableRegionBoundaries
        );
      return {
        ...state,
        challengeFiles: state.challengeFiles.map(challengeFile =>
          challengeFile.fileKey === fileKey
            ? { ...challengeFile, ...updates }
            : { ...challengeFile }
        ),
        isBuildEnabled: true
      };
    },
    [actionTypes.storedCodeFound]: (state, { payload }) => ({
      ...state,