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

Relax pragma rules #48

Closed
sheepsteak opened this issue Aug 31, 2017 · 3 comments · Fixed by #113
Closed

Relax pragma rules #48

sheepsteak opened this issue Aug 31, 2017 · 3 comments · Fixed by #113

Comments

@sheepsteak
Copy link

At the moment the pragma has to be the first line and in the /** @yourPragma */ format. If it's used in a file with Flow it means you have to remember to put the Prettier one first.

This isn't a huge hassle but it caused me a few minutes of confusion as I thought I had things set up wrong. It would be nice if this plugin's pragma were more like Flow's and could be in either // @yourPragma or /** @yourPragma */ format and be anywhere in the file.

@not-an-aardvark
Copy link
Member

Seems reasonable to me.

@wbinnssmith
Copy link

I actually just got pragma functionality merged into prettier itself: prettier/prettier#2772. Right now it requires the docblock format (so no // @prettier), but they might be open to a similar issue over there. It currently uses jest's implementation of pragma parsing (more detail at that PR).

I filed a separate issue here to discuss this plugin's migration to the new core option at #54

BPScott added a commit that referenced this issue Sep 27, 2018
Prettier now provides native pragma support using @Format or @prettier
notation. Use that instead of our implementation

Fixes #48, Fixes #54
@BPScott BPScott mentioned this issue Sep 27, 2018
Merged
BPScott added a commit that referenced this issue Sep 27, 2018
Prettier now provides native pragma support using @Format or @prettier
notation. Use that instead of our implementation

Fixes #48, Fixes #54
not-an-aardvark pushed a commit that referenced this issue Oct 1, 2018
Prettier now provides native pragma support using @Format or @prettier
notation. Use that instead of our implementation

Fixes #48, Fixes #54
@BPScott
Copy link
Member

BPScott commented Oct 1, 2018

Closed as pragma functionality has been removed in favour of using prettier's native pragma support as of v3

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

Successfully merging a pull request may close this issue.

4 participants