Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

lint-staged

lint-staged31.1mMIT15.4.3TypeScript support: included

Lint files staged by git

lint, git, staged, eslint, prettier, stylelint, code, quality, check, format, validate

readme

🚫💩 lint-staged

npm version


Run tasks like formatters and linters against staged git files and don't let :poop: slip into your code base!

npm install --save-dev lint-staged # requires further setup
$ git commit

✔ Backed up original state in git stash (5bda95f)
❯ Running tasks for staged files...
  ❯ packages/frontend/.lintstagedrc.json — 1 file
    ↓ *.js — no files [SKIPPED]
    ❯ *.{json,md} — 1 file
      ⠹ prettier --write
  ↓ packages/backend/.lintstagedrc.json — 2 files
    ❯ *.js — 2 files
      ⠼ eslint --fix
    ↓ *.{json,md} — no files [SKIPPED]
◼ Applying modifications from tasks...
◼ Cleaning up temporary files...
<summary>See asciinema video</summary>

asciicast

Why

Code quality tasks like formatters and linters make more sense when run before committing your code. By doing so you can ensure no errors go into the repository and enforce code style. But running a task on a whole project can be slow, and opinionated tasks such as linting can sometimes produce irrelevant results. Ultimately you only want to check files that will be committed.

This project contains a script that will run arbitrary shell tasks with a list of staged files as an argument, filtered by a specified glob pattern.

If you've written one, please submit a PR with the link to it!

Installation and setup

To install lint-staged in the recommended way, you need to:

  1. Install lint-staged itself:
    • npm install --save-dev lint-staged
  2. Set up the pre-commit git hook to run lint-staged
    • Husky is a popular choice for configuring git hooks
    • Read more about git hooks here
  3. Install some tools like ESLint or Prettier
  4. Configure lint-staged to run code checkers and other tasks:
    • for example: { "*.js": "eslint" } to run ESLint for all staged JS files
    • See Configuration for more info

Don't forget to commit changes to package.json and .husky to share this setup with your team!

Now change a few files, git add or git add --patch some of them to your commit, and try to git commit them.

See examples and configuration for more information.

[!CAUTION]
Lint-staged runs git operations affecting the files in your repository. By default lint-staged creates a git stash as a backup of the original state before running any configured tasks to help prevent data loss.

Changelog

See Releases.

Migration

v15

  • Since v15.0.0 lint-staged no longer supports Node.js 16. Please upgrade your Node.js version to at least 18.12.0.

v14

  • Since v14.0.0 lint-staged no longer supports Node.js 14. Please upgrade your Node.js version to at least 16.14.0.

v13

  • Since v13.0.0 lint-staged no longer supports Node.js 12. Please upgrade your Node.js version to at least 14.13.1, or 16.0.0 onward.
  • Version v13.3.0 was incorrectly released including code of version v14.0.0. This means the breaking changes of v14 are also included in v13.3.0, the last v13 version released

v12

  • Since v12.0.0 lint-staged is a pure ESM module, so make sure your Node.js version is at least 12.20.0, 14.13.1, or 16.0.0. Read more about ESM modules from the official Node.js Documentation site here.

v10

  • From v10.0.0 onwards any new modifications to originally staged files will be automatically added to the commit. If your task previously contained a git add step, please remove this. The automatic behaviour ensures there are less race-conditions, since trying to run multiple git operations at the same time usually results in an error.
  • From v10.0.0 onwards, lint-staged uses git stashes to improve speed and provide backups while running. Since git stashes require at least an initial commit, you shouldn't run lint-staged in an empty repo.
  • From v10.0.0 onwards, lint-staged requires Node.js version 10.13.0 or later.
  • From v10.0.0 onwards, lint-staged will abort the commit if linter tasks undo all staged changes. To allow creating an empty commit, please use the --allow-empty option.

Command line flags

❯ npx lint-staged --help
Usage: lint-staged [options]

Options:
  -V, --version                      output the version number
  --allow-empty                      allow empty commits when tasks revert all staged changes (default: false)
  -p, --concurrent <number|boolean>  the number of tasks to run concurrently, or false for serial (default: true)
  -c, --config [path]                path to configuration file, or - to read from stdin
  --cwd [path]                       run all tasks in specific directory, instead of the current
  -d, --debug                        print additional debug information (default: false)
  --diff [string]                    override the default "--staged" flag of "git diff" to get list of files.
                                     Implies "--no-stash".
  --diff-filter [string]             override the default "--diff-filter=ACMR" flag of "git diff" to get list of
                                     files
  --max-arg-length [number]          maximum length of the command-line argument string (default: 0)
  --no-stash                         disable the backup stash, and do not revert in case of errors. Implies
                                     "--no-hide-partially-staged".
  --no-hide-partially-staged         disable hiding unstaged changes from partially staged files
  -q, --quiet                        disable lint-staged’s own console output (default: false)
  -r, --relative                     pass relative filepaths to tasks (default: false)
  -x, --shell [path]                 skip parsing of tasks for better shell support (default: false)
  -v, --verbose                      show task output even when tasks succeed; by default only failed output is
                                     shown (default: false)
  -h, --help                         display help for command

Any lost modifications can be restored from a git stash:

  > git stash list
  stash@{0}: automatic lint-staged backup
  > git stash apply --index stash@{0}
  • --allow-empty: By default, when tasks undo all staged changes, lint-staged will exit with an error and abort the commit. Use this flag to allow creating empty git commits.
  • --concurrent [number|boolean]: Controls the concurrency of tasks being run by lint-staged. NOTE: This does NOT affect the concurrency of subtasks (they will always be run sequentially). Possible values are:
    • false: Run all tasks serially
    • true (default) : Infinite concurrency. Runs as many tasks in parallel as possible.
    • {number}: Run the specified number of tasks in parallel, where 1 is equivalent to false.
  • --config [path]: Manually specify a path to a config file or npm package name. Note: when used, lint-staged won't perform the config file search and will print an error if the specified file cannot be found. If '-' is provided as the filename then the config will be read from stdin, allowing piping in the config like cat my-config.json | npx lint-staged --config -.
  • --cwd [path]: By default tasks run in the current working directory. Use the --cwd some/directory to override this. The path can be absolute or relative to the current working directory.
  • --debug: Run in debug mode. When set, it does the following:
    • uses debug internally to log additional information about staged files, commands being executed, location of binaries, etc. Debug logs, which are automatically enabled by passing the flag, can also be enabled by setting the environment variable $DEBUG to lint-staged*.
    • uses verbose renderer for listr2; this causes serial, uncoloured output to the terminal, instead of the default (beautified, dynamic) output. (the verbose renderer can also be activated by setting the TERM=dumb or NODE_ENV=test environment variables)
  • --diff: By default tasks are filtered against all files staged in git, generated from git diff --staged. This option allows you to override the --staged flag with arbitrary revisions. For example to get a list of changed files between two branches, use --diff="branch1...branch2". You can also read more from about git diff and gitrevisions. This option also implies --no-stash.
  • --diff-filter: By default only files that are added, copied, modified, or renamed are included. Use this flag to override the default ACMR value with something else: added (A), copied (C), deleted (D), modified (M), renamed (R), type changed (T), unmerged (U), unknown (X), or pairing broken (B). See also the git diff docs for --diff-filter.
  • --max-arg-length: long commands (a lot of files) are automatically split into multiple chunks when it detects the current shell cannot handle them. Use this flag to override the maximum length of the generated command string.
  • --no-stash: By default a backup stash will be created before running the tasks, and all task modifications will be reverted in case of an error. This option will disable creating the stash, and instead leave all modifications in the index when aborting the commit. Can be re-enabled with --stash. This option also implies --no-hide-partially-staged.
  • --no-hide-partially-staged: By default, unstaged changes from partially staged files will be hidden. This option will disable this behavior and include all unstaged changes in partially staged files. Can be re-enabled with --hide-partially-staged
  • --quiet: Supress all CLI output, except from tasks.
  • --relative: Pass filepaths relative to process.cwd() (where lint-staged runs) to tasks. Default is false.
  • --shell: By default task commands will be parsed for speed and security. This has the side-effect that regular shell scripts might not work as expected. You can skip parsing of commands with this option. To use a specific shell, use a path like --shell "/bin/bash".
  • --verbose: Show task output even when tasks succeed. By default only failed output is shown.

Configuration

