Skip to content

.env.something files not correctly formatted #388

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

Open
astorije opened this issue Sep 19, 2024 · 5 comments
Open

.env.something files not correctly formatted #388

astorije opened this issue Sep 19, 2024 · 5 comments
Labels
enhancement New feature or request upstream

Comments

@astorije
Copy link

Using version 0.14.0:

"prettier-plugin-sh": "0.14.0",

And a dotenv file containing:

VITE_API_BASE_URL=      /api

The plugin will correctly format it if named .env but not .env.development.

I wonder if https://github.com/un-ts/prettier/blob/master/scripts/languages.ts#L23-L28 must be split into 2 objects, one for filenames and one for extensions, i.e. is it a logical OR or a logical AND?

@JounQin
Copy link
Member

JounQin commented Feb 20, 2025

I'm not quite sure whether it is a logical OR or a logical AND.

cc @fisker

@fisker
Copy link

fisker commented Feb 20, 2025

I don't think prettier supports glob pattern at all.

@JounQin
Copy link
Member

JounQin commented Feb 20, 2025

I don't think prettier supports glob pattern at all.

Ah, that's a pity. Maybe either glob or regexp should be supported.

@fisker
Copy link

fisker commented Feb 20, 2025

Function maybe a better idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request upstream
Projects
None yet
Development

No branches or pull requests

3 participants