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

🐛 noConsole not reporting when using console in arrow function #5053

Open
1 task done
AdriVanHoudt opened this issue Feb 7, 2025 · 0 comments
Open
1 task done
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@AdriVanHoudt
Copy link

Environment information

CLI:
  Version:                      1.9.4
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v22.13.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/10.9.2"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 false

Workspace:
  Open Documents:               0

What happened?

Something as simple as

[].forEach(() => console.log("test"))

doesn't trigger the noConsole rule.

https://biomejs.dev/playground/?lintRules=all&code=WwBdAC4AZgBvAHIARQBhAGMAaAAoACgAKQAgAD0APgAgAGMAbwBuAHMAbwBsAGUALgBsAG8AZwAoACIAdABlAHMAdAAiACkAKQAKAAoAYwBvAG4AcwB0ACAAeAAgAD0AIAAoACkAIAA9AD4AIABjAG8AbgBzAG8AbABlAC4AbABvAGcAKAAiAHQAZQBzAHQAIgApAA%3D%3D

Expected result

It creates a diagnostic for the noConsole rule

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@AdriVanHoudt AdriVanHoudt added the S-Needs triage Status: this issue needs to be triaged label Feb 7, 2025
@ematipico ematipico added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug labels Feb 7, 2025
@github-actions github-actions bot removed the S-Needs triage Status: this issue needs to be triaged label Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Linter Area: linter L-JavaScript Language: JavaScript and super languages S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

No branches or pull requests

2 participants