Lint-staged can be configured in many ways:

  • lint-staged object in your package.json, or package.yaml
  • .lintstagedrc file in JSON or YML format, or you can be explicit with the file extension:
    • .lintstagedrc.json
    • .lintstagedrc.yaml
    • .lintstagedrc.yml
  • .lintstagedrc.mjs or lint-staged.config.mjs file in ESM format
    • the default export value should be a configuration: export default { ... }
  • .lintstagedrc.cjs or lint-staged.config.cjs file in CommonJS format
    • the exports value should be a configuration: module.exports = { ... }
  • lint-staged.config.js or .lintstagedrc.js in either ESM or CommonJS format, depending on whether your project's package.json contains the "type": "module" option or not.
  • Pass a configuration file using the --config or -c flag

Configuration should be an object where each value is a command to run and its key is a glob pattern to use for this command. This package uses micromatch for glob patterns. JavaScript files can also export advanced configuration as a function. See Using JS configuration files for more info.

You can also place multiple configuration files in different directories inside a project. For a given staged file, the closest configuration file will always be used. See "How to use lint-staged in a multi-package monorepo?" for more info and an example.

package.json example:

{
  "lint-staged": {
    "*": "your-cmd"
  }
}

.lintstagedrc example

{
  "*": "your-cmd"
}

This config will execute your-cmd with the list of currently staged files passed as arguments.

So, considering you did git add file1.ext file2.ext, lint-staged will run the following command:

your-cmd file1.ext file2.ext

TypeScript

Lint-staged provides TypeScript types for the configuration and main Node.js API. You can use the JSDoc syntax in your JS configuration files:

/**
 * @filename: lint-staged.config.js
 * @type {import('lint-staged').Configuration}
 */
export default {
  '*': 'prettier --write',
}

It's also possible to use the .ts file extension for the configuration if your Node.js version supports it. The --experimental-strip-types flag was introduced in Node.js v22.6.0 and unflagged in v23.6.0, enabling Node.js to execute TypeScript files without additional configuration.

export NODE_OPTIONS="--experimental-strip-types"

npx lint-staged --config lint-staged.config.ts

Task concurrency

By default lint-staged will run configured tasks concurrently. This means that for every glob, all the commands will be started at the same time. With the following config, both eslint and prettier will run at the same time:

{
  "*.ts": "eslint",
  "*.md": "prettier --list-different"
}

This is typically not a problem since the globs do not overlap, and the commands do not make changes to the files, but only report possible errors (aborting the git commit). If you want to run multiple commands for the same set of files, you can use the array syntax to make sure commands are run in order. In the following example, prettier will run for both globs, and in addition eslint will run for *.ts files after it. Both sets of commands (for each glob) are still started at the same time (but do not overlap).

{
  "*.ts": ["prettier --list-different", "eslint"],
  "*.md": "prettier --list-different"
}

Pay extra attention when the configured globs overlap, and tasks make edits to files. For example, in this configuration prettier and eslint might try to make changes to the same *.ts file at the same time, causing a race condition:

{
  "*": "prettier --write",
  "*.ts": "eslint --fix"
}

You can solve it using the negation pattern and the array syntax:

{
  "!(*.ts)": "prettier --write",
  "*.ts": ["eslint --fix", "prettier --write"]
}

Another example in which tasks make edits to files and globs match multiple files but don't overlap:

{
  "*.css": ["stylelint --fix", "prettier --write"],
  "*.{js,jsx}": ["eslint --fix", "prettier --write"],
  "!(*.css|*.js|*.jsx)": ["prettier --write"]
}

Or, if necessary, you can limit the concurrency using --concurrent <number> or disable it entirely with --concurrent false.

Filtering files

Task commands work on a subset of all staged files, defined by a glob pattern. lint-staged uses micromatch for matching files with the following rules:

  • If the glob pattern contains no slashes (/), micromatch's matchBase option will be enabled, so globs match a file's basename regardless of directory:
    • "*.js" will match all JS files, like /test.js and /foo/bar/test.js
    • "!(*test).js" will match all JS files, except those ending in test.js, so foo.js but not foo.test.js
    • "!(*.css|*.js)" will match all files except CSS and JS files
  • If the glob pattern does contain a slash (/), it will match for paths as well:
    • "./*.js" will match all JS files in the git repo root, so /test.js but not /foo/bar/test.js
    • "foo/**/*.js" will match all JS files inside the /foo directory, so /foo/bar/test.js but not /test.js

When matching, lint-staged will do the following

  • Resolve the git root automatically, no configuration needed.
  • Pick the staged files which are present inside the project directory.
  • Filter them using the specified glob patterns.
  • Pass absolute paths to the tasks as arguments.

NOTE: lint-staged will pass absolute paths to the tasks to avoid any confusion in case they're executed in a different working directory (i.e. when your .git directory isn't the same as your package.json directory).

Also see How to use lint-staged in a multi-package monorepo?

Ignoring files

The concept of lint-staged is to run configured linter tasks (or other tasks) on files that are staged in git. lint-staged will always pass a list of all staged files to the task, and ignoring any files should be configured in the task itself.

Consider a project that uses prettier to keep code format consistent across all files. The project also stores minified 3rd-party vendor libraries in the vendor/ directory. To keep prettier from throwing errors on these files, the vendor directory should be added to prettier's ignore configuration, the .prettierignore file. Running npx prettier . will ignore the entire vendor directory, throwing no errors. When lint-staged is added to the project and configured to run prettier, all modified and staged files in the vendor directory will be ignored by prettier, even though it receives them as input.

In advanced scenarios, where it is impossible to configure the linter task itself to ignore files, but some staged files should still be ignored by lint-staged, it is possible to filter filepaths before passing them to tasks by using the function syntax. See Example: Ignore files from match.

What commands are supported?

Supported are any executables installed locally or globally via npm as well as any executable from your $PATH.

Using globally installed scripts is discouraged, since lint-staged may not work for someone who doesn't have it installed.

lint-staged uses execa to locate locally installed scripts. So in your .lintstagedrc you can write:

{
  "*.js": "eslint --fix"
}

This will result in lint-staged running eslint --fix file-1.js file-2.js, when you have staged files file-1.js, file-2.js and README.md.

Pass arguments to your commands separated by space as you would do in the shell. See examples below.

Running multiple commands in a sequence

You can run multiple commands in a sequence on every glob. To do so, pass an array of commands instead of a single one. This is useful for running autoformatting tools like eslint --fix or stylefmt but can be used for any arbitrary sequences.

For example:

{
  "*.js": ["eslint", "prettier --write"]
}

going to execute eslint and if it exits with 0 code, it will execute prettier --write on all staged *.js files.

This will result in lint-staged running eslint file-1.js file-2.js, when you have staged files file-1.js, file-2.js and README.md, and if it passes, prettier --write file-1.js file-2.js.

Using JS configuration files

Writing the configuration file in JavaScript is the most powerful way to configure lint-staged (lint-staged.config.js, similar, or passed via --config). From the configuration file, you can export either a single function or an object.

If the exports value is a function, it will receive an array of all staged filenames. You can then build your own matchers for the files and return a command string or an array of command strings. These strings are considered complete and should include the filename arguments, if wanted.

If the exports value is an object, its keys should be glob matches (like in the normal non-js config format). The values can either be like in the normal config or individual functions like described above. Instead of receiving all matched files, the functions in the exported object will only receive the staged files matching the corresponding glob key.

To summarize, by default lint-staged automatically adds the list of matched staged files to your command, but when building the command using JS functions it is expected to do this manually. For example:

export default {
  '*.js': (stagedFiles) => [`eslint .`, `prettier --write ${stagedFiles.join(' ')}`],
}

This will result in lint-staged first running eslint . (matching all files), and if it passes, prettier --write file-1.js file-2.js, when you have staged files file-1.js, file-2.js and README.md.

Function signature

The function can also be async:

(filenames: string[]) => string | string[] | Promise<string | string[]>

Example: Export a function to build your own matchers

<summary>Click to expand</summary>
// lint-staged.config.js
import micromatch from 'micromatch'

export default (allStagedFiles) => {
  const shFiles = micromatch(allStagedFiles, ['**/src/**/*.sh'])
  if (shFiles.length) {
    return `printf '%s\n' "Script files aren't allowed in src directory" >&2`
  }
  const codeFiles = micromatch(allStagedFiles, ['**/*.js', '**/*.ts'])
  const docFiles = micromatch(allStagedFiles, ['**/*.md'])
  return [`eslint ${codeFiles.join(' ')}`, `mdl ${docFiles.join(' ')}`]
}

Example: Wrap filenames in single quotes and run once per file

<summary>Click to expand</summary>
// .lintstagedrc.js
export default {
  '**/*.js?(x)': (filenames) => filenames.map((filename) => `prettier --write '${filename}'`),
}

Example: Run tsc on changes to TypeScript files, but do not pass any filename arguments

<summary>Click to expand</summary>
// lint-staged.config.js
export default {
  '**/*.ts?(x)': () => 'tsc -p tsconfig.json --noEmit',
}

