Skip to content

Commit 685faef

Browse files
authored
Merge pull request #7179 from Shopify/remove-debug-dep
Remove debug dependency from eslint-plugin-cli
2 parents db91987 + f0708ae commit 685faef

3 files changed

Lines changed: 3 additions & 8 deletions

File tree

packages/eslint-plugin-cli/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
"eslint-plugin-unused-imports": "4.1.4",
3030
"@vitest/eslint-plugin": "1.1.44",
3131
"globals": "16.2.0",
32-
"execa": "7.2.0",
33-
"debug": "4.4.0"
32+
"execa": "7.2.0"
3433
},
3534
"devDependencies": {
3635
"prettier": "3.8.1"

packages/eslint-plugin-cli/rules/no-inline-graphql.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
const path = require('path')
33
const fs = require('fs')
44
const crypto = require('crypto')
5-
const debug = require('debug')('eslint-plugin-cli:no-inline-graphql')
5+
const debugEnabled = process.env.DEBUG && process.env.DEBUG.includes('eslint-plugin-cli')
66

77
/**
88
* Check if using a gql`` template literal
@@ -38,7 +38,7 @@ function checkKnownFailuresIfShouldFail(context) {
3838
const shouldFail = !knownFailures[relativePath] || knownFailures[relativePath] !== fileHash
3939

4040
if (shouldFail) {
41-
debug(`Reporting inline GraphQL tag fail for - '${relativePath}': '${fileHash}',`)
41+
if (debugEnabled) console.error(`eslint-plugin-cli:no-inline-graphql Reporting inline GraphQL tag fail for - '${relativePath}': '${fileHash}',`)
4242
}
4343

4444
return shouldFail

pnpm-lock.yaml

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)