-
-
Notifications
You must be signed in to change notification settings - Fork 22
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-plugin-sh: support .nvmrc files? #340
Comments
Is there a Or at least some example so that we can add some test cases? |
I don't think there's a formal spec, no. Parsing of For now,
Trailing https://github.com/JoshuaKGoldberg/create-typescript-app/blob/c91ce25e556f67ea321cd0df260a08569e71d8f8/.nvmrc is an example of a working file.
|
I'm not for sure to understand the user case here, this file is already lean enough to me? Is there any chance that can be not pretty? |
Extra newlines after the version are allowed:
Playing around with it a bit more, it looks like whitespace on the same line are being parsed as the version number. So those can't be removed. But the following are ignored:
So this is actually a totally valid
...now that I've played with this a bit more, maybe it deserves its own plugin? |
🤣 Still don't quite understand what's the text after first line does.
It's just valid, but not useful at all? Is there anyone really doing this? |
Haha yeah it's just ignored. I've never seen it in the wild and didn't even think to try it out until after we started talking! |
If you only want to trim, I think maybe it could be added, with a reference doc. Would you like to raise a PR? |
Coming over here from prettier/prettier#15898 (comment): I'd like to use
prettier-plugin-sh
to format.nvmrc
files. Given that the plugin supports similar files (gitignore
,dotenv
, ...), is this a reasonable use case for the plugin?The text was updated successfully, but these errors were encountered: