Skip to content

Commit f70207a

Browse files
docs: combine lint subsections
1 parent 100fa62 commit f70207a

File tree

1 file changed

+5
-28
lines changed

1 file changed

+5
-28
lines changed

content/first-steps.md

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -117,41 +117,18 @@ This command will watch your files, automatically recompiling and reloading the
117117

118118
#### Linting and formatting
119119

120-
[Nest CLI](/cli/overview) provides best effort to scaffold a reliable development workflow at scale. Thus, a generated Nest project comes with both a code **linter** and **formatter** preinstalled (respectively [eslint](https://eslint.org/) and [prettier](https://prettier.io/)).
120+
[CLI](/cli/overview) provides best effort to scaffold a reliable development workflow at scale. Thus, a generated Nest project comes with both a code **linter** and **formatter** preinstalled (respectively [eslint](https://eslint.org/) and [prettier](https://prettier.io/)).
121121

122122
> info **Hint** Not sure about the role of formatters VS linters ? Learn the difference [here](https://prettier.io/docs/en/comparison.html).
123123
124-
##### IDE usage
125-
126124
To ensure maximum stability and extensibility, we use the base [`eslint`](https://www.npmjs.com/package/eslint) and [`prettier`](https://www.npmjs.com/package/prettier) cli packages. This setup allows neat IDE integration with official extensions by design.
127125

128-
> warning **Warning** A Nest project is not using the [~~`prettier-eslint`~~](https://github.com/prettier/prettier-eslint) package, do not expect compatibility with extensions using it.
129-
130-
##### Scripted usage
131-
132-
For headless environments where an IDE is not relevant (*Continuous Integration*, *Git hooks*, ...), a Nest project comes with ready-to-use `npm` scripts.
126+
For headless environments where an IDE is not relevant (Continuous Integration, Git hooks, etc.) a Nest project comes with ready-to-use `npm` scripts.
133127

134128
```bash
135129
# Lint and autofix with eslint
136-
npm run lint
130+
$ npm run lint
131+
137132
# Format with prettier
138-
npm run format
133+
$ npm run format
139134
```
140-
141-
##### Plugins and config
142-
143-
A Nest cli scaffolded project uses
144-
145-
- [`eslint-plugin-prettier`](https://github.com/prettier/eslint-plugin-prettier) to remove conflicting rules from `eslint` for use with `prettier`.
146-
- [`@typescript-eslint/plugin`](https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin) to enable Typescript linting
147-
148-
> info **Hint** You can learn more about the behavior of `eslint-plugin-prettier` in its [documentation](https://github.com/prettier/eslint-plugin-prettier#recommended-configuration) and discover the actual configuration inside generated [`.eslintrc.js`](https://github.com/nestjs/typescript-starter/blob/master/.eslintrc.js) file
149-
150-
##### Code style
151-
152-
With this stack setup, by default we ensure the resulting code follows:
153-
154-
- Typescript eslint [recommended rules](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/recommended.ts)
155-
- Improved with some [rules in `.eslintrc.js` file](https://github.com/nestjs/typescript-starter/blob/master/.eslintrc.js)
156-
- Prettier [default options](https://prettier.io/docs/en/options.html)
157-
- Improved with some [options in `.prettierrc` file](https://github.com/nestjs/typescript-starter/blob/master/.prettierrc)

0 commit comments

Comments
 (0)