Skip to content
Snippets Groups Projects
user avatar
Mark Bastian authored
* Adding linter and formatter to staged BE files.

Note that `.cljfmt/indents.clj` tries to capture our indent rules
and, so far, seems to get things right. There are still some inconsistencies
in some of our nses in how we indent assoc(-in) and some t2 functions
when it comes to key-value pairs on following lines. Should the keys
align with the function call or be indented. Aesthetically, people
seem to like indents, but these are functions, so should align with the
first argument. IDK that it really matters as long as we have agreement.

We may, as we adopt this, have some files be reformatted in unexpected ways
for items that have been missed. If so, the developer can simply update
the .cljfmt/indents.clj file, rerun the hook, and commit that along with
their other changes.

* Added whitespace linter.

* Updating husky commit hook

* Updated hook scripts to be exclusively for staged files.

Updated cljfmt to use the latest and greatest along with the new format of config file.

* Commenting out the actual formatting hook in .husky/pre-commit until we come up with a globally happy solution to forms that don't have good formatting rules, like defprotocol+ in a reader conditional.

* Reverting formatting

* Moving pre-commit hooks from .husky/pre-commit to the package.json's lint-staged section.

Note that we're still not calling the cljfmt file (.bin/cljfmt_staged.sh)
until we get agreement on formatting.

One thing we might do since we're using lint-staged is we can probably
exclude the "bad" files that go sideways with linting and format everything
else automatically. This might be a good follow-on PR.
d4957af1
History
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Name Last commit Last update
..
.gitignore
pre-commit