Skip to content

allow comments after style #258

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

Closed
basaran opened this issue Oct 22, 2021 · 5 comments
Closed

allow comments after style #258

basaran opened this issue Oct 22, 2021 · 5 comments

Comments

@basaran
Copy link

basaran commented Oct 22, 2021

Hello, thank you for this plugin. I have one small issue as it can be seen from the clip below. I like to make my code more beautiful by using comment blocks with nice ascii arts in place.

comments.mp4

When I save the file, svelte plugin's reordering mechanism kicks in and shifts Bart footer.

And it also effectively removes any spacing when such shift occurs.

comments.mp4

It would be better if there was a work around to handle comments blocks.

P.S I'm on sublime.

@Conduitry Conduitry transferred this issue from sveltejs/eslint-plugin-svelte3 Oct 22, 2021
@basaran
Copy link
Author

basaran commented Oct 22, 2021

I just noticed that :)

@Conduitry
Copy link
Member

I'm transferring this from the ESLint plugin repository to the Prettier plugin repository, because the ESLint plugin doesn't do any reordering like this.

@basaran
Copy link
Author

basaran commented Oct 22, 2021

I know, I was about to close but you acted too fast. Thank you.

@dummdidumm
Copy link
Member

I propose to introduce a new setting for svelteSortOrder called none which would prevent the plugin from reordering anything. This should handle the demands of all people who want more control over what to put where. Adding heuristics what to not reorder in which case sounds like a can of worms to me.

@dummdidumm
Copy link
Member

With #314 implemented you can chose svelteSortOrder: none which allows you to have comments anywhere you want without them being reordered - closing.

@dummdidumm dummdidumm closed this as not planned Won't fix, can't repro, duplicate, stale Oct 10, 2022
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

No branches or pull requests

3 participants