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

fix(linter): report no-console when the globals.console is off #9138

Conversation

Sysix
Copy link
Collaborator

@Sysix Sysix commented Feb 15, 2025

It feels like looking into the globals is the right choice.
Then we should report only when console is defined in globals, or in envs browser, node, (service-)worker, ....

I do not think the original rule looks into the globals:
https://eslint.org/docs/latest/rules/no-console

@github-actions github-actions bot added A-linter Area - Linter C-bug Category - Bug labels Feb 15, 2025
Copy link
Collaborator Author

Sysix commented Feb 15, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Sysix Sysix marked this pull request as ready for review February 15, 2025 13:11
Copy link

codspeed-hq bot commented Feb 15, 2025

CodSpeed Performance Report

Merging #9138 will not alter performance

Comparing 02-15-fix_linter_report_no-console_when_the_globals.console_is_off_ (23d0d95) with main (3576318)

Summary

✅ 33 untouched benchmarks

Copy link

graphite-app bot commented Feb 15, 2025

Merge activity

@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Feb 15, 2025
…9138)

It feels like looking into the globals is the right choice.
Then we should report only when `console` is defined in `globals`, or in envs `browser, node, (service-)worker, ...`.

I do not think the original rule looks into the globals:
https://eslint.org/docs/latest/rules/no-console
@graphite-app graphite-app bot force-pushed the 02-15-fix_linter_report_no-console_when_the_globals.console_is_off_ branch from 7f21955 to 23d0d95 Compare February 15, 2025 15:04
@graphite-app graphite-app bot merged commit 23d0d95 into main Feb 15, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 02-15-fix_linter_report_no-console_when_the_globals.console_is_off_ branch February 15, 2025 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0-merge Merge with Graphite Merge Queue A-linter Area - Linter C-bug Category - Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants