Skip to content

Commit

Permalink
add: warning console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele-mng authored and bjoernricks committed Jan 7, 2025
1 parent de1eb58 commit 050bb77
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ export default [
'no-prototype-builtins': 'off',
'no-case-declarations': 'off',
'react-hooks/exhaustive-deps': 'warn',
'no-console': [
'warn',
{
allow: ['warn', 'error', 'info'],
},
],
'header/header': [
2,
'block',
Expand Down
1 change: 1 addition & 0 deletions src/gmp/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class Logger {
logValue < newLogValue
? noop
: (...args) => {
// eslint-disable-next-line no-console
return console[logName](
'%c' + this.name,
'color: ' + GREENBONE_GREEN,
Expand Down
1 change: 1 addition & 0 deletions src/gmp/models/__tests__/schedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ describe('Schedule model tests', () => {
});

test('should handle invalid ical data safely', () => {
// eslint-disable-next-line no-console
const consoleError = console.log;
const errorLog = testing.fn();

Expand Down

0 comments on commit 050bb77

Please sign in to comment.