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(lint/useArrowFunction): enclose with parens when needed #1527

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

Conaclos
Copy link
Member

Summary

Fix #1524

Test Plan

New tests dded.

Copy link

netlify bot commented Jan 11, 2024

Deploy Preview for biomejs ready!

Name Link
🔨 Latest commit f77b526
🔍 Latest deploy log https://app.netlify.com/sites/biomejs/deploys/65a01c8c5a7272000864722a
😎 Deploy Preview https://deploy-preview-1527--biomejs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (🟢 up 21 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 93 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added A-Linter Area: linter A-Website Area: website L-JavaScript Language: JavaScript and super languages A-Changelog Area: changelog labels Jan 11, 2024
@Conaclos Conaclos force-pushed the conaclos/lint/useArrowFunction/1524 branch from 8e0d86b to 95ccfb0 Compare January 11, 2024 12:41
Copy link

codspeed-hq bot commented Jan 11, 2024

CodSpeed Performance Report

Merging #1527 will not alter performance

⚠️ No base runs were found

Falling back to comparing conaclos/lint/useArrowFunction/1524 (f77b526) with main (2c77ade)

Summary

✅ 93 untouched benchmarks

function_expression.syntax().parent().is_some_and(|parent| {
// Copied from the implementation of `NeedsParentheses` for `JsArrowFunctionExpression`
// in the `biome_js_formatter` crate.
// TODO: Should `NeedsParentheses` be moved in `biome_js_syntax`?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reply to the TODO: since the logic is the same, I think so

@Conaclos Conaclos force-pushed the conaclos/lint/useArrowFunction/1524 branch 2 times, most recently from cf8cbd5 to f77b526 Compare January 11, 2024 16:51
@Conaclos Conaclos merged commit 2c77ade into main Jan 11, 2024
9 of 10 checks passed
@Conaclos Conaclos deleted the conaclos/lint/useArrowFunction/1524 branch January 11, 2024 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-Linter Area: linter A-Website Area: website L-JavaScript Language: JavaScript and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 useArrowFunction exception in operator expression ?
2 participants