Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: lint-staged/lint-staged
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v13.1.2
Choose a base ref
...
head repository: lint-staged/lint-staged
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: da6da00654248c34e4f7ce94f61d68ee46f177a1
Choose a head ref
  • 3 commits
  • 4 files changed
  • 2 contributors

Commits on Mar 2, 2023

  1. Copy the full SHA
    f230c69 View commit details

Commits on Mar 5, 2023

  1. Copy the full SHA
    97894ef View commit details
  2. Copy the full SHA
    da6da00 View commit details
Showing with 983 additions and 769 deletions.
  1. +1 −1 README.md
  2. +3 −3 bin/lint-staged.js
  3. +963 −750 package-lock.json
  4. +16 −15 package.json
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -221,7 +221,7 @@ Linter commands work on a subset of all staged files, defined by a _glob pattern
- **`"!(*test).js"`**. will match all JS files, except those ending in `test.js`, so `foo.js` but not `foo.test.js`
- 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`
- **`"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

6 changes: 3 additions & 3 deletions bin/lint-staged.js
Original file line number Diff line number Diff line change
@@ -4,16 +4,16 @@ import fs from 'node:fs'
import path from 'node:path'
import { fileURLToPath } from 'node:url'

import { isColorSupported } from 'colorette'
import { Option, program } from 'commander'
import debug from 'debug'
import supportsColor from 'supports-color'

import lintStaged from '../lib/index.js'
import { CONFIG_STDIN_ERROR } from '../lib/messages.js'

// Force colors for packages that depend on https://www.npmjs.com/package/supports-color
if (isColorSupported) {
process.env.FORCE_COLOR = '1'
if (supportsColor.stdout) {
process.env.FORCE_COLOR = supportsColor.stdout.level.toString()
}

// Do not terminate main Listr process on SIGINT
1,713 changes: 963 additions & 750 deletions package-lock.json

Large diffs are not rendered by default.

31 changes: 16 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -35,35 +35,36 @@
"dependencies": {
"cli-truncate": "^3.1.0",
"colorette": "^2.0.19",
"commander": "^9.4.1",
"commander": "^10.0.0",
"debug": "^4.3.4",
"execa": "^6.1.0",
"lilconfig": "2.0.6",
"listr2": "^5.0.5",
"execa": "^7.0.0",
"lilconfig": "2.1.0",
"listr2": "^5.0.7",
"micromatch": "^4.0.5",
"normalize-path": "^3.0.0",
"object-inspect": "^1.12.2",
"object-inspect": "^1.12.3",
"pidtree": "^0.6.0",
"string-argv": "^0.3.1",
"yaml": "^2.1.3"
"supports-color": "9.3.1",
"yaml": "^2.2.1"
},
"devDependencies": {
"@babel/core": "^7.20.2",
"@babel/core": "^7.21.0",
"@babel/eslint-parser": "^7.19.1",
"@babel/preset-env": "^7.20.2",
"babel-jest": "^29.3.1",
"babel-jest": "^29.4.3",
"babel-plugin-transform-imports": "2.0.0",
"consolemock": "^1.1.0",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint": "^8.35.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"fs-extra": "^10.1.0",
"husky": "^8.0.2",
"jest": "^29.3.1",
"fs-extra": "^11.1.0",
"husky": "^8.0.3",
"jest": "^29.4.3",
"jest-snapshot-serializer-ansi": "^1.0.0",
"prettier": "^2.7.1"
"prettier": "^2.8.4"
},
"keywords": [
"lint",