Skip to content

[prettier-plugin-sh] requirePragma Option Not Respected #377

@Kenneth-Sills

Description

@Kenneth-Sills

None of the languages parsed by the sh plugin support prettier pragma directives, preventing the use of requirePragma.

Adding support would involve adding a hasPragma method with the signature (string) => boolean to the sh parser definition that is used by all added languages. It's probably "good enough" to parse the file, get the first statement, and check the first comment for the pragma content.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions