lint-staged

🚫💩 — Run linters on git staged files

MIT License

Downloads
43M
Stars
12.9K
Committers
143

Bot releases are hidden (Show)

lint-staged - v15.0.0

Published by iiroj about 1 year ago

Major Changes

  • #1322 66b93aa Thanks @iiroj! - Require at least Node.js 18.12.0

    This release drops support for Node.js 16, which is EOL after 2023-09-11.
    Please upgrade your Node.js to the latest version.

    Additionally, all dependencies have been updated to their latest versions.

lint-staged - v10.1.1

Published by okonet over 4 years ago

10.1.1 (2020-03-31)

Bug Fixes

  • add -- to git add command to denote pathspec starting (#821) (226ccdb)
lint-staged - v10.1.0

Published by okonet over 4 years ago

10.1.0 (2020-03-30)

Bug Fixes

  • do not return string from runAll, add info symbol to "No staged files found." message (1e7298a)
  • force src and dst prefixes in diff to work around local diff.noprefix setting (7f2ef33)
  • unset GIT_LITERAL_PATHSPECS env variable before running (a653c55)

Features

  • add --no-stash option to disable the backup stash, and not revert in case of errors (c386e4c)
  • only hide/restore unstaged modifications to partially staged files (52125a9)
lint-staged - v10.0.10

Published by okonet over 4 years ago

10.0.10 (2020-03-29)

Bug Fixes

  • support non-ASCII filenames when git is configured with core.quotepath on (2cb26a6)
lint-staged - v10.0.9

Published by okonet over 4 years ago

10.0.9 (2020-03-24)

Bug Fixes

  • use path.join and normalize to improve msys compatibility in resolveGitRepo (1ad263a)
lint-staged - v10.0.8

Published by okonet over 4 years ago

10.0.8 (2020-02-25)

Bug Fixes

  • do not drop backup stash when reverting to original state fails (f589336)
  • evaluate functional configuration only once (abe4b92)
lint-staged - v10.0.7

Published by okonet over 4 years ago

10.0.7 (2020-01-31)

Bug Fixes

  • replace fs.promises with util.promisify (#786) (f71c1c9)
lint-staged - v10.0.6

Published by okonet over 4 years ago

10.0.6 (2020-01-30)

Bug Fixes

  • make sure deleted files aren't restored due to git bugs (#778) (6bfbe6c)
lint-staged - v10.0.5

Published by okonet over 4 years ago

10.0.5 (2020-01-30)

Bug Fixes

  • always resolve real git config dir location if .git is a file (#784) (b98a5ed)
lint-staged - v10.0.4

Published by okonet over 4 years ago

10.0.4 (2020-01-29)

Bug Fixes

lint-staged - v10.0.3

Published by okonet over 4 years ago

10.0.3 (2020-01-27)

Bug Fixes

  • correctly restore untracked files after running (#780) (4010db0)
lint-staged - v10.0.2

Published by okonet over 4 years ago

10.0.2 (2020-01-22)

Bug Fixes

  • only warn about git add when it's the exact command (24febb3)
  • parse command string with string-argv unless --shell is used (4cb4dde)
  • print a better warning when the initial commit is missing (293547d)
lint-staged - v10.0.1

Published by okonet over 4 years ago

10.0.1 (2020-01-20)

Bug Fixes

lint-staged - v10.0.0

Published by okonet over 4 years ago

10.0.0 (2020-01-19)

Bug Fixes

  • add all modified files to git index with git add . (bf532c2)
  • automatically add modifications only to originally staged files (083b8e7)
  • better workaround for git stash --keep-index bug (f3ae378)
  • correctly leave only staged files for running tasks (cfde9ca)
  • correctly recover when unstaged changes cannot be restored (d091f71)
  • correctly restore untracked files from backup stash (c7d0592)
  • error handling skips dropping backup stash after internal git errors (30b4809)
  • fail with a message when backup stash is missing (1b64239)
  • gitWorkflow handles active merge mode (2f1e886)
  • handle git MERGE_* files separately; improve error handling (da22cf2)
  • improve debug logging (f88e226)
  • keep untracked files around by backing them up (fc03fdc)
  • max arg length is by default half of the allowed to prevent edge cases (80406c2)
  • prevent Listr from hiding git add warning (cce9809)
  • restore metadata about git merge before running tasks (f8ddfc2)
  • retry failing apply with 3-way merge (76cb08f)
  • support binary files (7b3a334)
  • try applying unstaged changes before handling errors (357934f)
  • update warning about git add, and to README (6467a66)
  • workaround for stashing deleted files for git < 2.23 (1a87333)

Features

  • automatically stage task modifications (74ed28d)
  • bump Node.js version dependency to at least 10.13.0 (#747) (814b9df)
  • split tasks into chunks to support shells with limited max argument length (#732) (cb43872)
  • support async function tasks (20d5c5d)
  • throw error to prevent empty commits unless --allow-empty is used (#762) (8bdeec0)
  • use git stashes for gitWorkflow (40a5db1)
  • warn when task contains "git add" (5208399)

BREAKING CHANGES

  • Previously, lint-staged would allow empty commits in the situation where a linter task like "prettier --write" reverts all staged changes automatically. Now the default behaviour is to throw an error with a helpful warning message. The --allow empty option can be used to allow empty commits, or allowEmpty: true for the Node.js API.
  • Node.js v8 is no longer supported because it will reach EOL on 2019-12-31
  • Prior to version 10, tasks had to manually include git add as the final step. This behavior has been integrated into lint-staged itself in order to prevent race conditions with multiple tasks editing the same files. If lint-staged detects git add in task configurations, it will show a warning in the console. Please remove git add from your configuration after upgrading.
lint-staged - v10.0.0-beta.15

Published by okonet almost 5 years ago

10.0.0-beta.15 (2020-01-08)

Features

  • throw error to prevent empty commits unless --allow-empty is used (#762) (8bdeec0)

BREAKING CHANGES

  • Previously, lint-staged would allow empty commits in the situation where a linter task like "prettier --write" reverts all staged changes automatically. Now the default behaviour is to throw an error with a helpful warning message. The --allow empty option can be used to allow empty commits, or allowEmpty: true for the Node.js API.
lint-staged - v10.0.0-beta.14

Published by okonet almost 5 years ago

10.0.0-beta.14 (2019-12-24)

Bug Fixes

  • error handling skips dropping backup stash after internal git errors (30b4809)
lint-staged - v10.0.0-beta.13

Published by okonet almost 5 years ago

10.0.0-beta.13 (2019-12-20)

Bug Fixes

  • handle git MERGE_* files separately; improve error handling (da22cf2)
lint-staged - v10.0.0-beta.12

Published by okonet almost 5 years ago

10.0.0-beta.12 (2019-12-18)

Features

  • support async function tasks (20d5c5d)
lint-staged - v10.0.0-beta.11

Published by okonet almost 5 years ago

10.0.0-beta.11 (2019-12-17)

Bug Fixes

  • fail with a message when backup stash is missing (1b64239)
lint-staged - v10.0.0-beta.10

Published by okonet almost 5 years ago

10.0.0-beta.10 (2019-12-17)

Bug Fixes

  • correctly recover when unstaged changes cannot be restored (d091f71)