Add no-console eslint rule (#1890)

* Add no-console eslint rule

* Remove unused test
This commit is contained in:
Charles Bochet
2023-10-05 21:16:02 +02:00
committed by GitHub
parent 922f8eca0e
commit 07450df1a1
24 changed files with 69 additions and 212 deletions

View File

@ -1,6 +1,8 @@
import { Profiler } from 'react';
import { Interaction } from 'scheduler/tracing';
import { logDebug } from '~/utils/logDebug';
type OwnProps = {
id: string;
children: React.ReactNode;
@ -16,7 +18,7 @@ export const TimingProfiler = ({ id, children }: OwnProps) => {
commitTime: number,
interactions: Set<Interaction>,
) => {
console.debug(
logDebug(
'TimingProfiler',
JSON.stringify(
{

View File

@ -1,6 +1,8 @@
import { Hotkey } from 'react-hotkeys-hook/dist/types';
import { useRecoilCallback } from 'recoil';
import { logDebug } from '~/utils/logDebug';
import { internalHotkeysEnabledScopesState } from '../states/internal/internalHotkeysEnabledScopesState';
const DEBUG_HOTKEY_SCOPE = true;
@ -27,7 +29,7 @@ export const useScopedHotkeyCallback = () =>
if (!currentHotkeyScopes.includes(scope)) {
if (DEBUG_HOTKEY_SCOPE) {
console.debug(
logDebug(
`%cI can't call hotkey (${
hotkeysEvent.keys
}) because I'm in scope [${scope}] and the active scopes are : [${currentHotkeyScopes.join(
@ -41,7 +43,7 @@ export const useScopedHotkeyCallback = () =>
}
if (DEBUG_HOTKEY_SCOPE) {
console.debug(
logDebug(
`%cI can call hotkey (${
hotkeysEvent.keys
}) because I'm in scope [${scope}] and the active scopes are : [${currentHotkeyScopes.join(