Skip to content

Formatting .mongo files #6769

@aymericbouzy

Description

@aymericbouzy

I'm trying to format .mongo files in VS Code using prettier/prettier-vscode extension as explained in my PR prettier/prettier-vscode#1009

Here is an example of a .mongo file (it is valid javascript) :

db.users.find({ someField: { $exists: true } });

These files are created by Azure Cosmos DB, an extension for VS Code. Renaming them to .js files doesn't work for me, because then I cannot run the query to the DB, it only works for files with the extension .mongo.

VS Code seems to treat mongo as a different language from javascript or typescript. I would love to open a PR to add support for .mongo files in Prettier : can someone give me a general direction? I'm new to the Prettier codebase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.type:editor supportIssues about tools Prettier provides for use inside editor integrations.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions