Skip to content

Commit

Permalink
fix: flip threads default
Browse files Browse the repository at this point in the history
  • Loading branch information
jsg2021 committed Nov 30, 2020
1 parent 2a54cc5 commit fddb89d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,13 @@ Will cause the module build to fail if there are any errors, if set to `true`.

Will cause the module build to fail if there are any warnings, if set to `true`.

#### `threads`

- Type: `Boolean | Number`
- Default: `false`

Will run lint tasks across a thread pool. The pool size is automatic unless you specify a number.

#### `quiet`

- Type: `Boolean`
Expand Down
1 change: 0 additions & 1 deletion src/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ import schema from './options.json';
export function getOptions(pluginOptions) {
const options = {
extensions: 'js',
threads: true,
...pluginOptions,
};

Expand Down
2 changes: 1 addition & 1 deletion src/options.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
]
},
"threads": {
"description": "Set to true to auto-selected based on number of cpus. Set to a number greater than 1 to set an explicit maximum. Set to false, 1 or less to disable and only run in main process.",
"description": "Default is false. Set to true for an auto-selected pool size based on number of cpus. Set to a number greater than 1 to set an explicit pool size. Set to false, 1, or less to disable and only run in main process.",
"anyOf": [{ "type": "number" }, { "type": "boolean" }]
}
}
Expand Down
2 changes: 2 additions & 0 deletions test/utils/conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export default (entry, pluginConf = {}, webpackConf = {}) => {
// folder to skip it on the global linting, but here we want the opposite
// (we only use .eslintignore on the test that checks this)
ignore: false,
// TODO: update tests to run both states: test.each([[{threads: false}], [{threads: true}]])('it should...', async ({threads}) => {...})
threads: true,
...pluginConf,
}),
],
Expand Down

0 comments on commit fddb89d

Please sign in to comment.