You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 27, 2023. It is now read-only.
We only want to format our own code so we modify .prettierignore:
echo -e ".spago\noutput/" >> .prettierignore
Formatting
If you use VSCode then you can simply turn on format on save and you're good to go, if you want to manually format some files here's an example:
npx prettier --write src
Contributing
The project is split in two subpackages:
The core formatter in the packages/core folder
The prettier plugin in the packages/prettier-plugin-purescript folder
To work on the formatter add a test in packages/core/testfiles/original/ and run:
spago -x exe.dhall test
Then you should adjust the corresponding file in: packages/core/testfiles/golden/ to what you expect the output to be and start making changes in packages/core/src/Format.purs until all tests pass.
Run the tests often to get nice diffs:
51 passing
1 failed
1) Golden Tests formats Issue5.purs
"The diff is saved here: file:///tmp/testfiles-golden-Issue5.purs-actual.html"