Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove console.log from code and enforce ESLint rule #3949

Open
saschaszott opened this issue Feb 4, 2025 · 2 comments
Open

Remove console.log from code and enforce ESLint rule #3949

saschaszott opened this issue Feb 4, 2025 · 2 comments
Labels
bug code task help wanted Needs a volunteer to claim to move forward

Comments

@saschaszott
Copy link
Contributor

saschaszott commented Feb 4, 2025

Description

Currently, there are three occurrences of console.log in the codebase that should be removed:

Additionally, to prevent console.log from being introduced in the future, an ESLint rule "no-console": "error" should be added to enforce this convention.

@saschaszott saschaszott added bug needs triage New issue needs triage and/or scheduling labels Feb 4, 2025
@github-project-automation github-project-automation bot moved this to 🆕 Triage in DSpace Backlog Feb 4, 2025
@tdonohue
Copy link
Member

tdonohue commented Feb 4, 2025

@saschaszott : I agree with this entirely. If you find time to create a PR, I'd gladly review it. Plus, the ESlint rule would help immensely in ensuring we don't accidentally add more console.log statements in the future.

@tdonohue tdonohue removed this from DSpace Backlog Feb 4, 2025
@tdonohue tdonohue added help wanted Needs a volunteer to claim to move forward code task and removed needs triage New issue needs triage and/or scheduling labels Feb 4, 2025
@alanorth
Copy link
Contributor

I was surprised to find that we already use the ESLint "no-console" rule, but log is allowed:

https://github.com/DSpace/dspace-angular/blob/main/.eslintrc.json#L70-L74

There are many more instances of console.log() that are for debugging purposes during build etc, so it seems we will need to update this ESLint configuration with some exceptions or change those to console.warn() or info...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug code task help wanted Needs a volunteer to claim to move forward
Projects
Development

No branches or pull requests

3 participants