lint-staged
Advanced tools
Comparing version 11.2.5 to 11.2.6
'use strict' | ||
const { lilconfig } = require('lilconfig') | ||
const yaml = require('js-yaml') | ||
const { cosmiconfig } = require('cosmiconfig') | ||
const debugLog = require('debug')('lint-staged') | ||
@@ -28,6 +27,4 @@ const stringifyObject = require('stringify-object') | ||
const jsYamlLoad = (filepath, content) => yaml.load(content) | ||
const loadConfig = (configPath) => { | ||
const explorer = lilconfig('lint-staged', { | ||
const explorer = cosmiconfig('lint-staged', { | ||
searchPlaces: [ | ||
@@ -44,7 +41,2 @@ 'package.json', | ||
], | ||
loaders: { | ||
'.yml': jsYamlLoad, | ||
'.yaml': jsYamlLoad, | ||
noExt: jsYamlLoad, | ||
}, | ||
}) | ||
@@ -97,3 +89,3 @@ | ||
debugLog('Loading config using `lilconfig`') | ||
debugLog('Loading config using `cosmiconfig`') | ||
@@ -100,0 +92,0 @@ const resolved = configObject |
{ | ||
"name": "lint-staged", | ||
"version": "11.2.5", | ||
"version": "11.2.6", | ||
"description": "Lint files staged by git", | ||
@@ -33,7 +33,6 @@ "license": "MIT", | ||
"commander": "^8.2.0", | ||
"cosmiconfig": "^7.0.1", | ||
"debug": "^4.3.2", | ||
"enquirer": "^2.3.6", | ||
"execa": "^5.1.1", | ||
"js-yaml": "^4.1.0", | ||
"lilconfig": "^2.0.3", | ||
"listr2": "^3.12.2", | ||
@@ -40,0 +39,0 @@ "micromatch": "^4.0.4", |
@@ -108,3 +108,3 @@ # 🚫💩 lint-staged ![GitHub Actions](https://github.com/okonet/lint-staged/workflows/CI/badge.svg) [![Build Status for Windows](https://ci.appveyor.com/api/projects/status/github/okonet/lint-staged?branch=master&svg=true)](https://ci.appveyor.com/project/okonet/lint-staged) [![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) | ||
See [lilconfig](https://github.com/antonk52/lilconfig) for more details on what formats are supported. | ||
See [cosmiconfig](https://github.com/davidtheclark/cosmiconfig) for more details on what formats are supported. | ||
@@ -111,0 +111,0 @@ 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. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14
88267
1558
+ Addedcosmiconfig@^7.0.1
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@types/parse-json@4.0.2(transitive)
+ Addedcallsites@3.1.0(transitive)
+ Addedcosmiconfig@7.1.0(transitive)
+ Addederror-ex@1.3.2(transitive)
+ Addedimport-fresh@3.3.0(transitive)
+ Addedis-arrayish@0.2.1(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedjson-parse-even-better-errors@2.3.1(transitive)
+ Addedlines-and-columns@1.2.4(transitive)
+ Addedparent-module@1.0.1(transitive)
+ Addedparse-json@5.2.0(transitive)
+ Addedpath-type@4.0.0(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedresolve-from@4.0.0(transitive)
+ Addedyaml@1.10.2(transitive)
- Removedjs-yaml@^4.1.0
- Removedlilconfig@^2.0.3
- Removedargparse@2.0.1(transitive)
- Removedjs-yaml@4.1.0(transitive)
- Removedlilconfig@2.1.0(transitive)