Example: Run ESLint on entire repo if more than 10 staged files

<summary>Click to expand</summary>
// .lintstagedrc.js
export default {
  '**/*.js?(x)': (filenames) =>
    filenames.length > 10 ? 'eslint .' : `eslint ${filenames.join(' ')}`,
}

Example: Use your own globs

<summary>Click to expand</summary>

It's better to use the function-based configuration (seen above), if your use case is this.

// lint-staged.config.js
import micromatch from 'micromatch'

export default {
  '*': (allFiles) => {
    const codeFiles = micromatch(allFiles, ['**/*.js', '**/*.ts'])
    const docFiles = micromatch(allFiles, ['**/*.md'])
    return [`eslint ${codeFiles.join(' ')}`, `mdl ${docFiles.join(' ')}`]
  },
}

Example: Ignore files from match

<summary>Click to expand</summary>

If for some reason you want to ignore files from the glob match, you can use micromatch.not():

// lint-staged.config.js
import micromatch from 'micromatch'

export default {
  '*.js': (files) => {
    // from `files` filter those _NOT_ matching `*test.js`
    const match = micromatch.not(files, '*test.js')
    return `eslint ${match.join(' ')}`
  },
}

Please note that for most cases, globs can achieve the same effect. For the above example, a matching glob would be !(*test).js.

Example: Use relative paths for commands

<summary>Click to expand</summary>
import path from 'path'

export default {
  '*.ts': (absolutePaths) => {
    const cwd = process.cwd()
    const relativePaths = absolutePaths.map((file) => path.relative(cwd, file))
    return `ng lint myProjectName --files ${relativePaths.join(' ')}`
  },
}

Reformatting the code

Tools like Prettier, ESLint/TSLint, or stylelint can reformat your code according to an appropriate config by running prettier --write/eslint --fix/tslint --fix/stylelint --fix. Lint-staged will automatically add any modifications to the commit as long as there are no errors.

{
  "*.js": "prettier --write"
}

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.

Examples

All examples assume you've already set up lint-staged in the package.json file and husky in its own config file.

{
  "name": "My project",
  "version": "0.1.0",
  "scripts": {
    "my-custom-script": "linter --arg1 --arg2"
  },
  "lint-staged": {}
}

In .husky/pre-commit

# .husky/pre-commit

npx lint-staged

Note: we don't pass a path as an argument for the runners. This is important since lint-staged will do this for you.

ESLint with default parameters for *.js and *.jsx running as a pre-commit hook

<summary>Click to expand</summary>
{
  "*.{js,jsx}": "eslint"
}

Automatically fix code style with --fix and add to commit

<summary>Click to expand</summary>
{
  "*.js": "eslint --fix"
}

This will run eslint --fix and automatically add changes to the commit.

Reuse npm script

<summary>Click to expand</summary>

If you wish to reuse a npm script defined in your package.json:

{
  "*.js": "npm run my-custom-script --"
}

The following is equivalent:

{
  "*.js": "linter --arg1 --arg2"
}

Use environment variables with task commands

<summary>Click to expand</summary>

Task commands do not support the shell convention of expanding environment variables. To enable the convention yourself, use a tool like cross-env.

For example, here is jest running on all .js files with the NODE_ENV variable being set to "test":

{
  "*.js": ["cross-env NODE_ENV=test jest --bail --findRelatedTests"]
}

Automatically fix code style with prettier for any format Prettier supports

<summary>Click to expand</summary>
{
  "*": "prettier --ignore-unknown --write"
}

Automatically fix code style with prettier for JavaScript, TypeScript, Markdown, HTML, or CSS

<summary>Click to expand</summary>
{
  "*.{js,jsx,ts,tsx,md,html,css}": "prettier --write"
}

Stylelint for CSS with defaults and for SCSS with SCSS syntax

<summary>Click to expand</summary>
{
  "*.css": "stylelint",
  "*.scss": "stylelint --syntax=scss"
}

Run PostCSS sorting and Stylelint to check

<summary>Click to expand</summary>
{
  "*.scss": ["postcss --config path/to/your/config --replace", "stylelint"]
}

Minify the images

<summary>Click to expand</summary>
{
  "*.{png,jpeg,jpg,gif,svg}": "imagemin-lint-staged"
}
<summary>More about imagemin-lint-staged</summary>

imagemin-lint-staged is a CLI tool designed for lint-staged usage with sensible defaults.

See more on this blog post for benefits of this approach.

Typecheck your staged files with flow

<summary>Click to expand</summary>
{
  "*.{js,jsx}": "flow focus-check"
}

Integrate with Next.js

<summary>Click to expand</summary>
// .lintstagedrc.js
// See https://nextjs.org/docs/basic-features/eslint#lint-staged for details

const path = require('path')

const buildEslintCommand = (filenames) =>
  `next lint --fix --file ${filenames.map((f) => path.relative(process.cwd(), f)).join(' --file ')}`

module.exports = {
  '*.{js,jsx,ts,tsx}': [buildEslintCommand],
}

Frequently Asked Questions

The output of commit hook looks weird (no colors, duplicate lines, verbose output on Windows, …)

<summary>Click to expand</summary>

Git 2.36.0 introduced a change to hooks where they were no longer run in the original TTY. This was fixed in 2.37.0:

https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes/2.37.0.txt

  • In Git 2.36 we revamped the way how hooks are invoked. One change that is end-user visible is that the output of a hook is no longer directly connected to the standard output of "git" that spawns the hook, which was noticed post release. This is getting corrected. (merge a082345372 ab/hooks-regression-fix later to maint).

If updating Git doesn't help, you can try to manually redirect the output in your Git hook; for example:

# .husky/pre-commit

if sh -c ": >/dev/tty" >/dev/null 2>/dev/null; then exec >/dev/tty 2>&1; fi

npx lint-staged

Source: https://github.com/typicode/husky/issues/968#issuecomment-1176848345

Can I use lint-staged via node?

<summary>Click to expand</summary>

Yes!

import lintStaged from 'lint-staged'

try {
  const success = await lintStaged()
  console.log(success ? 'Linting was successful!' : 'Linting failed!')
} catch (e) {
  // Failed to load configuration
  console.error(e)
}

Parameters to lintStaged are equivalent to their CLI counterparts:

const success = await lintStaged({
  allowEmpty: false,
  concurrent: true,
  configPath: './path/to/configuration/file',
  cwd: process.cwd(),
  debug: false,
  maxArgLength: null,
  quiet: false,
  relative: false,
  shell: false,
  stash: true,
  verbose: false,
})

You can also pass config directly with config option:

const success = await lintStaged({
  allowEmpty: false,
  concurrent: true,
  config: { '*.js': 'eslint --fix' },
  cwd: process.cwd(),
  debug: false,
  maxArgLength: null,
  quiet: false,
  relative: false,
  shell: false,
  stash: true,
  verbose: false,
})

The maxArgLength option configures chunking of tasks into multiple parts that are run one after the other. This is to avoid issues on Windows platforms where the maximum length of the command line argument string is limited to 8192 characters. Lint-staged might generate a very long argument string when there are many staged files. This option is set automatically from the cli, but not via the Node.js API by default.

Using with JetBrains IDEs (WebStorm, PyCharm, IntelliJ IDEA, RubyMine, etc.)

<summary>Click to expand</summary>

Update: The latest version of JetBrains IDEs now support running hooks as you would expect.

When using the IDE's GUI to commit changes with the precommit hook, you might see inconsistencies in the IDE and command line. This is known issue at JetBrains so if you want this fixed, please vote for it on YouTrack.

Until the issue is resolved in the IDE, you can use the following config to work around it:

husky v1.x

{
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged",
      "post-commit": "git update-index --again"
    }
  }
}

husky v0.x

{
  "scripts": {
    "precommit": "lint-staged",
    "postcommit": "git update-index --again"
  }
}

Thanks to this comment for the fix!

How to use lint-staged in a multi-package monorepo?

<summary>Click to expand</summary>

Install lint-staged on the monorepo root level, and add separate configuration files in each package. When running, lint-staged will always use the configuration closest to a staged file, so having separate configuration files makes sure tasks do not "leak" into other packages.

For example, in a monorepo with packages/frontend/.lintstagedrc.json and packages/backend/.lintstagedrc.json, a staged file inside packages/frontend/ will only match that configuration, and not the one in packages/backend/.

Note: lint-staged discovers the closest configuration to each staged file, even if that configuration doesn't include any matching globs. Given these example configurations:

// ./.lintstagedrc.json
{ "*.md": "prettier --write" }
// ./packages/frontend/.lintstagedrc.json
{ "*.js": "eslint --fix" }

