Skip to content

Conversation

Legend-Master
Copy link
Contributor

Closes #2406

This formats the operator to the start, similar to how we format rust files

Before:

  // return early if
  if (
    // event was prevented
    evt.defaultPrevented ||
    // or not a left click
    evt.button !== 0 ||
    // or meta key pressed
    evt.metaKey ||
    // or al key pressed
    evt.altKey
  )
    return

After:

  // return early if
  if (
    // event was prevented
    evt.defaultPrevented
    // or not a left click
    || evt.button !== 0
    // or meta key pressed
    || evt.metaKey
    // or al key pressed
    || evt.altKey
  )
    return

Prettier finally has this now and I would really like to use this option, but feel free to reject it if you guys don't like this styling

Use `experimentalOperatorPosition`
@Legend-Master Legend-Master requested a review from a team as a code owner February 15, 2025 03:21
Copy link

socket-security bot commented Feb 15, 2025

Updated dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] 🔁 npm/[email protected] None 0 7.88 MB prettier-bot

View full report↗︎

Copy link
Contributor

github-actions bot commented Feb 15, 2025

Package Changes Through 4c9ad4f

There are 2 changes which include log with patch, log-js with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
api-example 2.0.17 2.0.18
api-example-js 2.0.13 2.0.14
log 2.2.1 2.2.2
log-js 2.2.1 2.2.2

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@Legend-Master Legend-Master changed the title Update to prettier 3.5.1 and enable experimentalOperatorPosition chore: update prettier to 3.5.1 and enable experimentalOperatorPosition Feb 15, 2025
@Legend-Master Legend-Master merged commit c5da9d2 into tauri-apps:v2 Feb 16, 2025
33 checks passed
@Legend-Master Legend-Master deleted the prettier-operator-position-start branch February 16, 2025 02:36
gezihuzi pushed a commit to Hypobenthos/plugins-workspace that referenced this pull request Jun 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants