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 2.3.0 appears incompatible with prettier-plugin-eex #51

Open
elliottneilclark opened this issue May 16, 2021 · 6 comments
Open

Comments

@elliottneilclark
Copy link

I recently upgraded a project from prettier 2.2.1 to 2.3.0 and when I did that all my eex files were reformatted. Reverting back to 2.2.1 from 2.3.0 gets everything to work again.

I've tested with 0.5.0 and 1.11.4 otp23 and otp24. All produce the same eext1 most elixir content in eex files.

I suspect that #43 is failing all the CI checks for the same problems and likely #50 is the same since the versions match. The work around for me was to downgrade to prettier 2.2.1 and npm install and formatting worked again.

@adamzapasnik
Copy link
Owner

hey @elliottneilclark Thanks for submitting the issue.
Yes, the problem is related to the new prettier version. For now you have to keep 2.2.x. Sorry for the trouble.

@semanticart
Copy link

I'm able to reproduce this with this minimal testcase in prettier 2.2.1

bash-5.1$ prettier --version
2.2.1
bash-5.1$ cat /tmp/out.html.leex
<textarea>
  <%= @something %>
</textarea>
bash-5.1$ prettier /tmp/out.html.leex
<textarea>
   <eext1 />
</textarea>

@brianmay
Copy link

@semanticart I have seen this happen with prettier 2.2.1 and it was the result of something else I did wrong. Sorry, I can't remember what now - I should have made a mental note. But I would double check the plugin is correctly installed and can be found.

@brianmay
Copy link

brianmay commented Aug 4, 2021

What needs to be done to get this plugin to work with the recent versions of prettier?

@zachdtaylor
Copy link

I just tried installing prettier 2.2.1 and I still get the <eext1 /> output. Any update on this?

@arashout
Copy link

I have the same issue. Installed prettier through npm
npm install prettier prettier-plugin-eex
My package.lock

{
  "requires": true,
  "lockfileVersion": 1,
  "dependencies": {
    "prettier": {
      "version": "2.4.1",
      "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.4.1.tgz",
      "integrity": "sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA=="
    },
    "prettier-html-templates": {
      "version": "0.1.0",
      "resolved": "https://registry.npmjs.org/prettier-html-templates/-/prettier-html-templates-0.1.0.tgz",
      "integrity": "sha512-KdLveYzO2kJLiwUAebd5UFeKP8h3OqFhOiLbkgeIuS1WNoCRTyxW4KuyGfbh3F+Rp/2A6mipRxCq2zPi+//pmg=="
    },
    "prettier-plugin-eex": {
      "version": "0.5.0",
      "resolved": "https://registry.npmjs.org/prettier-plugin-eex/-/prettier-plugin-eex-0.5.0.tgz",
      "integrity": "sha512-2XJOnvg/wk0GkNscOyjom9uC1H5s7iX8vJVtMwL8eoVYd1CTf6/sy+9D02EZB1pixf2ilIvtu1sPECEQZgn4Fw==",
      "requires": {
        "prettier-html-templates": "^0.1.0"
      }
    }
  }
}

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

No branches or pull requests

6 participants