yarn lint-staged 17.3.0
v17.3.0

5 hours ago

Minor Changes

  • #1825 16b3f74 - It is now possible to run multiple tasks in parallel for a single glob by configuring it with an array of tasks (which run sequentially), and then placing another array inside it (where the tasks will run in parallel). The following demonstrates the order tasks will start in:

    {
      "*.ts": ["first", "second", ["third", "third"], "fourth"]
    }

    As a concrete example, lint-staged's own configuration is:

    /** @type {import('./lib/index.js').Configuration} */
    export default {
      "*": [
        [
          "oxfmt --check --no-error-on-unmatched-pattern",
          "oxlint --no-error-on-unmatched-pattern",
        ],
      ],
      "*.ts": () => "tsc",
    };

    which means:

    1. for all staged files, run the two commands in parallel with staged filenames appended, for example:
      • oxfmt --check --no-error-on-unmatched-pattern lib/index.js
      • oxlint --no-error-on-unmatched-pattern lib/index.js
    2. additionally, if any *.ts files are staged, run tsc without appending any arguments
    3. The two sets of commands also run in parallel

Patch Changes

  • #1829 15f7e53 - During an in-progress merge, files that are unchanged from the branch being merged are now skipped. Technically, files are only included if there are staged changes against both HEAD and MERGE_HEAD.

Don't miss a new lint-staged release

NewReleases is sending notifications on new releases.