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

'worklet' designation incorrectly formatted #209

Closed
1 task
ljukas opened this issue Feb 15, 2023 · 3 comments
Closed
1 task

'worklet' designation incorrectly formatted #209

ljukas opened this issue Feb 15, 2023 · 3 comments

Comments

@ljukas
Copy link

ljukas commented Feb 15, 2023

Your Environment

  • Prettier version: 2.8.4
  • node version 18.9:
  • package manager: yarn@2
  • IDE: vscode

Describe the bug

Using v4 of this package moves 'worklet' designation wrongly to the top of the file.

'worklet' is used in react-native-reanimated to show that that function should run on the UI thread instead of the JS thread. See example.

image

To Reproduce

Formatting using version 4 with the following config

image

Moves 'worklet' designation away from the function and to the top of the file as an import wrongly in 50% of the cases. I dont know why it happens in certain cases.

Downgrading to 3.3.0 fixes this issue.

Expected behavior

I expect it to not move the 'worklet' designation at all.

Error log

No error logs can be linked since its not an error, it successfully formats it incorrectly.

Contribute to @trivago/prettier-plugin-sort-imports

  • I'm willing to fix this bug 🥇
@ayusharma
Copy link
Collaborator

This is something new to me. 😄 It requires some investigation.

@c-dante
Copy link
Contributor

c-dante commented Feb 25, 2023

Patched with #198

@ayusharma
Copy link
Collaborator

Thank you for the notification @c-dante. I am closing this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants