Skip to content

Commit 52690e9

Browse files
committed
docs: add docs & hints on --strict flag
1 parent 7e485cf commit 52690e9

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

content/cli/usages.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Creates and initializes a new Nest project. Prompts for package manager.
3434
| `--package-manager [package-manager]` | Specify package manager. Use `npm`, `yarn`, or `pnpm`. Package manager must be installed globally.<br/> Alias: `-p` |
3535
| `--language [language]` | Specify programming language (`TS` or `JS`).<br/> Alias: `-l` |
3636
| `--collection [collectionName]` | Specify schematics collection. Use package name of installed npm package containing schematic.<br/> Alias: `-c` |
37+
| `--strict` | Start the project with the following TypeScript compiler flags enalbed: `strictNullChecks`, `noImplicitAny`, `strictBindCallApply`, `forceConsistentCasingInFileNames`, `noFallthroughCasesInSwitch` |
3738

3839
#### nest generate
3940

content/first-steps.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ $ npm i -g @nestjs/cli
2121
$ nest new project-name
2222
```
2323

24+
> info **Hint** If you want to create a new project with few flags of TypeScript's strict mode enabled, add the option `--strict` on `new` command. We highly recommend that! More on this option [here](./cli/usages).
25+
2426
The `project-name` directory will be created, node modules and a few other boilerplate files will be installed, and a `src/` directory will be created and populated with several core files.
2527

2628
<div class="file-tree">

content/introduction.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ $ npm i -g @nestjs/cli
2323
$ nest new project-name
2424
```
2525

26+
> info **Hint** If you want to create a new project with few flags of TypeScript's strict mode enabled, add the option `--strict` on `new` command. We highly recommend that! More on this option [here](./cli/usages).
27+
2628
#### Alternatives
2729

2830
Alternatively, to install the TypeScript starter project with **Git**:

0 commit comments

Comments
 (0)