Open psankhe28 opened 2 weeks ago
Thanks for this contribution @psankhe28. Before I review, I just want to make sure - does this PR also remove garbage console.log
statements and convert relevant ones to console.debug
, console.error
, etc.?
Thanks for this contribution @psankhe28. Before I review, I just want to make sure - does this PR also remove garbage
console.log
statements and convert relevant ones toconsole.debug
,console.error
, etc.?
It removes all console.log and allows console.debug, error etc.
I'm not sure you understood my question. In at least 8 files (they're actually highlighted by GitHub in the "Files changed" tab), there are still console.log
statements that will be errors if we merge this code. This issue asks contributors to remove garbage statements (e.g., on line 14 in src/layout/Screenshottable.jsx
) and to transfer relevant ones (e.g., line 69 in src/api/parameters.js
) to either console.error
or console.debug
. This is also why the GitHub Actions that run now fail - there's like 20 statements that fail this added linting rule.
I'm not sure you understood my question. In at least 8 files (they're actually highlighted by GitHub in the "Files changed" tab), there are still
console.log
statements that will be errors if we merge this code. This issue asks contributors to remove garbage statements (e.g., on line 14 insrc/layout/Screenshottable.jsx
) and to transfer relevant ones (e.g., line 69 insrc/api/parameters.js
) to eitherconsole.error
orconsole.debug
. This is also why the GitHub Actions that run now fail - there's like 20 statements that fail this added linting rule.
I think so I misunderstood the requirement. I will look into it again.
That's alright. The approach you took was good - we are looking to do what you did - just to also modify those existing statements.
Description
1665
Changes
The no-console linting rule in ESLint discourages or prevents the use of console.log statements in your JavaScript codebase while allowing the use of other console methods like console.error, console.warn, console.info, and console.table.
Screenshots
I have tested it on a file called test.js and test1.js.
Output:
Tests
17/17 passed