Skip to content

Commit c7ae24c

Browse files
committed
chore(docs): Add note of lint mode order
In order to get the `jest-runner-eslint/watch-fix` plugin to be activated, `lint` has to be listed first in the modes (see 0eee942 for more details). This adds notes in the relevant docs.
1 parent 9206315 commit c7ae24c

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

docs/api/start.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,14 @@ The optional `Options` object supports the following properties:
5050

5151
An `Array` of the types or modes of tests to run. Available modes:
5252

53-
- `'type'` - Runs Typescript type-checking
54-
- `'lint'` - Runs ESLint
55-
- `'unit'` - Runs Jest-based unit tests
53+
- `'type'` - Runs Typescript type-checking (files ending in `.ts`)
54+
- `'lint'` - Runs ESLint (files ending in `.ts`)
55+
- `'unit'` - Runs Jest-based unit tests (files ending in `.spec.ts`)
5656

5757
Optional. Defaults to all modes when unspecified.
5858

59+
> NOTE: [Jest Watch Plugins](https://jestjs.io/docs/en/watch-plugins) are added to make watch mode even more useful. Specifically the [eslint `watch-fix` plugin](https://github.com/jest-community/jest-runner-eslint#toggle---fix-in-watch-mode) is added to enable auto-fixing of lint errors. However, for this to work, `'lint'` has to be the first mode when specified.
60+
5961
## Return Value
6062

6163
`start()` returns a `Promise`.

docs/api/test.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ A flag indicating whether or not to continuously run the tests whenever source f
6464

6565
Optional. Defaults to `false`.
6666

67+
> NOTE: [Jest Watch Plugins](https://jestjs.io/docs/en/watch-plugins) are added to make watch mode even more useful. Specifically the [eslint `watch-fix` plugin](https://github.com/jest-community/jest-runner-eslint#toggle---fix-in-watch-mode) is added to enable auto-fixing of lint errors. However, for this to work, `'lint'` has to be the first mode when specified.
68+
6769
## Return Value
6870

6971
`test()` returns a `Promise`.

docs/cli/start.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ benmvp start --modes lint unit
3232

3333
A space-separated list of the types or modes of tests to run. Aliased as `-m`. Available modes:
3434

35-
- `type` - Runs Typescript type-checking
36-
- `lint` - Runs ESLint
37-
- `unit` - Runs Jest-based unit tests
35+
- `lint` - Runs ESLint (files ending in `.ts`)
36+
- `type` - Runs Typescript type-checking (files ending in `.ts`)
37+
- `unit` - Runs Jest-based unit tests (files ending in `.spec.ts`)
3838

3939
Optional. Defaults to all modes.
4040

41+
> NOTE: [Jest Watch Plugins](https://jestjs.io/docs/en/watch-plugins) are added to make watch mode even more useful. Specifically the [eslint `watch-fix` plugin](https://github.com/jest-community/jest-runner-eslint#toggle---fix-in-watch-mode) is added to enable auto-fixing of lint errors. However, for this to work, `lint` has to be the first mode when specified.
42+
4143
---
4244

4345
## More help

docs/cli/test.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ benmvp test --modes unit
2323
To run typing & linting:
2424

2525
```sh
26-
benmvp start --modes type lint
26+
benmvp start --modes lint type
2727
```
2828

2929
## Arguments
@@ -32,9 +32,9 @@ benmvp start --modes type lint
3232

3333
A space-separated list of the types or modes of tests to run. Aliased as `-m`. Available modes:
3434

35-
- `'type'` - Runs Typescript type-checking (files ending in `.ts`)
36-
- `'lint'` - Runs ESLint (files ending in `.ts`)
37-
- `'unit'` - Runs Jest-based unit tests (files ending in `.spec.ts`)
35+
- `lint` - Runs ESLint (files ending in `.ts`)
36+
- `type` - Runs Typescript type-checking (files ending in `.ts`)
37+
- `unit` - Runs Jest-based unit tests (files ending in `.spec.ts`)
3838

3939
Optional. Defaults to all modes.
4040

@@ -44,6 +44,8 @@ A flag indicating whether or not to continuously run the tests whenever source f
4444

4545
Optional. Defaults to `false`.
4646

47+
> NOTE: [Jest Watch Plugins](https://jestjs.io/docs/en/watch-plugins) are added to make watch mode even more useful. Specifically the [eslint `watch-fix` plugin](https://github.com/jest-community/jest-runner-eslint#toggle---fix-in-watch-mode) is added to enable auto-fixing of lint errors. However, for this to work, `lint` has to be the first mode whe specified.
48+
4749
---
4850

4951
## More help

0 commit comments

Comments
 (0)