Skip to content

Commit 591e0f8

Browse files
authored
chore(logger): do not print debug infos to console (#16)
* chore(logger): do not print debug infos to console * chore(logger): fix linting
1 parent d40d372 commit 591e0f8

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

eslint.config.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ import jest from "eslint-plugin-jest"
66
export default [
77
{ files: ["**/*.{js,mjs,cjs,jsx}"] },
88
{
9+
settings: {
10+
react: {
11+
version: "detect",
12+
},
13+
},
914
languageOptions: {
1015
globals: {
1116
...globals.browser,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@andypf/json-viewer",
3-
"version": "2.1.6",
3+
"version": "2.1.7",
44
"description": "A javascript library to visualize json nicely",
55
"main": "dist/cjs/index.js",
66
"module": "dist/esm/index.js",

src/data-helpers.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ export const isUrl = (string) => {
33
try {
44
// Attempt to create a URL object from the input string
55
return Boolean(new URL(string)) // Return true if successful
6+
// eslint-disable-next-line no-unused-vars
67
} catch (error) {
7-
console.debug(error)
8+
// console.debug(error)
89
// If an error occurs (invalid URL), return false
910
return false
1011
}

src/validator.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ export const validateStringOrJson = (value) => {
4141
if (typeof value === "string") {
4242
try {
4343
return JSON.parse(value)
44+
// eslint-disable-next-line no-unused-vars
4445
} catch (error) {
45-
console.debug(error)
46+
// console.debug(error)
4647
return value
4748
}
4849
}

tests/__mocks__/styleMock.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { readFileSync } from "fs"
22
import { resolve } from "path"
33

4-
// eslint-disable-next-line no-undef
54
const cssText = readFileSync(resolve(__dirname, "../../src/styles.css"), "utf8")
65

76
export default cssText

0 commit comments

Comments
 (0)