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

💅 Using unsafe fix triggers an infinite cycle! #4907

Open
1 task done
ElrohirGT opened this issue Jan 17, 2025 · 3 comments
Open
1 task done

💅 Using unsafe fix triggers an infinite cycle! #4907

ElrohirGT opened this issue Jan 17, 2025 · 3 comments
Labels
S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@ElrohirGT
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-ghostty"
  JS_RUNTIME_VERSION:           "v22.12.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "pnpm/9.15.3"

Biome Configuration:
  Status:                       unset

Workspace:
  Open Documents:               0

Rule name

useNamingConvention and noUnusedVariables

Playground link

https://github.com/ElrohirGT/biome-repro-1737140798250

Expected result

I've been using biome and loving it on almost all my JS/TS projects.

When I tried to use it on a really big repo with a lot of rules generated the biome migration command it generated a lot of errors, some were fixable others unsafe to fix but I wanted to try it anyways. After running biome lint --fix --unsafe . it stayed running for more than a second, something is wrong, I waited 10s and it still didn't finish.

After reviewing my configuration I can say it isn't related to trying to lint node_modules and after running biome with the debug log level I can see that 2-3 filenames were appearing repedeately! As far as I can tell is because of the interactions between those two rules but it may well be another thing.

I expected biome to finish executing and to unsafely fix the rules.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@ElrohirGT ElrohirGT added the S-Needs triage Status: this issue needs to be triaged label Jan 17, 2025
@dyc3 dyc3 added the S-Bug-confirmed Status: report has been confirmed as a valid bug label Jan 17, 2025
@github-actions github-actions bot removed the S-Needs triage Status: this issue needs to be triaged label Jan 17, 2025
@dyc3
Copy link
Contributor

dyc3 commented Jan 17, 2025

That config is quite big. Would you be able to reduce it to create a minimal reproduction? Ideally, it should be pretty clear from the repro which rule is causing the loop.

@dyc3 dyc3 added the S-Needs response Status: await response from OP label Jan 17, 2025
@ElrohirGT
Copy link
Author

I'll give it a try! I'll post a coment here once I get it working with a minimal config

@ElrohirGT
Copy link
Author

Done! Now the biome.json contains only 2 rules!

@dyc3 dyc3 removed the S-Needs response Status: await response from OP label Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

No branches or pull requests

2 participants