Skip to content

Commit aa65846

Browse files
committed
refactor: replace "object-inspect" with built-in util
1 parent 977c15d commit aa65846

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

lib/messages.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1+
import { inspect } from 'node:util'
2+
13
import chalk from 'chalk'
2-
import inspect from 'object-inspect'
34

45
import { error, info, warning } from './figures.js'
56

67
export const configurationError = (opt, helpMsg, value) =>
78
`${chalk.redBright(`${error} Validation Error:`)}
89
9-
Invalid value for '${chalk.bold(opt)}': ${chalk.bold(
10-
inspect(value, { inlineCharacterLimit: Number.POSITIVE_INFINITY })
11-
)}
10+
Invalid value for '${chalk.bold(opt)}': ${chalk.bold(inspect(value))}
1211
1312
${helpMsg}`
1413

lib/validateConfig.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/** @typedef {import('./index').Logger} Logger */
22

3+
import { inspect } from 'node:util'
4+
35
import debug from 'debug'
4-
import inspect from 'object-inspect'
56

67
import { configurationError } from './messages.js'
78
import { ConfigEmptyError, ConfigFormatError } from './symbols.js'
@@ -109,7 +110,7 @@ See https://github.com/okonet/lint-staged#configuration.`)
109110
}
110111

111112
debugLog('Validated config from `%s`:', configPath)
112-
debugLog(inspect(config, { indent: 2 }))
113+
debugLog(inspect(config, { compact: false }))
113114

114115
return validatedConfig
115116
}

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
"lilconfig": "2.1.0",
4141
"listr2": "6.6.1",
4242
"micromatch": "4.0.5",
43-
"object-inspect": "1.12.3",
4443
"pidtree": "0.6.0",
4544
"string-argv": "0.3.2",
4645
"yaml": "2.3.1"

0 commit comments

Comments
 (0)