Skip to content

Commit 9206315

Browse files
committed
fix(command): Make lint the test mode 1st default
When specifying multiple projects, `jest` uses the first project as the [global config](https://github.com/facebook/jest/blob/4c3c7125fc3673499a0d2192ce888de5b7aa03dc/packages/jest-config/src/index.ts#L320-L322). The global config, in part, drives which watch plugins are used. We want the `jest-runner-eslint/watch-fix` plugin to run any time we're linting (either by itself or with other projects), so by making `lint` the first option in the default, it'll ensure that its `watchPlugins` get used in the global config.
1 parent f8841bb commit 9206315

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cli/args.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const TEST_MODES = {
77
describe: 'The types/modes of tests to run',
88
alias: 'm',
99
array: true,
10-
default: ['type', 'lint', 'unit'] as Array<TestMode>,
10+
default: ['lint', 'type', 'unit'] as Array<TestMode>,
1111
},
1212
}
1313
const BUILD_FORMATS = {

0 commit comments

Comments
 (0)