Packages

lint-staged

17.6.0 · 26 Sep 2026MIT26.8M / weekRepositoryHomepagenpmAtom feed

Your version

Where each line stands

Plan an upgrade

What to use instead

A better maintained package

From the e18e module-replacements list, maintained by the community.

The list compares the options for lint-staged: read the comparison.

Before you switch

  1. 1

    Check what else depends on it

    Paste your package.json in the dependency check to see every deprecated or outdated package in one pass, not only this one.

  2. 2

    Read the replacement's peers and releases

    A native API or a few lines of code need no release notes, but check the Node version your project runs on.

  3. 3

    Know when it ships

    Follow the new package on Inlinr: its releases and advisories land in your feed, and the time spent on the migration branch shows on its page.

Latest releases

All 268 releases
  1. 17.x · latest line
  2. 17.6.0

    26 Sep 2026
    • Task functions like { title, task } can now use a logger function log() to emit output while the task runs. By default, the output will only be visible if the task fails, unless the --verbose option was used. Additionally, when the task rejects, the error will be shown in the output.

      import { defineConfig } from 'lint-staged/config'
      
      export default defineConfig({
        '*': {
          title: 'Fail if PDF files are committed',
          task: async (filepaths, { log }) => {
            const pdfFiles = filepaths.filter((f) => f.toLowerCase().endsWith('.pdf'))
            if (pdfFiles.length > 0) {
              log('PDF files should not be committed: %s', pdfFiles)
              throw new Error('Failed')
            }
          },
        },
      })
    • lint-staged now stages changes to all tracked files modified by tasks, including files that weren’t originally staged or didn’t match the configured globs. This can happen when your task has side-effects, or it's a function that ignores the staged files like () => "prettier --write .".

      If you have unstaged changes in a file and the task also edits that file, your unstaged changes will be staged too. Use --hide-unstaged to hide your changes while tasks run.

    • The assignment of staged files to lint-staged configuration files (when using multiple, for example in a monorepo) has been rewritten to be more efficient. As a reminder, each staged file is assigned to exactly one configuration (the closest one), even if that config doesn't match the file in its globs.

  3. 17.5.1

    10 Sep 2026
    • Fix TypeScript issue TS1254 from defineConfig() by changing the signature from const to a function:

      A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.

  4. 17.5.0

    5 Sep 2026
    • Lint-staged now refuses to run when files were staged with --intent-to-add, because Git stash doesn't support them. Previously this was an unhandled error.

    • Lint-staged now handles color support better in non-TTY streams, and honors the FORCE_COLOR environment variable.

    • Update tinyexec@1.3.1 so that local binaries from node_modules/.bin are resolved starting from the directory of each lint-staged configuration file (in monorepo setups). This behavior was broken in lint-staged@16.3.0 where they were only resolved from the current working directory and up.

Dependency tracking · free for 3 projects

Know when your own dependencies move

lint-staged shipped a new major in the last 12 months, among 24 releases. Inlinr shows which of your projects are behind, and what the upgrade breaks.

  • Advisories reach you

    An email when a critical or high advisory affects a project, before the next install.

  • Upgrades checked first

    Peer ranges, Node, ESM-only and types changes read before you bump.

  • Only what matters

    Majors and breaking notes stay; patches and sibling bumps fold into one line.

How dependency tracking works

Registry facts last checked 28 Oct 2026. Releases and advisories last read 28 Oct 2026.