When committing ./packages/frontend/README.md, it will not run prettier, because the configuration in the frontend/ directory is closer to the file and doesn't include it. You should treat all lint-staged configuration files as isolated and separated from each other. You can always use JS files to "extend" configurations, for example:

import baseConfig from '../.lintstagedrc.js'

export default {
  ...baseConfig,
  '*.js': 'eslint --fix',
}

To support backwards-compatibility, monorepo features require multiple lint-staged configuration files present in the git repo. If you still want to run lint-staged in only one of the packages in a monorepo, you can either add an "empty" lint-staged configuration to the root of the repo (so that there's two configs in total), or alternatively run lint-staged with the --cwd option pointing to your package directory (for example, lint-staged --cwd packages/frontend).

Can I lint files outside of the current project folder?

<summary>Click to expand</summary>

tl;dr: Yes, but the pattern should start with ../.

By default, lint-staged executes tasks only on the files present inside the project folder(where lint-staged is installed and run from). So this question is relevant only when the project folder is a child folder inside the git repo. In certain project setups, it might be desirable to bypass this restriction. See #425, #487 for more context.

lint-staged provides an escape hatch for the same(>= v7.3.0). For patterns that start with ../, all the staged files are allowed to match against the pattern. Note that patterns like *.js, **/*.js will still only match the project files and not any of the files in parent or sibling directories.

Example repo: sudo-suhas/lint-staged-django-react-demo.

Can I run lint-staged in CI, or when there are no staged files?

<summary>Click to expand</summary>

Lint-staged will by default run against files staged in git, and should be run during the git pre-commit hook, for example. It's also possible to override this default behaviour and run against files in a specific diff, for example all changed files between two different branches. If you want to run lint-staged in the CI, maybe you can set it up to compare the branch in a Pull Request/Merge Request to the target branch.

Try out the git diff command until you are satisfied with the result, for example:

git diff --diff-filter=ACMR --name-only master...my-branch

This will print a list of added, changed, modified, and renamed files between master and my-branch.

You can then run lint-staged against the same files with:

npx lint-staged --diff="master...my-branch"

Can I use lint-staged with ng lint

<summary>Click to expand</summary>

You should not use ng lint through lint-staged, because it's designed to lint an entire project. Instead, you can add ng lint to your git pre-commit hook the same way as you would run lint-staged.

See issue !951 for more details and possible workarounds.

How can I ignore files from .eslintignore?

<summary>Click to expand</summary>

ESLint throws out warning File ignored because of a matching ignore pattern. Use "--no-ignore" to override warnings that breaks the linting process ( if you used --max-warnings=0 which is recommended ).

ESLint < 7

<summary>Click to expand</summary>

Based on the discussion from this issue, it was decided that using the outlined scriptis the best route to fix this.

So you can setup a .lintstagedrc.js config file to do this:

import { CLIEngine } from 'eslint'

export default {
  '*.js': (files) => {
    const cli = new CLIEngine({})
    return 'eslint --max-warnings=0 ' + files.filter((file) => !cli.isPathIgnored(file)).join(' ')
  },
}

ESLint >= 7

<summary>Click to expand</summary>

In versions of ESLint > 7, isPathIgnored is an async function and now returns a promise. The code below can be used to reinstate the above functionality.

Since 10.5.3, any errors due to a bad ESLint config will come through to the console.

import { ESLint } from 'eslint'

const removeIgnoredFiles = async (files) => {
  const eslint = new ESLint()
  const isIgnored = await Promise.all(
    files.map((file) => {
      return eslint.isPathIgnored(file)
    })
  )
  const filteredFiles = files.filter((_, i) => !isIgnored[i])
  return filteredFiles.join(' ')
}

export default {
  '**/*.{ts,tsx,js,jsx}': async (files) => {
    const filesToLint = await removeIgnoredFiles(files)
    return [`eslint --max-warnings=0 ${filesToLint}`]
  },
}

ESLint >= 8.51.0 && Flat ESLint config

<summary>Click to expand</summary>

ESLint v8.51.0 introduced --no-warn-ignored CLI flag. It suppresses the warning File ignored because of a matching ignore pattern. Use "--no-ignore" to override warning, so manually ignoring files via eslint.isPathIgnored is no longer necessary.

{
  "*.js": "eslint --max-warnings=0 --no-warn-ignored"
}

NOTE: --no-warn-ignored flag is only available when Flat ESLint config is used.

changelog

lint-staged

15.4.3

Patch Changes

  • #1512 cbfed1d Thanks @tarik02! - Adjust TypeScript types for the default export so that it can be used as a value without error TS2693.

15.4.2

Patch Changes

  • #1509 8827ebf Thanks @iiroj! - Change lint-staged's dependencies to use caret (^) ranges instead of tilde (~). This makes it easier for package managers to perform dependency management when minor-level updates are also permitted instead of just patch-level.

15.4.1

Patch Changes

  • #1504 1c7a45e Thanks @iiroj! - Default TypeScript config filenames match JS equivalents.

  • #1504 9cc18c9 Thanks @iiroj! - Add missing conditional exports syntax for TypeScript types.

15.4.0

Minor Changes

  • #1500 a8ec1dd Thanks @iiroj! - Lint-staged now provides TypeScript types for the configuration and main Node.js API. You can use the JSDoc syntax in your JS configuration files:

    /**
     * @filename: lint-staged.config.js
     * @type {import('lint-staged').Configuration}
     */
    export default {
      '*': 'prettier --write',
    }

    It's also possible to use the .ts file extension for the configuration if your Node.js version supports it. The --experimental-strip-types flag was introduced in Node.js v22.6.0 and unflagged in v23.6.0, enabling Node.js to execute TypeScript files without additional configuration.

    export NODE_OPTIONS="--experimental-strip-types"
    
    npx lint-staged --config lint-staged.config.ts

Patch Changes

  • #1501 9b79364 Thanks @iiroj! - Handle possible failures when logging user shell for debug info.

15.3.0

Minor Changes

  • #1495 e69da9e Thanks @iiroj! - Added more info to the debug logs so that "environment" info doesn't need to be added separately to GitHub issues.

  • #1493 fa0fe98 Thanks @iiroj! - Added more help messages around the automatic git stash that lint-staged creates as a backup (by default). The console output also displays the short git hash of the stash so that it's easier to recover lost files in case some fatal errors are encountered, or the process is killed before completing.

    For example:

    % npx lint-staged
    ✔ Backed up original state in git stash (20addf8)
    ✔ Running tasks for staged files...
    ✔ Applying modifications from tasks...
    ✔ Cleaning up temporary files...

    where the backup can be seen with git show 20addf8, or git stash list:

    % git stash list
    stash@{0}: lint-staged automatic backup (20addf8)

15.2.11

Patch Changes

  • #1484 bcfe309 Thanks @wormsik! - Escape paths containing spaces when using the "shell" option.

  • #1487 7dd8caa Thanks @iiroj! - Do not treat submodule root paths as "staged files". This caused lint-staged to fail to a Git error when only updating the revision of a submodule.

15.2.10

Patch Changes

15.2.9

Patch Changes

  • #1463 b69ce2d Thanks @iiroj! - Set the maximum number of event listeners to the number of tasks. This should silence the console warning MaxListenersExceededWarning: Possible EventEmitter memory leak detected.

15.2.8

Patch Changes

  • f0480f0 Thanks @iiroj! - In the previous version the native git rev-parse --show-toplevel command was taken into use for resolving the current git repo root. This version switched the --show-toplevel flag with --show-cdup, because on Git installed via MSYS2 the former was returning absolute paths that do not work with Node.js child_process. The new flag returns a path relative to the working directory, avoiding the issue.

    The GitHub Actions workflow has been updated to install Git via MSYS2, to ensure better future compatibility; using the default Git binary in the GitHub Actions runner was working correctly even with MSYS2.

15.2.7

Patch Changes

  • #1440 a51be80 Thanks @iiroj! - In the previous version the native git rev-parse --show-toplevel command was taken into use for resolving the current git repo root. This version drops the --path-format=absolute option to support earlier git versions since it's also the default behavior. If you are still having trouble, please try upgrading git to the latest version.

15.2.6

Patch Changes

  • #1433 119adb2 Thanks @iiroj! - Use native "git rev-parse" commands to determine git repo root directory and the .git config directory, instead of using custom logic. This hopefully makes path resolution more robust on non-POSIX systems.

15.2.5

Patch Changes

  • #1424 31a1f95 Thanks @iiroj! - Allow approximately equivalent versions of direct dependencies by using the "~" character in the version ranges. This means a more recent patch version of a dependency is allowed if available.

  • #1423 91abea0 Thanks @iiroj! - Improve error logging when failing to read or parse a configuration file

  • #1424 ee43f15 Thanks @iiroj! - Upgrade micromatch@4.0.7

