Repository: freeCodeCamp/freeCodeCamp
File: tools/challenge-helper-scripts/create-project.ts (TypeScript)

Code before:
  {
    name: 'chapter',
    message:
      'What chapter in full-stack.json should this full stack project go in?',
    default: 'html',
    type: 'list',
    choices: fullStackData.chapters.map(x => x.dashedName),
    when: (answers: CreateProjectArgs) =>
      answers.superBlock === SuperBlocks.FullStackDeveloper
  },
  {
    name: 'module',
    message:
      'What module in full-stack.json should this full stack project go in?',
    default: 'html',
    type: 'list',
    choices: (answers: CreateProjectArgs) =>
      fullStackData.chapters
        .find(x => x.dashedName === answers.chapter)
        ?.modules.map(x => x.dashedName),
    when: (answers: CreateProjectArgs) =>
      answers.superBlock === SuperBlocks.FullStackDeveloper
  },
  {
    name: 'position',
    message: 'Which position in the module does this appear in the module?',
    default: 1,
    validate: (position: string) => {
      return parseInt(position, 10) > 0
        ? true
        : 'Position must be an number greater than zero.';
    },
    when: (answers: CreateProjectArgs) =>
      answers.superBlock === SuperBlocks.FullStackDeveloper,
    filter: (position: string) => {
      return parseInt(position, 10);
    }
  },
  {
    name: 'order',
    message: 'Which position does this appear in the certificate?',
    default: 42,
    validate: (order: string) => {
      return parseInt(order, 10) > 0
        ? true
        : 'Order must be an number greater than zero.';
    },
    when: (answers: CreateProjectArgs) =>
      answers.superBlock !== SuperBlocks.FullStackDeveloper,
    filter: (order: string) => {
      return parseInt(order, 10);

Review comment (suggestion):
this sentence repeat "in the module" twice, other than that I am happy to approve

```suggestion
    message: 'At which position does this appear in the module?',
```

Code after:
  {
    name: 'chapter',
    message:
      'What chapter in full-stack.json should this full stack project go in?',
    default: 'html',
    type: 'list',
    choices: fullStackData.chapters.map(x => x.dashedName),
    when: (answers: CreateProjectArgs) =>
      answers.superBlock === SuperBlocks.FullStackDeveloper
  },
  {
    name: 'module',
    message:
      'What module in full-stack.json should this full stack project go in?',
    default: 'html',
    type: 'list',
    choices: (answers: CreateProjectArgs) =>
      fullStackData.chapters
        .find(x => x.dashedName === answers.chapter)
        ?.modules.map(x => x.dashedName),
    when: (answers: CreateProjectArgs) =>
      answers.superBlock === SuperBlocks.FullStackDeveloper
  },
  {
    name: 'position',
    message: 'At which position does this appear in the module?',
    default: 1,
    validate: (position: string) => {
      return parseInt(position, 10) > 0
        ? true
        : 'Position must be an number greater than zero.';
    },
    when: (answers: CreateProjectArgs) =>
      answers.superBlock === SuperBlocks.FullStackDeveloper,
    filter: (position: string) => {
      return parseInt(position, 10);
    }
  },
  {
    name: 'order',
    message: 'Which position does this appear in the certificate?',
    default: 42,
    validate: (order: string) => {
      return parseInt(order, 10) > 0
        ? true
        : 'Order must be an number greater than zero.';
    },
    when: (answers: CreateProjectArgs) =>
      answers.superBlock !== SuperBlocks.FullStackDeveloper,
    filter: (order: string) => {
      return parseInt(order, 10);