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

🐛 useArrowFunction repair of syntax exceptions caused #1502

Closed
1 task done
noyobo opened this issue Jan 10, 2024 · 0 comments · Fixed by #1507
Closed
1 task done

🐛 useArrowFunction repair of syntax exceptions caused #1502

noyobo opened this issue Jan 10, 2024 · 0 comments · Fixed by #1507
Assignees
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

@noyobo
Copy link

noyobo commented Jan 10, 2024

Environment information

CLI:
  Version:                      1.5.0
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           macos

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.9.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/10.1.0"

Biome Configuration:
  Status:                       unset

Workspace:
  Open Documents:               0

What happened?

const style = [['a', 1], ['b', 2]].reduce(function (res, cur) {
  return (res[cur[0]] = cur[1]), res;
}, {});

after check --apply

const style = [['a', 1], ['b', 2]].reduce((res, cur) => (res[cur[0]] = cur[1]), res, {});

Expected result

const style = [['a', 1], ['b', 2]].reduce((res, cur) => ((res[cur[0]] = cur[1]), res), {});

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@noyobo noyobo changed the title 🐛 useArrowFunction repair of syntax exceptions caused by 🐛 useArrowFunction repair of syntax exceptions caused Jan 10, 2024
@Conaclos Conaclos self-assigned this Jan 10, 2024
@Conaclos Conaclos 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 Jan 10, 2024
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

Successfully merging a pull request may close this issue.

2 participants