Skip to content

Commit

Permalink
feat: replace picocolors with ansis (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
webdiscus authored Feb 18, 2025
1 parent afb7441 commit bf6f650
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
},
"dependencies": {
"@nodelib/fs.walk": "catalog:",
"ansis": "catalog:",
"bundle-require": "catalog:",
"cac": "catalog:",
"chokidar": "catalog:",
Expand All @@ -47,7 +48,6 @@
"mlly": "catalog:",
"mrmime": "catalog:",
"open": "catalog:",
"picocolors": "catalog:",
"ws": "catalog:"
},
"devDependencies": {
Expand Down
18 changes: 12 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ catalog:
'@unocss/nuxt': ^65.4.0
'@voxpelli/config-array-find-files': ^1.2.2
'@vueuse/nuxt': ^12.4.0
ansis: ^3.15.0
bundle-require: ^5.1.0
cac: ^6.7.14
chokidar: ^4.0.3
Expand All @@ -41,7 +42,6 @@ catalog:
nuxt: ^3.15.1
nuxt-eslint-auto-explicit-import: ^0.1.1
open: ^10.1.0
picocolors: ^1.1.1
shiki: ^1.27.0
simple-git-hooks: ^2.11.1
textmate-grammar-glob: ^0.0.1
Expand Down
4 changes: 2 additions & 2 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import fs from 'node:fs/promises'
import { relative, resolve } from 'node:path'
import process from 'node:process'

import c from 'ansis'
import cac from 'cac'
import fg from 'fast-glob'
import { getPort } from 'get-port-please'
import open from 'open'
import c from 'picocolors'
import { readConfig } from './configs'
import { MARK_CHECK, MARK_INFO } from './constants'
import { distDir } from './dirs'
Expand Down Expand Up @@ -102,7 +102,7 @@ cli
if (process.env.ESLINT_CONFIG)
options.config ||= process.env.ESLINT_CONFIG

console.log(MARK_INFO, `Starting ESLint config inspector at`, c.green(`http://${host === '127.0.0.1' ? 'localhost' : host}:${port}`), '\n')
console.log(MARK_INFO, `Starting ESLint config inspector at`, c.green`http://${host === '127.0.0.1' ? 'localhost' : host}:${port}`, '\n')

const cwd = process.cwd()
const server = await createHostServer({
Expand Down
2 changes: 1 addition & 1 deletion src/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import type { FlatConfigItem, MatchedFile, Payload, RuleInfo } from '../shared/t
import { basename, dirname, relative, resolve } from 'node:path'
import process from 'node:process'
import { configArrayFindFiles } from '@voxpelli/config-array-find-files'
import c from 'ansis'
import { bundleRequire } from 'bundle-require'
import { findUp } from 'find-up'
import { resolve as resolveModule } from 'mlly'
import c from 'picocolors'
import { buildConfigArray, matchFile } from '../shared/configs'
import { configFilenames, legacyConfigFilenames, MARK_CHECK, MARK_INFO } from './constants'
import { ConfigPathError, ConfigPathLegacyError } from './errors'
Expand Down
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import c from 'picocolors'
import c from 'ansis'

export const configFilenames = [
'eslint.config.js',
Expand Down
2 changes: 1 addition & 1 deletion src/errors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import c from 'picocolors'
import c from 'ansis'
import { MARK_ERROR } from './constants'

export class ConfigInspectorError extends Error {
Expand Down

0 comments on commit bf6f650

Please sign in to comment.