Skip to content

Releases: lint-staged/lint-staged

v7.0.4

05 Apr 08:08
Compare
Choose a tag to compare

7.0.4 (2018-04-05)

Bug Fixes

  • Parse arguments with single quotes properly. Better tests. (29fc479), closes #419

v7.0.3

03 Apr 18:25
Compare
Choose a tag to compare

7.0.3 (2018-04-03)

Bug Fixes

  • Fix cli-command-parser to parse arguments for execa (b4fbc3b), closes #419
  • Use double quotes to make command work on Windows (06635c6)

v7.0.2

01 Apr 02:56
4d6f165
Compare
Choose a tag to compare

7.0.2 (2018-04-01)

Bug Fixes

  • Hide error message in a private field to avoid duplicate logs (#421) (4d6f165)

v7.0.1

30 Mar 21:36
Compare
Choose a tag to compare

7.0.1 (2018-03-30)

Bug Fixes

  • package: update staged-git-files to version 1.1.1 (31176c9)

v7.0.0

21 Feb 11:23
Compare
Choose a tag to compare

7.0.0 (2018-02-21)

Bug Fixes

  • package: Bump dependencies (267ff0f)

Code Refactoring

Features

Performance Improvements

BREAKING CHANGES

  • Requires Node.js v6 or later.

  • Remove implicit support for running npm scripts.

    Consider example lint-staged config:

    {
      "name": "My project",
      "version": "0.1.0",
      "scripts": {
        "my-custom-script": "linter --arg1 --arg2",
        "precommit": "lint-staged"
      },
      "lint-staged": {
        "*.js": ["my-custom-script", "git add"]
      }
    }

    The list of commands should be changed to the following:

      "*.js": ["npm run my-custom-script --", "git add"]
    
  • The following minimatch options are not supported in micromatch:

v6.1.1

16 Feb 16:33
Compare
Choose a tag to compare

6.1.1 (2018-02-16)

Bug Fixes

  • package: Update staged-git-files to version 1.0.0 (677e860)

v6.1.0

26 Jan 06:48
Compare
Choose a tag to compare

6.1.0 (2018-01-26)

Features

v6.0.1

19 Jan 10:49
Compare
Choose a tag to compare

6.0.1 (2018-01-19)

Bug Fixes

  • package: update cosmiconfig to version 4.0.0 (80596c3)

v6.0.0

01 Dec 04:29
8f214f0
Compare
Choose a tag to compare

6.0.0 (2017-12-01)

Features

  • Add debug mode, deprecate verbose option (#344) (8f214f0)

BREAKING CHANGES

  • verbose config option has been deprecated and is superseded
    by the command line option --debug.

v5.0.0

11 Nov 08:24
Compare
Choose a tag to compare

5.0.0 (2017-11-11)

Features

  • Remove gitDir option and resolve it automatically (#327) (0ed5135), closes #271

BREAKING CHANGES

  • gitDir option deprecated and will be ignored. Additionally, glob patterns for linters should not be relative to the git root directory.

Consider a project with the following file structure:

`-- packages
    |-- prj
    |   |-- package.json
    |   |-- src
    |   |   `-- index.js
    |   `-- yarn.lock
    `-- prj-2
        `-- file

With lint-staged@4.3.0, the config would need to be something like this:

gitDir: ../..
linters:
  packages/prj/src/*.js:
    - eslint --fix
    - git add

With lint-staged@5, this simplifies to:

linters:
  src/*.js:
    - eslint --fix
    - git add
diff view
@@ -1,5 +1,4 @@
-gitDir: ../..
 linters:
-  packages/prj/src/*.js:
+  src/*.js:
     - eslint --fix
     - git add