Socket
Socket
Sign inDemoInstall

lint-staged

Package Overview
Dependencies
Maintainers
1
Versions
250
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lint-staged - npm Package Compare versions

Comparing version 15.2.2 to 15.2.4

2

lib/resolveTaskFn.js

@@ -99,3 +99,3 @@ import chalk from 'chalk'

/**
* Create a error output dependding on process result.
* Create a error output depending on process result.
*

@@ -102,0 +102,0 @@ * @param {string} command

{
"name": "lint-staged",
"version": "15.2.2",
"version": "15.2.4",
"description": "Lint files staged by git",

@@ -40,20 +40,20 @@ "license": "MIT",

"chalk": "5.3.0",
"commander": "11.1.0",
"commander": "12.1.0",
"debug": "4.3.4",
"execa": "8.0.1",
"lilconfig": "3.0.0",
"listr2": "8.0.1",
"micromatch": "4.0.5",
"lilconfig": "3.1.1",
"listr2": "8.2.1",
"micromatch": "4.0.6",
"pidtree": "0.6.0",
"string-argv": "0.3.2",
"yaml": "2.3.4"
"yaml": "2.4.2"
},
"devDependencies": {
"@changesets/changelog-github": "0.5.0",
"@changesets/cli": "2.27.1",
"@commitlint/cli": "18.4.4",
"@commitlint/config-conventional": "18.4.4",
"@changesets/cli": "2.27.3",
"@commitlint/cli": "19.3.0",
"@commitlint/config-conventional": "19.2.2",
"consolemock": "1.1.0",
"cross-env": "7.0.3",
"eslint": "8.56.0",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",

@@ -63,7 +63,7 @@ "eslint-plugin-import": "2.29.1",

"eslint-plugin-prettier": "5.1.3",
"husky": "8.0.3",
"husky": "9.0.11",
"jest": "29.7.0",
"jest-snapshot-serializer-ansi": "2.1.0",
"mock-stdin": "1.0.0",
"prettier": "3.2.4"
"prettier": "3.2.5"
},

@@ -70,0 +70,0 @@ "keywords": [

@@ -226,4 +226,31 @@ # 🚫💩 lint-staged [![Test & Release](https://github.com/okonet/lint-staged/actions/workflows/push.yml/badge.svg)](https://github.com/okonet/lint-staged/actions/workflows/push.yml) [![Publish](https://github.com/okonet/lint-staged/actions/workflows/tag.yml/badge.svg)](https://github.com/okonet/lint-staged/actions/workflows/tag.yml) [![npm version](https://badge.fury.io/js/lint-staged.svg)](https://badge.fury.io/js/lint-staged) [![Codecov](https://codecov.io/gh/okonet/lint-staged/branch/master/graph/badge.svg)](https://codecov.io/gh/okonet/lint-staged)

If necessary, you can limit the concurrency using `--concurrent <number>` or disable it entirely with `--concurrent false`.
You can solve it using the negation pattern and the array syntax:
```json
{
"!(*.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:
```json
{
"*.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

@@ -233,5 +260,6 @@

- If the glob pattern contains no slashes (`/`), micromatch's `matchBase` option will enabled, so globs match a file's basename regardless of directory:
- 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:

@@ -884,3 +912,3 @@ - `"./*.js"` will match all JS files in the git repo root, so `/test.js` but not `/foo/bar/test.js`

Based on the discussion from [this issue](https://github.com/eslint/eslint/issues/9977), it was decided that using [the outlined script ](https://github.com/eslint/eslint/issues/9977#issuecomment-406420893)is the best route to fix this.
Based on the discussion from [this issue](https://github.com/eslint/eslint/issues/9977), it was decided that using [the outlined script](https://github.com/eslint/eslint/issues/9977#issuecomment-406420893)is the best route to fix this.

@@ -887,0 +915,0 @@ So you can setup a `.lintstagedrc.js` config file to do this:

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc