gicentre / prettier-plugin-elm Goto Github PK
View Code? Open in Web Editor NEWWorks on top of elm-format, compatible with Prettier v1, v2 and v3
License: BSD 3-Clause "New" or "Revised" License
Works on top of elm-format, compatible with Prettier v1, v2 and v3
License: BSD 3-Clause "New" or "Revised" License
Hi!
The Prettier team is currently working on v3(still alpha).
v3 will include breaking changes to the plugin interface.
Please see https://github.com/prettier/prettier/releases/tag/3.0.0-alpha.2 for more information.
I created this issue to help major plugins migrate to Prettier v3.
Myself and @fisker have created a migration guide which you can see here:
https://github.com/prettier/prettier/wiki/How-to-migrate-my-plugin-to-support-Prettier-v3%3F
If you have any questions, feel free to mention us. We can help you.
If you have already migrated to Prettier v3, sorry but please close this issue.
Is it there any way to set the configuration to 2-space tab like we did on prettier.config.js
?
In package.json
we have this:
"peerDependencies": {
"prettier": "^1.11.0"
},
No files in prettier-plugin-elm
require("prettier")
and prettier plugins are designed so that they cannot be misused when prettier is not installed. This suggests removing prettier from peerDependencies in future versions to avoid warnings when executing npm install --global prettier-plugin-elm
.
Release notes: https://github.com/avh4/elm-format/releases/tag/0.8.6
The plugin uses [email protected]
so we should update the dependency and release a new version.
Calling a bult-in elm-format
binary fails when prettier-plugin-elm
is installed globally. We need a slightly improved search mechanism for node_modules/.bin/elm-format
in order to fix this. A temporary workaround involves installing elm-format
in parallel to the plugin:
npm install --global prettier-plugin-elm elm-format
## or
yarn global add prettier-plugin-elm elm-format
(or elm-format@exp
)
I get
Cannot read properties of undefined (reading 'parsers')
when I run
prettier --check Main.elm --plugin=prettier-plugin-elm
P.S. I can't get it to work in the VSCode either.
Release notes: https://github.com/avh4/elm-format/releases/tag/0.8.7
Relevant upstream PR: avh4/elm-format#816
I’ll try to find time on updating elm-format
over the weekend, unless someone wants to create a PR before then. Suggested version bump: v0.10.0
→ v0.11.0
.
My current thinking is that we’ll release [email protected]
in sync with [email protected]
. There exists a corresponding upstream milestone. Until then, we can stick with ZeroVer 🙂
I've installed VS Code with prettier and this prettier-plugin-elm and I can't figure out why only the text parts of my markdown document are formatted on save, and not the elm code blocks. Is there a way I could diagnose what is wrong? (I'm not a VS Code user)
elm version: 0.19.1
npm version: 6.14.11
vs code version: 1.61.2
prettier version: 2.3.2
prettier-plugin-elm version: ? don't know how to check, I guess the latest one.
vs code prettier extension: 9.0.0
Hi!
In our project, elm-format
is installed as a nix
package. This means that in nix-shell
we need to be able to run the instance of elm-format
provided by nix
instead of the one installed by prettier-plugin-elm
as a dependency. We'd like to have a way of configuring this behavior. Not sure what the best way would be for passing in configuration, maybe through an environment variable: PRETTIER_PLUGIN_ELM_PREFER_LOCAL=false
? Currently we solve this problem through a fork, but it would be nice to have this supported in the official package. Would you accept a PR for this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.