Skip to content

Commit

Permalink
refactor: make sure debug logs use the actual method name
Browse files Browse the repository at this point in the history
  • Loading branch information
iiroj committed Nov 6, 2021
1 parent b483cf5 commit 649ee5d
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/execGit.js
@@ -1,7 +1,7 @@
import debug from 'debug'
import execa from 'execa'

const debugLog = debug('lint-staged:git')
const debugLog = debug('lint-staged:execGit')

/**
* Explicitly never recurse commands into submodules, overriding local/global configuration.
Expand Down
2 changes: 1 addition & 1 deletion lib/generateTasks.js
Expand Up @@ -3,7 +3,7 @@ import micromatch from 'micromatch'
import path from 'path'
import normalize from 'normalize-path'

const debugLog = debug('lint-staged:gen-tasks')
const debugLog = debug('lint-staged:generateTasks')

/**
* Generates all task commands, and filelist
Expand Down
2 changes: 1 addition & 1 deletion lib/gitWorkflow.js
Expand Up @@ -13,7 +13,7 @@ import {
RestoreUnstagedChangesError,
} from './symbols.js'

const debugLog = debug('lint-staged:git')
const debugLog = debug('lint-staged:GitWorkflow')

const MERGE_HEAD = 'MERGE_HEAD'
const MERGE_MODE = 'MERGE_MODE'
Expand Down
2 changes: 1 addition & 1 deletion lib/makeCmdTasks.js
Expand Up @@ -4,7 +4,7 @@ import debug from 'debug'
import { configurationError } from './messages.js'
import { resolveTaskFn } from './resolveTaskFn.js'

const debugLog = debug('lint-staged:make-cmd-tasks')
const debugLog = debug('lint-staged:makeCmdTasks')

const STDOUT_COLUMNS_DEFAULT = 80

Expand Down
2 changes: 1 addition & 1 deletion lib/resolveTaskFn.js
Expand Up @@ -7,7 +7,7 @@ import { error, info } from './figures.js'
import { getInitialState } from './state.js'
import { TaskError } from './symbols.js'

const debugLog = debug('lint-staged:task')
const debugLog = debug('lint-staged:resolveTaskFn')

const getTag = ({ code, killed, signal }) => signal || (killed && 'KILLED') || code || 'FAILED'

Expand Down
2 changes: 1 addition & 1 deletion lib/runAll.js
Expand Up @@ -32,7 +32,7 @@ import {
} from './state.js'
import { GitRepoError, GetStagedFilesError, GitError } from './symbols.js'

const debugLog = debug('lint-staged:run')
const debugLog = debug('lint-staged:runAll')

const createError = (ctx) => Object.assign(new Error('lint-staged failed'), { ctx })

Expand Down
2 changes: 1 addition & 1 deletion lib/validateConfig.js
Expand Up @@ -3,7 +3,7 @@ import debug from 'debug'
import { configurationError } from './messages.js'
import { validateBraces } from './validateBraces.js'

const debugLog = debug('lint-staged:cfg')
const debugLog = debug('lint-staged:validateConfig')

const isObject = (test) => test && typeof test === 'object' && !Array.isArray(test)

Expand Down
2 changes: 1 addition & 1 deletion lib/validateOptions.js
Expand Up @@ -5,7 +5,7 @@ import { constants } from 'fs'
import { invalidOption } from './messages.js'
import { InvalidOptionsError } from './symbols.js'

const debugLog = debug('lint-staged:options')
const debugLog = debug('lint-staged:validateOptions')

/**
* Validate lint-staged options, either from the Node.js API or the command line flags.
Expand Down

0 comments on commit 649ee5d

Please sign in to comment.