Skip to content

Document nest new --strict and propose its usage in docs #2368

@j1elo

Description

@j1elo

I'm submitting a...

  • Regression
  • Bug report
  • Feature request
  • Documentation issue or request (new chapter/page)
  • Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

Several issues:

  1. The --strict flag on nest new --strict was added in nestjs/nest-cli#1344 but this wasn't accompanied with a corresponding update of the docs.
  2. Introductory pages keep suggesting to create new NestJS projects with nest new project-name, without mentioning the possibility of using --strict, which is actually a very desirable thing to do for most new projects for devs that care about proper type safety. As a consequence, the possibility of --strict is lost even for seasoned TypeScript programmers who are new to NestJS.

Expected behavior

  1. Document the --strict flag on the command reference page: CLI / Usage / nest new.
  2. Propose using the command nest new --strict project-name in introductory pages: Introduction / Installation and Overview / First steps / Setup. Possibly adding a note, stating that for devs who are new to TypeScript, they might want to ease their learning curve by skipping the --strict flag, but that doing so is not recommended for stronger type safety.

Minimal reproduction of the problem with instructions

N/A

What is the motivation / use case for changing the behavior?

  • Better discoverability of the --strict flag.
  • Promotion of better defaults for new projects, by encouraging to enable strict null checks on new projects.

Environment

For Tooling issues:

N/A

Others:

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions