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

[BUG] [Formatter] Conflict with prettier #835

Closed
3 tasks done
Lithimlin opened this issue May 22, 2024 · 2 comments
Closed
3 tasks done

[BUG] [Formatter] Conflict with prettier #835

Lithimlin opened this issue May 22, 2024 · 2 comments
Labels
🦠 bug Something isn't working 🧽 formatter

Comments

@Lithimlin
Copy link

System Info

N/A

Issue

I'm using trunk check to lint and format my files.
One of the formatters I use is prettier.
However, it conflicts with djlint when formatting.
Is it possible to turn off the formatter or make it compatible with prettier?

How To Reproduce

  1. Install trunk
  2. Enable prettier and djlint
  3. Try to format an HTML file (using trunk fmt)
@Lithimlin Lithimlin added 🦠 bug Something isn't working 🧽 formatter labels May 22, 2024
@monosans
Copy link
Member

Hi. We are not aiming for prettier-like formatting. As for trunk, this problem is not related to djLint, but to trunk itself. So you either need to set up trunk or create an issue in their repository.

@monosans monosans closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2024
@sshishov
Copy link

sshishov commented Jul 7, 2024

I also thinking that for 1 type of file, in this case *.html the auto-formatter should use only one notation and not both at the same time. In this case you cannot have a conflict.

prettier usually used for HTLM, JS, CSS and other fe-related fields format. djlint, on the other hand, is used to format jinja-like html template file with Django related context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦠 bug Something isn't working 🧽 formatter
Projects
None yet
Development

No branches or pull requests

3 participants