15.2.4

Patch Changes

  • 4f4537a Thanks @iiroj! - Fix release issue with previous version; update dependencies

15.2.3

Patch Changes

15.2.2

Patch Changes

  • #1391 fdcdad4 Thanks @iiroj! - Lint-staged no longer tries to load configuration from files that are not checked out. This might happen when using sparse-checkout.

15.2.1

Patch Changes

  • #1387 e4023f6 Thanks @iiroj! - Ignore stdin of spawned commands so that they don't get stuck waiting. Until now, lint-staged has used the default settings to spawn linter commands. This means the stdin of the spawned commands has accepted input, and essentially gotten stuck waiting. Now the stdin is ignored and commands will no longer get stuck. If you relied on this behavior, please open a new issue and describe how; the behavior has not been intended.

15.2.0

Minor Changes

  • #1371 f3378be Thanks @iiroj! - Using the --no-stash flag no longer discards all unstaged changes to partially staged files, which resulted in inadvertent data loss. This fix is available with a new flag --no-hide-partially-staged that is automatically enabled when --no-stash is used.

Patch Changes

  • #1362 17bc480 Thanks @antonk52! - update lilconfig@3.0.0

  • #1368 7c55ca9 Thanks @iiroj! - Update most dependencies

  • #1368 777d4e9 Thanks @iiroj! - To improve performance, only use lilconfig when searching for config files outside the git repo. In the regular case, lint-staged finds the config files from the Git index and loads them directly.

  • #1373 85eb0dd Thanks @iiroj! - When determining git directory, use fs.realpath() only for symlinks. It looks like fs.realpath() changes some Windows mapped network filepaths unexpectedly, causing issues.

15.1.0

Minor Changes

  • #1344 0423311 Thanks @danielbayley! - Add support for loading configuration from package.yaml and package.yml files, supported by pnpm.

Patch Changes

15.0.2

Patch Changes

15.0.1

Patch Changes

  • #1217 d2e6f8b Thanks @louneskmt! - Previously it was possible for a function task to mutate the list of staged files passed to the function, and accidentally affect the generation of other tasks. This is now fixed by passing a copy of the original file list instead.

15.0.0

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.

v14.0.1 - 21 Aug 2023

