From 10ee10ce56d5b7aaf642457bfb99b56a13d56ad6 Mon Sep 17 00:00:00 2001 From: Samuel Mannehed Date: Tue, 30 Apr 2024 15:25:03 +0200 Subject: [PATCH] Cleanup "no-console" eslint rules Removes unexpected exceptions and clarifies where we want to avoid console calls. --- eslint.config.mjs | 4 ++++ tests/test.browser.js | 1 - tests/test.deflator.js | 1 - tests/test.inflator.js | 1 - tests/test.int.js | 1 - 5 files changed, 4 insertions(+), 4 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index e3bfcd78a..c88e7b758 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -58,6 +58,7 @@ export default [ "asyncArrow": "always" }], "switch-colon-spacing": ["error"], "camelcase": ["error", { "allow": ["^XK_", "^XF86XK_"] }], + "no-console": ["error"], } }, { @@ -67,6 +68,9 @@ export default [ ...globals.node, } }, + rules: { + "no-console": 0, + }, }, { files: ["tests/*"], diff --git a/tests/test.browser.js b/tests/test.browser.js index 3b2299f63..1beeb48d5 100644 --- a/tests/test.browser.js +++ b/tests/test.browser.js @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ const expect = chai.expect; import { isMac, isWindows, isIOS, isAndroid, isChromeOS, diff --git a/tests/test.deflator.js b/tests/test.deflator.js index 12e8a46bf..a7e972ec0 100644 --- a/tests/test.deflator.js +++ b/tests/test.deflator.js @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ const expect = chai.expect; import { inflateInit, inflate } from "../vendor/pako/lib/zlib/inflate.js"; diff --git a/tests/test.inflator.js b/tests/test.inflator.js index 533bcd865..304e7a0fd 100644 --- a/tests/test.inflator.js +++ b/tests/test.inflator.js @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ const expect = chai.expect; import { deflateInit, deflate, Z_FULL_FLUSH } from "../vendor/pako/lib/zlib/deflate.js"; diff --git a/tests/test.int.js b/tests/test.int.js index 954fd279f..084d68abd 100644 --- a/tests/test.int.js +++ b/tests/test.int.js @@ -1,4 +1,3 @@ -/* eslint-disable no-console */ const expect = chai.expect; import { toUnsigned32bit, toSigned32bit } from '../core/util/int.js';