Skip to content

Commit

Permalink
fix: Disable concurrent sub task execution by default (#229)
Browse files Browse the repository at this point in the history
Closes #225
  • Loading branch information
sudo-suhas authored and okonet committed Aug 24, 2017
1 parent 2eb10a4 commit 48c8c6f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ See [examples](#examples) and [configuration](#configuration) below.

> I recommend using [husky](https://github.com/typicode/husky) to manage git hooks but you can use any other tool.
> **NOTE:**
> **NOTE:**
>
> If you're using commitizen and having following npm-script `{ commit: git-cz }`, `precommit` hook will run twice before commitizen cli and after the commit. [This buggy behaviour is introduced by husky](https://github.com/okonet/lint-staged/issues/152#issuecomment-306046520).
>
Expand Down Expand Up @@ -95,7 +95,7 @@ To set options and keep lint-staged extensible, advanced format can be used. Thi
* `gitDir` β€” Sets the relative path to the `.git` root. Useful when your `package.json` is located in a subdirectory. See [working from a subdirectory](#working-from-a-subdirectory)
* `concurrent` β€” *true* β€” runs linters for each glob pattern simultaneously. If you don’t want this, you can set `concurrent: false`
* `chunkSize` β€” Max allowed chunk size based on number of files for glob pattern. This is important on windows based systems to avoid command length limitations. See [#147](https://github.com/okonet/lint-staged/issues/147)
* `subTaskConcurrency` β€” `2` β€” Controls concurrency for processing chunks generated for each linter.
* `subTaskConcurrency` β€” `1` β€” Controls concurrency for processing chunks generated for each linter. Execution is **not** concurrent by default(see [#225](https://github.com/okonet/lint-staged/issues/225))
* `verbose` β€” *false* β€” runs lint-staged in verbose mode. When `true` it will use https://github.com/SamVerschueren/listr-verbose-renderer.
* `globOptions` β€” `{ matchBase: true, dot: true }` β€” [minimatch options](https://github.com/isaacs/minimatch#options) to customize how glob patterns match files.

Expand Down
2 changes: 1 addition & 1 deletion src/runScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const readConfigOption = require('./readConfigOption')
module.exports = function runScript(commands, pathsToLint, packageJson, options) {
const config = readConfigOption(options, 'config', {})

const concurrency = readConfigOption(config, 'subTaskConcurrency', 2)
const concurrency = readConfigOption(config, 'subTaskConcurrency', 1)
const chunkSize = calcChunkSize(
pathsToLint,
readConfigOption(config, 'chunkSize', Number.MAX_SAFE_INTEGER)
Expand Down

0 comments on commit 48c8c6f

Please sign in to comment.