-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Prettier 1.4 deletes shebang #1890
Closed
Labels
locked-due-to-inactivity
Please open a new issue and fill out the template instead of commenting.
type:bug
Issues identifying ugly output, or a defect in the program
Comments
@josephfrazier, looks like your shebang fixed broke it :( |
Minimal repro: $ cat x.js
#!/usr/bin/env node
'use strict';
var x = 42;
$ ./node_modules/.bin/prettier x.js
"use strict";
var x = 42; |
vjeux
added
the
type:bug
Issues identifying ugly output, or a defect in the program
label
Jun 2, 2017
var prettier = require("prettier")
prettier.format(`#!/usr/bin/env node
'use strict';
var x = 42;`)
EDIT: Aha, it's var prettier = require("prettier")
prettier.formatWithCursor(`#!/usr/bin/env node
'use strict';
var x = 42;`).formatted
|
josephfrazier
added a commit
to josephfrazier/prettier
that referenced
this issue
Jun 2, 2017
This fixes prettier#1890, albeit in a quick-and-dirty way. Note also that the cursor offset may be incorrect when there is a shebang, but that's a separate issue.
vjeux
pushed a commit
that referenced
this issue
Jun 2, 2017
This fixes #1890, albeit in a quick-and-dirty way. Note also that the cursor offset may be incorrect when there is a shebang, but that's a separate issue.
I just published 1.4.1 which fixes it! |
This was referenced Jun 2, 2017
lock
bot
added
the
locked-due-to-inactivity
Please open a new issue and fill out the template instead of commenting.
label
Jul 7, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
locked-due-to-inactivity
Please open a new issue and fill out the template instead of commenting.
type:bug
Issues identifying ugly output, or a defect in the program
I have a file in which Prettier deleted the
#!/usr/bin/env node
shebang line.I'm not sure what more info you need to diagnose this, please let me know what else I can provide!
The text was updated successfully, but these errors were encountered: