Skip to content

Commit

Permalink
fixup! Feat(common): Introduce info and warning utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
literat committed Jan 5, 2024
1 parent 55ff16b commit 3f4b632
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
5 changes: 3 additions & 2 deletions packages/common/utilities/__tests__/warning.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// we are testing Console function
/* eslint-disable no-console */
/* eslint-disable no-console --
* we are testing Console function
*/
import warning from '../warning';

describe('warning', () => {
Expand Down
5 changes: 1 addition & 4 deletions packages/common/utilities/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ const info = (condition: unknown, message: string): void => {
// Condition not passed
const text = `Info: ${message}`;

// check console for IE9 support which provides console
// only with open devtools
if (typeof console !== 'undefined') {
// we want to log a warning; so usage of Console is required
// eslint-disable-next-line no-console
// eslint-disable-next-line no-console -- we want to log a warning; so usage of Console is required
console.info(text);
}
}
Expand Down
2 changes: 0 additions & 2 deletions packages/common/utilities/warning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ const warning = (condition: unknown, message: string): void => {
// Condition not passed
const text = `Warning: ${message}`;

// check console for IE9 support which provides console
// only with open devtools
if (typeof console !== 'undefined') {
// we want to log a warning; so usage of Console is required
// eslint-disable-next-line no-console
Expand Down

0 comments on commit 3f4b632

Please sign in to comment.