You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -227,7 +227,7 @@ _Lint-staged_ can be configured in many ways:
227
227
whether your project's _package.json_ contains the `"type": "module"` option or not.
228
228
- Pass a configuration file using the `--config` or `-c` flag
229
229
230
-
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](https://github.com/micromatch/micromatch) for glob patterns. JavaScript files can also export advanced configuration as a function. See [Using JS configuration files](#using-js-configuration-files) for more info.
230
+
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 [picomatch](https://github.com/micromatch/picomatch) for glob patterns. JavaScript files can also export advanced configuration as a function. See [Using JS configuration files](#using-js-configuration-files) for more info.
231
231
232
232
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?"](#how-to-use-lint-staged-in-a-multi-package-monorepo) for more info and an example.
233
233
@@ -329,9 +329,9 @@ Or, if necessary, you can limit the concurrency using `--concurrent <number>` or
329
329
330
330
## Filtering files
331
331
332
-
Task commands work on a subset of all staged files, defined by a _glob pattern_. lint-staged uses [micromatch](https://github.com/micromatch/micromatch) for matching files with the following rules:
332
+
Task commands work on a subset of all staged files, defined by a _glob pattern_. lint-staged uses [picomatch](https://github.com/micromatch/picomatch) for matching files with the following rules:
333
333
334
-
- If the glob pattern contains no slashes (`/`), micromatch's `matchBase` option will be enabled, so globs match a file's basename regardless of directory:
334
+
- If the glob pattern contains no slashes (`/`), picomatch's `matchBase` option will be enabled, so globs match a file's basename regardless of directory:
335
335
-`"*.js"` will match all JS files, like `/test.js` and `/foo/bar/test.js`
336
336
-`"!(*test).js"` will match all JS files, except those ending in `test.js`, so `foo.js` but not `foo.test.js`
337
337
-`"!(*.css|*.js)"` will match all files except CSS and JS files
@@ -499,12 +499,12 @@ It's better to use the [function-based configuration (seen above)](https://githu
0 commit comments