lint-staged 14.0.1 → 15.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # 🚫💩 lint-staged ![GitHub Actions](https://github.com/okonet/lint-staged/workflows/CI/badge.svg) [![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)
1
+ # 🚫💩 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)
2
2
 
3
3
  Run linters against staged git files and don't let :poop: slip into your code base!
4
4
 
@@ -906,4 +906,21 @@ export default {
906
906
 
907
907
  </details>
908
908
 
909
+ #### ESLint >= 8.51.0 && [Flat ESLint config](https://eslint.org/docs/latest/use/configure/configuration-files-new)
910
+
911
+ <details>
912
+ <summary>Click to expand</summary>
913
+
914
+ ESLint v8.51.0 introduced [`--no-warn-ignored` CLI flag](https://eslint.org/docs/latest/use/command-line-interface#--no-warn-ignored). 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.
915
+
916
+ ```json
917
+ {
918
+ "*.js": "eslint --max-warnings=0 --no-warn-ignored"
919
+ }
920
+ ```
921
+
922
+ **NOTE:** `--no-warn-ignored` flag is only available when [Flat ESLint config](https://eslint.org/docs/latest/use/configure/configuration-files-new) is used.
923
+
924
+ </details>
925
+
909
926
  </details>
@@ -15,15 +15,14 @@ if (supportsColor) {
15
15
  process.env.FORCE_COLOR = supportsColor.level.toString()
16
16
  }
17
17
 
18
+ const debugLog = debug('lint-staged:bin')
19
+
18
20
  // Do not terminate main Listr process on SIGINT
19
21
  process.on('SIGINT', () => {})
20
22
 
21
23
  const packageJson = JSON.parse(await fs.readFile(new URL('../package.json', import.meta.url)))
22
24
  const version = packageJson.version
23
25
 
24
- const debugLog = debug('lint-staged:bin')
25
- debugLog('Running `lint-staged@%s`', version)
26
-
27
26
  const cli = program.version(version)
28
27
 
29
28
  cli.option('--allow-empty', 'allow empty commits when tasks revert all staged changes', false)
@@ -90,6 +89,8 @@ if (cliOptions.debug) {
90
89
  debug.enable('lint-staged*')
91
90
  }
92
91
 
92
+ debugLog('Running `lint-staged@%s` on Node.js %s (%s)', version, process.version, process.platform)
93
+
93
94
  const options = {
94
95
  allowEmpty: !!cliOptions.allowEmpty,
95
96
  concurrent: JSON.parse(cliOptions.concurrent),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lint-staged",
3
- "version": "14.0.1",
3
+ "version": "15.0.0",
4
4
  "description": "Lint files staged by git",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/okonet/lint-staged",
@@ -14,7 +14,7 @@
14
14
  "url": "https://opencollective.com/lint-staged"
15
15
  },
16
16
  "engines": {
17
- "node": "^16.14.0 || >=18.0.0"
17
+ "node": ">=18.12.0"
18
18
  },
19
19
  "type": "module",
20
20
  "bin": "./bin/lint-staged.js",
@@ -30,37 +30,44 @@
30
30
  "scripts": {
31
31
  "lint": "eslint .",
32
32
  "test": "jest --coverage",
33
- "test:watch": "jest --watch"
33
+ "test:watch": "jest --watch",
34
+ "version": "npx changeset version",
35
+ "postversion": "npm i --package-lock-only && git commit -am \"chore(changeset): release\"",
36
+ "publish": "npx changeset tag"
34
37
  },
35
38
  "dependencies": {
36
39
  "chalk": "5.3.0",
37
- "commander": "11.0.0",
40
+ "commander": "11.1.0",
38
41
  "debug": "4.3.4",
39
- "execa": "7.2.0",
42
+ "execa": "8.0.1",
40
43
  "lilconfig": "2.1.0",
41
- "listr2": "6.6.1",
44
+ "listr2": "7.0.1",
42
45
  "micromatch": "4.0.5",
43
46
  "pidtree": "0.6.0",
44
47
  "string-argv": "0.3.2",
45
- "yaml": "2.3.1"
48
+ "yaml": "2.3.2"
46
49
  },
47
50
  "devDependencies": {
48
- "@babel/core": "7.22.10",
49
- "@babel/eslint-parser": "7.22.10",
50
- "@babel/preset-env": "7.22.10",
51
- "babel-jest": "29.6.2",
51
+ "@babel/core": "7.23.2",
52
+ "@babel/eslint-parser": "7.22.15",
53
+ "@babel/preset-env": "7.23.2",
54
+ "@changesets/changelog-github": "0.4.8",
55
+ "@changesets/cli": "2.26.2",
56
+ "@commitlint/cli": "17.7.2",
57
+ "@commitlint/config-conventional": "17.7.0",
58
+ "babel-jest": "29.7.0",
52
59
  "babel-plugin-transform-imports": "2.0.0",
53
60
  "consolemock": "1.1.0",
54
- "eslint": "8.46.0",
61
+ "eslint": "8.51.0",
55
62
  "eslint-config-prettier": "9.0.0",
56
- "eslint-plugin-import": "2.28.0",
63
+ "eslint-plugin-import": "2.28.1",
57
64
  "eslint-plugin-node": "11.1.0",
58
- "eslint-plugin-prettier": "5.0.0",
65
+ "eslint-plugin-prettier": "5.0.1",
59
66
  "husky": "8.0.3",
60
- "jest": "29.6.2",
67
+ "jest": "29.7.0",
61
68
  "jest-snapshot-serializer-ansi": "2.1.0",
62
69
  "mock-stdin": "1.0.0",
63
- "prettier": "3.0.1"
70
+ "prettier": "3.0.3"
64
71
  },
65
72
  "keywords": [
66
73
  "lint",