Bug Fixes

  • fix reading config from stdin, introduced in v14.0.0 (#1317) (fc3bfea)

v14.0.0 - 13 Aug 2023

Features

BREAKING CHANGES

  • Please upgrade your Node.js version to at least 16.14.0.

v13.3.0 - 13 Aug 2023

Bug Fixes

  • dependencies: update most dependencies (7443870)
  • detect duplicate redundant braces in pattern (d895aa8)

Features

v13.2.3 - 28 Jun 2023

Bug Fixes

  • the --diff option implies --no-stash (66a716d)

v13.2.2 - 26 Apr 2023

Bug Fixes

v13.2.1 - 07 Apr 2023

Bug Fixes

  • ignore "package.json" as config file when it's invalid JSON (#1281) (e7ed6f7)

v13.2.0 - 10 Mar 2023

Bug Fixes

  • dependencies: replace colorette with chalk for better color support detection (f598725)
  • use index-based stash references for improved MSYS2 compatibility (#1270) (60fcd99)

Features

v13.1.2 - 13 Feb 2023

Bug Fixes

  • disable stash by default when using diff option (#1259) (142c6f2)

v13.1.1 - 07 Feb 2023

Bug Fixes

  • allow re-enabling --stash when using the --diff option (99390c3)

v13.1.0 - 04 Dec 2022

Features

  • expose cli entrance from "lint-staged/bin" (#1237) (eabf1d2)

v13.0.4 - 25 Nov 2022

Bug Fixes

  • deps: update all dependencies (336f3b5)
  • deps: update all dependencies (ec995e5)

v13.0.3 - 24 Jun 2022

Bug Fixes

  • correctly handle git stash when using MSYS2 (#1178) (0d627a5)

v13.0.2 - 16 Jun 2022

Bug Fixes

  • use new --diff and --diff-filter options when checking task modifications (1a5a66a)

v13.0.1 - 08 Jun 2022

Bug Fixes

  • correct spelling of "0 files" (f27f1d4)
  • suppress error from process.kill when killing tasks on failure (f2c6bdd)
  • deps: update pidtree@^0.6.0 to fix screen size error in WSL (1a77e42)
  • ignore "No matching pid found" error (cb8a432)
  • prevent possible race condition when killing tasks on failure (bc92aff)

Performance Improvements

  • use EventsEmitter instead of setInterval for killing tasks on failure (c508b46)

v13.0.0 - 01 Jun 2022

Bug Fixes

  • deps: update execa@^6.1.0 (659c85c)
  • deps: update yaml@^2.1.1 (2750a3d)

Features

  • remove support for Node.js 12 (5fb6df9)

BREAKING CHANGES

  • lint-staged will no longer support Node.js 12, which is EOL since 30 April 2022

v12.5.0 - 31 May 2022

Bug Fixes

  • include all files when using --config <path> (641d1c2)
  • skip backup stash when using the --diff option (d4da24d)

Features

  • add --diff-filter option for overriding list of (staged) files (753ef72)
  • add --diff option for overriding list of (staged) files (35fcce9)

v12.4.3 - 30 May 2022

Bug Fixes

v12.4.2 - 24 May 2022

Bug Fixes

  • correctly handle --max-arg-length cli option (1db5f26)

v12.4.1 - 26 Apr 2022

Bug Fixes

  • correctly handle symlinked config files (b3f63ec)

v12.4.0 - 20 Apr 2022

Bug Fixes

  • handle empty input by returning empty array from parseGitZOutput (a118817)
  • limit configuration discovery to cwd (d8fdf1d)
  • restore functionality of parent globs for a single configuration file (877ab4c)

Features

  • expose --max-arg-length cli option (e8291b0)

v12.3.8 - 15 Apr 2022

Bug Fixes

  • avoid passing unexpected arguments from forEach to process.kill() (1b1f0e4)
  • clear execution interruption interval on first catch (46952cb)

v12.3.7 - 17 Mar 2022

Bug Fixes

  • improve renderer logic for --silent and FORCE_COLOR settings (d327873)

v12.3.6 - 16 Mar 2022

Bug Fixes

v12.3.5 - 05 Mar 2022

Bug Fixes

  • search all configs regardless of staged files (4b605cd)

v12.3.4 - 13 Feb 2022

Bug Fixes

v12.3.3 - 01 Feb 2022

Bug Fixes

  • use config directory as cwd, when multiple configs present (#1091) (9a14e92)

v12.3.2 - 26 Jan 2022

Bug Fixes

  • handle symlinked .git directories (3a897ff)

v12.3.1 - 23 Jan 2022

Bug Fixes

  • deps: update dependencies (f190fc3)

v12.3.0 - 23 Jan 2022

Features

  • add --cwd option for overriding task directory (62b5b83)

v12.2.2 - 20 Jan 2022

Bug Fixes

  • always search config from cwd first (4afcda5)

v12.2.1 - 19 Jan 2022

Bug Fixes

  • only throw if no configurations were found (36b9546)

v12.2.0 - 18 Jan 2022

Bug Fixes

  • make console task titles more explicit (1c94c27)

Features

  • support multiple configuration files (90d1035)

v12.1.7 - 07 Jan 2022

Bug Fixes

  • resolve config modules with ESM createRequire (#1082) (f9f6538)

v12.1.6 - 07 Jan 2022

Bug Fixes

  • always run non-git tasks in the current working directory (893f3d7)

v12.1.5 - 02 Jan 2022

Bug Fixes

  • search configuration starting from explicit cwd option (c7ea359)
  • using --debug option enables debug mode (5cceeb6)

v12.1.4 - 24 Dec 2021

Bug Fixes

  • use cwd option when resolving git repo root (#1075) (a230b03)

v12.1.3 - 18 Dec 2021

Bug Fixes

  • deps: remove enquirer because it's now optional by listr2 (96a1a29)

v12.1.2 - 22 Nov 2021

Bug Fixes

  • fix Windows JS config loading by using file:// URLs (f20ddf9)
  • fix YAML config loading (0082ec2)
  • improve error logging in loadConfig (e7b6412)

v12.1.1 - 21 Nov 2021

Bug Fixes

  • await for dynamic import promise when loading JS config (e96b6d9)

v12.1.0 - 21 Nov 2021

Features

  • allow loading .js config file with ESM syntax (410c3ba)
  • replace cosmiconfig with lilconfig + yaml to reduce dependencies (e7f9fa0)
  • support loading .mjs config (8d3b176)

v12.0.3 - 18 Nov 2021

Bug Fixes

v12.0.2 - 14 Nov 2021

Bug Fixes

v12.0.1 - 13 Nov 2021

Bug Fixes

  • read version number from lint-staged package.json instead of package.json in cwd (#1043) (#1044) (9f9213d)

v12.0.0 - 13 Nov 2021

Features

BREAKING CHANGES

  • lint-staged is now a pure ESM module, and thus requires Node.js version ^12.20.0 || ^14.13.1 || >=16.0.0.

To update your Node.js integration, please use:

// const lintStaged = require('lint-staged')
import lintStaged from 'lint-staged'

v11.3.0-beta.2 - 30 Oct 2021

Bug Fixes

Performance Improvements

v11.2.6 - 26 Oct 2021

Bug Fixes

v11.2.5 - 26 Oct 2021

Bug Fixes

  • correctly import js-yaml to fix yaml config loading (#1033) (612d806)

v11.2.4 - 23 Oct 2021

Performance Improvements

v11.2.3 - 10 Oct 2021

Bug Fixes

  • unbreak windows by correctly normalizing cwd (#1029) (f861d8d)

v11.2.2 - 09 Oct 2021

Bug Fixes

v11.2.1 - 09 Oct 2021

Bug Fixes

v11.3.0-beta.1 - 04 Oct 2021

Bug Fixes

  • add --no-stash as hidden option for backwards-compatibility (73db492)
  • do not apply empty patch (a7c1c0b)
  • do not use fs/promises for Node.js 12 compatibility (c99a6a1)
  • restore original state when preventing an empty commit (f7ef8ef)
  • restore previous order of jobs (ba62b22)

Features

  • do not use a git stash for better performance (ff0cc0d)

Performance Improvements

  • further optimize by reusing previous job (3066a35)
  • re-use figures from listr2 and remove log-symbols (5240c26)
  • replace chalk with colorette and supports-color (4de4cda)

v11.2.0 - 04 Oct 2021

Features

v11.2.0-beta.1 - 02 Oct 2021

Bug Fixes

  • add --no-stash as hidden option for backwards-compatibility (73db492)
  • do not apply empty patch (a7c1c0b)
  • do not use fs/promises for Node.js 12 compatibility (c99a6a1)
  • restore original state when preventing an empty commit (f7ef8ef)
  • restore previous order of jobs (ba62b22)

Features

  • do not use a git stash for better performance (ff0cc0d)

Performance Improvements

  • further optimize by reusing previous job (3066a35)
  • re-use figures from listr2 and remove log-symbols (5240c26)
  • replace chalk with colorette and supports-color (4de4cda)

v11.1.2 - 06 Aug 2021

Bug Fixes

  • try to automatically fix and warn about invalid brace patterns (#992) (b3d97cf)

v11.1.1 - 24 Jul 2021

Bug Fixes

  • the shell option value should be optional instead of required (#996) (f7302f4), closes #994

v11.1.0 - 22 Jul 2021

Features

  • allow a path to be supplied to the --shell option (#994) (fea8033)

v11.0.1 - 13 Jul 2021

Bug Fixes

  • do not swallow already detected deprecated usage by last task (#991) (7734156)

v11.0.0 - 07 May 2021

Bug Fixes

Features

  • bump Node.js version requirement to 12.13.0 (852aa6e)

BREAKING CHANGES

  • Node.js 12 LTS 'Erbium' is now the minimum required version

v10.5.4 - 05 Feb 2021

Bug Fixes

  • concurrent option is not working correctly (#950) (4383815)

v10.5.3 - 04 Dec 2020

Bug Fixes

  • better logging for errors in js config files (#935) (292e882)

v10.5.2 - 24 Nov 2020

Bug Fixes

  • use bibliography-style links in related posts section of readme (#932) (0ff2917), closes #931

v10.5.1 - 31 Oct 2020

Bug Fixes

v10.5.0 - 26 Oct 2020

Features

v10.4.2 - 17 Oct 2020

Bug Fixes

  • update docs on supported config file extensions (#917) (78782f9)

v10.4.1 - 16 Oct 2020

Bug Fixes

v10.4.0 - 16 Sep 2020

Features

  • Add ability to use function as config (#913) (67a4d06)

v10.3.0 - 03 Sep 2020

Features

  • Add support for adding lint-staged using pre-commit.com (#910) (d404d7d)

v10.2.13 - 25 Aug 2020

Bug Fixes

v10.2.12 - 25 Aug 2020

Bug Fixes

  • always use the default short diff format for submodules #902 (c7923ad)
  • ensure supportsColor.level exists before stringifying it (aa9898e)

v10.2.11 - 17 Jun 2020

Bug Fixes

  • run all git commands with submodule.recurse=false (#888) (86c9ed2)

v10.2.10 - 12 Jun 2020

Bug Fixes

  • Git directory is not correctly resolved if GIT_WORK_TREE is set to relative path (#887) (a1904ec)

v10.2.9 - 04 Jun 2020

Bug Fixes

v10.2.8 - 03 Jun 2020

Bug Fixes

  • canceling lint-staged via SIGINT restores state and cleans up (#881) (b078324)

v10.2.7 - 29 May 2020

Bug Fixes

  • use machine output to avoid escaped and quoted filenames (ea80a3d)

v10.2.6 - 22 May 2020

Bug Fixes

  • remove nanoid devDependency to remove ExperimentalWarning (#874) (979da5d)

v10.2.5 - 22 May 2020

Bug Fixes

  • truncate command title to stdout width (#865) (b8e1a4a)

v10.2.4 - 18 May 2020

Bug Fixes

  • node-13 deps issue with listr2 and uuid (#868) (93bc942)

v10.2.3 - 18 May 2020

Bug Fixes

v10.2.2 - 01 May 2020

Bug Fixes

  • chunkFiles chunks normalized files even when maxArgLength is set (#858) (fc72170)

v10.2.1 - 30 Apr 2020

Bug Fixes

  • normalize chunked paths even when maxArgLength is not set (ba67f48)
  • resolve matched files to cwd instead of gitDir before adding (defe045)

v10.2.0 - 28 Apr 2020

Bug Fixes

  • all lint-staged output respects the quiet option (aba3421)
  • do not show incorrect error when verbose and no output (b8df31a)
  • log task output after running listr to keep everything (d69c65b)
  • use test renderer during tests and when TERM=dumb (16848d8)

Features

  • add --verbose to show output even when tasks succeed (85de3a3)
  • allow specifying cwd using the Node.js API (a3bd9d7)
  • replace listr with listr2 and print errors inline (8f32a3e)

v10.1.7 - 21 Apr 2020

Bug Fixes

  • use stash create/store to prevent files from disappearing from disk (c9adca5)

v10.1.6 - 19 Apr 2020

Bug Fixes

  • deps: update dependencies (e093b1d)

v10.1.5 - 18 Apr 2020

Bug Fixes

  • pass correct path to unstaged patch during cleanup (6066b07)

v10.1.4 - 17 Apr 2020

Bug Fixes

  • allow lint-staged to run on empty git repo by disabling backup (0bf1fb0)

v10.1.3 - 09 Apr 2020

Bug Fixes

  • only run git add on staged files matched to a task (d39573b)
  • run git add for staged file chunks serially (69acfa3)

v10.1.2 - 05 Apr 2020

Bug Fixes

  • no longer include untracked files in backup stash (#827) (2f15336)

v10.1.1 - 31 Mar 2020

Bug Fixes

  • add -- to git add command to denote pathspec starting (#821) (226ccdb)

v10.1.0 - 30 Mar 2020

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)

v10.0.10 - 29 Mar 2020

Bug Fixes

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

v10.0.9 - 24 Mar 2020

Bug Fixes

  • use path.join and normalize to improve msys compatibility in resolveGitRepo (1ad263a)

v10.0.8 - 25 Feb 2020

Bug Fixes

  • do not drop backup stash when reverting to original state fails (f589336)
  • evaluate functional configuration only once (abe4b92)

v10.0.7 - 31 Jan 2020

Bug Fixes

  • replace fs.promises with util.promisify (#786) (f71c1c9)

v10.0.6 - 30 Jan 2020

Bug Fixes

  • make sure deleted files aren't restored due to git bugs (#778) (6bfbe6c)

v10.0.5 - 30 Jan 2020

Bug Fixes

  • always resolve real git config dir location if .git is a file (#784) (b98a5ed)

v10.0.4 - 29 Jan 2020

Bug Fixes

v10.0.3 - 27 Jan 2020

Bug Fixes

  • correctly restore untracked files after running (#780) (4010db0)

v10.0.2 - 22 Jan 2020

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)

v10.0.1 - 20 Jan 2020

Bug Fixes

v10.0.0 - 19 Jan 2020

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.

v10.0.0-beta.15 - 08 Jan 2020

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.

v10.0.0-beta.14 - 24 Dec 2019

Bug Fixes

  • error handling skips dropping backup stash after internal git errors (30b4809)

v10.0.0-beta.13 - 20 Dec 2019

Bug Fixes

  • handle git MERGE_* files separately; improve error handling (da22cf2)

v10.0.0-beta.12 - 18 Dec 2019

Features

  • support async function tasks (20d5c5d)

v10.0.0-beta.11 - 17 Dec 2019

Bug Fixes

  • fail with a message when backup stash is missing (1b64239)

v10.0.0-beta.10 - 17 Dec 2019

Bug Fixes

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

v10.0.0-beta.9 - 16 Dec 2019

Bug Fixes

  • restore metadata about git merge before running tasks (f8ddfc2)

v10.0.0-beta.8 - 14 Dec 2019

Bug Fixes

  • better workaround for git stash --keep-index bug (f3ae378)

v10.0.0-beta.7 - 05 Dec 2019

Bug Fixes

  • automatically add modifications only to originally staged files (083b8e7)

Features

  • bump Node.js version dependency to at least 10.13.0 (#747) (814b9df)

BREAKING CHANGES

  • Node.js v8 is no longer supported because it will reach EOL on 2019-12-31

v10.0.0-beta.6 - 27 Nov 2019

Features

  • add support for concurrent CLI option (6af8307)

v10.0.0-beta.5 - 27 Nov 2019

Bug Fixes

  • improve debug logging (f88e226)
  • max arg length is by default half of the allowed to prevent edge cases (80406c2)

v9.5.0 - 27 Nov 2019

Features

  • add support for concurrent CLI option (6af8307)

v10.0.0-beta.4 - 20 Nov 2019

Features

  • split tasks into chunks to support shells with limited max argument length (#732) (cb43872)

v10.0.0-beta.3 - 14 Nov 2019

Bug Fixes

v10.0.0-beta.2 - 14 Nov 2019

Bug Fixes

  • correctly leave only staged files for running tasks (cfde9ca)

Reverts

  • Revert "fix: no need to run git clean -df since untracked changes are stashed" (e58ebbf)

v10.0.0-beta.1 - 14 Nov 2019

Bug Fixes

  • add all modified files to git index with git add . (bf532c2)
  • correctly restore untracked files from backup stash (c7d0592)
  • gitWorkflow handles active merge mode (2f1e886)
  • keep untracked files around by backing them up (fc03fdc)
  • no need to run git clean -df since untracked changes are stashed (869bac6)
  • prevent Listr from hiding git add warning (cce9809)
  • retry failing apply with 3-way merge (76cb08f)
  • 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)
  • use git stashes for gitWorkflow (40a5db1)
  • warn when task contains "git add" (5208399)

BREAKING CHANGES

  • 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.

v9.4.3 - 13 Nov 2019

Bug Fixes

  • deps: bump eslint-utils from 1.4.0 to 1.4.3 to fix a security vulnerability (#722) (ed84d8e)

v9.5.0-beta.2 (v9.5.0-beta.2@beta) - 03 Nov 2019

Bug Fixes

  • no need to run git clean -df since untracked changes are stashed (bbfae43)
  • update warning about git add, and to README (4fe53ef)

BREAKING CHANGES

  • 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.

v9.5.0-beta.1 (v9.5.0-beta.1@beta) - 31 Oct 2019

Bug Fixes

  • correctly restore untracked files from backup stash (0111f48)
  • gitWorkflow handles active merge mode (959d9d9)
  • keep untracked files around by backing them up (d20c5be)
  • prevent Listr from hiding git add warning (2b57db0)
  • retry failing apply with 3-way merge (30939b9)
  • try applying unstaged changes before handling errors (080f1c6)
  • workaround for stashing deleted files for git < 2.23 (50afea0)

Features

  • automatically stage task modifications (7d0379d)
  • use git stashes for gitWorkflow (bfd2adc)
  • warn when task contains "git add" (4014f3c)

v9.4.2 - 08 Oct 2019

Bug Fixes

  • create fn title with mock file list of correct length (8c3ca58)

v9.4.1 - 01 Oct 2019

Bug Fixes

v9.4.0 - 26 Sep 2019

Features

  • Use shorter title for function tasks with many staged files (#706) (1dcdb89), closes #674

v9.3.0 - 22 Sep 2019

Features

  • allow to pass config instead of configPath (14c46d2)

v9.2.5 - 27 Aug 2019

Bug Fixes

  • validateConfig validates function task return values (d8fad78)

v9.2.4 - 25 Aug 2019

Bug Fixes

  • include renames when getting list of staged files (2243a83)

v9.2.3 - 17 Aug 2019

Bug Fixes

  • don't normalize path gitDir path for better Windows compatibility (eb3fa83)
  • generateTasks handles parent dir globs correctly (82b5182)
  • normalize gitDir path to posix using normalize-path (f485e51)

v9.2.2 - 17 Aug 2019

Bug Fixes

  • apply patch only if there's a diff (e70e08f)

v9.2.1 - 25 Jul 2019

Bug Fixes

v9.2.0 - 10 Jul 2019

Features

  • add --relative option for controlling file paths (242deb5)

v9.1.0 - 06 Jul 2019

Bug Fixes

  • snapshot with fully-resolved path name (b1a08b8)

Features

  • make node-api accessible (ca37906)

v9.0.2 - 03 Jul 2019

Bug Fixes

  • run all commands returned by function linters (0dd0c94)

v9.0.1 - 02 Jul 2019

Bug Fixes

v9.0.0 - 01 Jul 2019

Bug Fixes

  • parse titles for function linters (e24aaf2)

Code Refactoring

  • remove advanced configuration options (04190c8)
  • remove support for chunking (2ca9050)
  • use execa's shell option to run commands (bed9127)

Features

  • add --shell and --quiet flags (ecf9227)
  • add deprecation error for advanced configuration (4bef26e)
  • support function linter returning array of commands (36e54a2)
  • support functions as linter commands (f76c0d1)

BREAKING CHANGES

  • The advanced configuration options have been deprecated in favour of the simple format
  • Local commands are no longer resolved by lint-staged, but execa will do this instead. In effect, there are no longer pretty error messages when commands are not found.
  • Very long arguments strings are no longer chunked on Windows. Function linters should be used instead to customise this behaviour.

v8.2.1 - 13 Jun 2019

Bug Fixes

  • Override env GIT_DIR variable to resolve to the correct git dir path (#629) (5892455), closes #627

v8.2.0 - 06 Jun 2019

Bug Fixes

  • normalize gitDir path for Windows compatibility (90e343b)

Features

  • throw error in runAll if outside git directory (6ac666d)

v8.1.7 - 15 May 2019

Bug Fixes

  • Resolve security vulnerability in dependencies (#615) (315890a), closes #600

v8.1.6 - 03 May 2019

Bug Fixes

v8.1.5 - 01 Mar 2019

Bug Fixes

  • fix issue with scoped pkg listr-update-renderer (#587) (63b085f), closes #585

v8.1.4 - 14 Feb 2019

Bug Fixes

  • Use lodash version with prototype pollution fix (#578) (0be88a0)

v8.1.3 - 02 Feb 2019

Bug Fixes

  • Display package name when node-please-upgrade is being used (#575) (f5bed7b)

v8.1.2 - 02 Feb 2019

Bug Fixes

  • Avoid stashing if no staged files has been changed (#570) (#573) (8c4d9c9)

v8.1.1 - 28 Jan 2019

Bug Fixes

  • Fix configuration validation and allow specifying custom renderers (#572) (d5e738d), closes #567

v8.1.0 - 21 Nov 2018

Features

  • Add relative option to allow passing relative paths to linters (#534) (fcb774b)

v8.0.5 - 17 Nov 2018

Bug Fixes

v8.0.4 - 31 Oct 2018

Bug Fixes

  • package: update staged-git-files to version 1.1.2 (ce434d3)

v8.0.3 - 30 Oct 2018

Bug Fixes

v8.0.2 - 29 Oct 2018

Bug Fixes

  • git: Use resolveGitDir in hasPartiallyStagedFiles (#520) (af99172), closes #514

v8.0.1 - 29 Oct 2018

Bug Fixes

  • git: Use resolveGitDir to resolve to .git for git commands (#518) (da42f8a), closes #514

v8.0.0 - 29 Oct 2018

Features

  • Add support for partially staged files (#75) (f82443c), closes #62

BREAKING CHANGES

  • Node >= 8.6 is required

v7.3.0 - 20 Sep 2018

Features

  • Allow linting files outside of project folder (#495) (d386c80)

v7.2.2 - 12 Aug 2018

Bug Fixes

  • Make app package.json load error tolerant (#479) (d59fad7)

v7.2.1 - 12 Aug 2018

Bug Fixes

  • Disable recursive checks for jest-validate (#483) (c350a0e)

v7.2.0 - 11 Jun 2018

Features

  • Resolve a npm package passed as --config (#464) (c34a3f7)

v7.1.3 - 01 Jun 2018

Bug Fixes

  • package: Update jest-validate to version 23.0.0 (#458) (3d0ccb2)

v7.1.2 - 21 May 2018

Bug Fixes

  • package: Update cosmiconfig to version 5.0.2 (#444) (2fc7aa3), closes #441
  • package: Update listr to version 0.14.1 (#445) (a56d7c9), closes #426
  • Add .lintstagedrc.js to list of config files to search (9e27620)

v7.1.1 - 18 May 2018

Bug Fixes

v7.1.0 - 07 May 2018

Features

  • Chunked execution of linters on Windows only (#439) (1601c02)

v7.0.5 - 26 Apr 2018

Bug Fixes

  • Update "please-upgrade-node" to version 3.0.2 (#434) (b9d84ce)

v7.0.4 - 05 Apr 2018

Bug Fixes

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

v7.0.3 - 03 Apr 2018

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 2018

Bug Fixes

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

v7.0.1 - 30 Mar 2018

Bug Fixes

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

v7.0.0 - 21 Feb 2018

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 2018

Bug Fixes

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

v6.1.0 - 26 Jan 2018

Features

v6.0.1 - 19 Jan 2018

Bug Fixes

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

v6.0.0 - 01 Dec 2017

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 2017

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
<summary>diff view</summary>
@@ -1,5 +1,4 @@
-gitDir: ../..
 linters:
-  packages/prj/src/*.js:
+  src/*.js:
     - eslint --fix
     - git add

v4.3.0 - 18 Oct 2017

Features

  • Allow config to be provided via command-line (#304) (54809ae)

v4.2.3 - 25 Sep 2017

Bug Fixes

  • findBin: Add separator before npm args (#297) (065f362)

v4.2.2 - 22 Sep 2017

Bug Fixes

  • findBin: Resolve package script with args (#295) (1dc3bd6)

v4.2.1 - 15 Sep 2017

Bug Fixes

v4.2.0 - 15 Sep 2017

Features

  • Print friendlier error if config is missing (#281) (30fa594)

v4.1.3 - 07 Sep 2017

Bug Fixes

  • Unicode symbols compatibility on Windows (#248) (49b11e4)

v4.1.2 - 06 Sep 2017

Bug Fixes

  • Handle the case when staged-git-files errors properly (#267) (a8a585a), closes #264

v4.1.1 - 06 Sep 2017

Bug Fixes

  • Use lodash has to check config keys presence (#265) (c0287e6), closes #263

v4.1.0 - 04 Sep 2017

Features

v4.0.4 - 24 Aug 2017

Bug Fixes

  • Disable concurrent sub task execution by default (#229) (48c8c6ff, closes #225)

v4.0.3 - 06 Aug 2017

Bug Fixes

v4.0.2 - 17 Jul 2017

Bug Fixes

v4.0.1 - 06 Jul 2017

Bug Fixes

v4.0.0 - 18 Jun 2017

Bug Fixes

Breaking Changes

-

This might affect existing setups which depend on the -- argument. (ad265664)

v3.6.1 - 10 Jun 2017

Bug Fixes

v3.6.0 - 01 Jun 2017

Features

  • Add advanced option globOptions to customise minimatch (#179) (c5b9804b, closes #173)

v3.5.1 - 29 May 2017

Bug Fixes

  • gitDir: Fix for checking if task contains git.exe on Windows (#178) (4c600178)

v3.5.0 - 25 May 2017

Features

v3.4.2 - 17 May 2017

Bug Fixes

v3.4.1 - 28 Apr 2017

Bug Fixes

v3.4.0 - 13 Mar 2017

Features

  • Display a message if there are no files that match a pattern. (#139) (b0204ee4, closes #135)

v3.3.2 - 13 Mar 2017

Bug Fixes

  • Remove unnecessary which dependency and code block in findBin.js (3acd6c7b)

v3.3.1 - 19 Feb 2017

Bug Fixes

  • concurrent: Wait for all tasks to finish before showing errors (5a44bea4, closes #86)
  • package: update listr to version 0.11.0 (3c75c16b)

v3.3.0 - 30 Jan 2017

Bug Fixes

  • gitDir: Run npm run scripts in the current working directory instead of git directory. (9c45d8ee, closes #122)

Features

  • verbose: Add verbose option (9dae19f9)

v3.2.9 - 30 Jan 2017

Bug Fixes

  • concurrent: Fix concurrent: false could not be set using config (22a1d774)

v3.2.8 - 24 Jan 2017

Bug Fixes

  • windows: Do not reuse execa options object for runners since it breaks on Windows (#124) (be8aa3f0, closes #114)

v3.2.7 - 18 Jan 2017

Bug Fixes

v3.2.6 - 09 Jan 2017

Bug Fixes

v3.2.5 - 30 Dec 2016

Bug Fixes

  • resolvePaths: Use cwd-relative paths instead of absolute paths (#116) (968e0d8f, closes #115, #115)

v3.2.4 - 19 Dec 2016

Bug Fixes

  • When rejecting, use new Error and error.message respectively. (#113) (97ad4b46, closes #112)

v3.2.3 - 14 Dec 2016

Bug Fixes

  • Run commands in the context of gitDir if it is set (#110) (a74135d6, closes #109)

v3.2.2 - 07 Dec 2016

  • [fix]: Force colors only when running in TTY (#108)
  • [docs]: Added npm version badge

v3.2.1 - 04 Nov 2016

  • [fix]: Added { dot: true } to allow more complex globs with dots in path (#93)
  • [docs] Simpler pattern for matching js/jsx in the README. <Artem Sapegin>
  • [docs] Be more specific about where to put pre-commit in the installation instructions. (#87) <Artem Sapegin>
  • [chore]: Added commitizen conventional changelog (#92)
  • [chore] update eslint to version 3.9.1 (#88)
  • [chore]: update listr to version 0.7.0 (#85)
  • [chore]: Removed unused dev dependencies.

v3.2.0 - 18 Oct 2016

  • [feature] Support rc files extensions (.json, .yml etc) as they aren't supported by default

v3.1.1 - 17 Oct 2016

  • [fix] Properly resolve paths when the git directory differs from the current working directory. #78
  • [fix] Fixed TypeError: Path must be a string. Received undefined when gitDir isn't defined in the config.

v3.1.0 - 13 Oct 2016

v3.0.3 - 22 Sep 2016

v3.0.2 - 12 Sep 2016

  • Removed unused dependecies

v3.0.1 - 08 Sep 2016

  • Switched to listr. Simplified code and more beautiful output.
  • Switched to execa. Should fix #30
  • Use ES2015. Dropped support for Node < 4.x
  • Support commands with arguments in the lint-staged config. Closes #47
  • Support binaries from $PATH. Closes #47
  • Removed --color option from runner. You should pass arguments yourself.

v2.0.3 - 02 Aug 2016

  • Use cross-spawn to fix issues with Windows. Closes #30. (#34)
  • Updated dependencies

v2.0.2 - 11 Jul 2016

  • Fixes an error when running a config with just one task (#28). #27 @Anber.
  • Beautiful string representation for multiple linters in case of error.
  • Added tests to getLintersAsString.

v2.0.1 - 08 Jul 2016

  • When on of the sequential tasks fails, exit the process. Closes #26

v2.0.0 - 08 Jul 2016

  • Support for sequences of commands. Needs config update! #25 @okonet
  • Allow adding files to the commit after running a task. #16 @okonet

v1.0.2 - 30 Jun 2016

  • Fixed path resolution to the app root on Windows. #19 by <OJ Kwon>

v1.0.1 - 07 Jun 2016

  • Fixed support of local npm scripts from package.json

v1.0.0 - 07 Jun 2016

  • Complete re-write using Node.js API to fix #5, #6, #7, #8
  • Switched to staged-git-files that supports git filter. Exclude deleted files. Closes #12

v0.2.2 - 02 May 2016

  • Switch to bin/bash and fix file existncy check #9 @fubhy
  • Switch to $(npm bin) instead of hardcoding path #9 @fubhy
  • Updated flow installation instructions @okonet

v0.2.1 - 02 May 2016

v0.2.0 - 02 May 2016

  • Added more linters: flow, JSCS @okonet
  • Better console output when no binary is found @okonet
  • Better README @okonet

v0.1.1 - 02 May 2016

  • Initial release