Skip to content
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] requirePragma Option Not Respected #377

Open
Kenneth-Sills opened this issue Jul 24, 2024 · 0 comments · May be fixed by #378
Open

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

Kenneth-Sills opened this issue Jul 24, 2024 · 0 comments · May be fixed by #378

Comments

@Kenneth-Sills
Copy link

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.

Kenneth-Sills added a commit to Kenneth-Sills/un-ts-prettier-plugins that referenced this issue Jul 25, 2024
@Kenneth-Sills Kenneth-Sills linked a pull request Jul 25, 2024 that will close this issue
Kenneth-Sills added a commit to Kenneth-Sills/un-ts-prettier-plugins that referenced this issue Aug 29, 2024
Kenneth-Sills added a commit to Kenneth-Sills/un-ts-prettier-plugins that referenced this issue Aug 29, 2024
Kenneth-Sills added a commit to Kenneth-Sills/un-ts-prettier-plugins that referenced this issue Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant