# Adding a formatter for CSS & JS

**URL:** <https://forum.djangoproject.com/t/adding-a-formatter-for-css-js/25754>\
**Category:** Django Internals\
**Created:** [November 29, 2023, 7:25pm UTC](https://forum.djangoproject.com/t/adding-a-formatter-for-css-js/25754 "2023-11-29T19:25:46Z")\
**Posts on this page:** 1\
**Showing post:** 18

<div class="post-metadata">

**Author:** ![tom](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/tom/32/6818_2.png) [@tom](https://forum.djangoproject.com/u/tom)\
**Post date:** [July 12, 2024, 9:15am UTC](https://forum.djangoproject.com/t/adding-a-formatter-for-css-js/25754/18 "2024-07-12T09:15:14Z")

</div>

Okay, so I’ve made a start on this, and have a working configuration.

The problem comes with adding this to pre-commit, which has recently [archived the prettier mirror](https://github.com/pre-commit/mirrors-prettier) apparently because prettier has broken the ability to use it.

Prettier itself provides [some pre-commit options](https://prettier.io/docs/en/precommit.html) but it would be the first time for us adding something like this.

Of the options available…

Option 1, `lint-staged` with `husky` seems reasonable and wouldn’t add too much extra.

Option 2 requires .NET so seems a non-starter.

Option 3 seems okay but is confusing to me.

Option 4 also looks like a non-starter because it lives in the .git directory and can’t be version controlled.

Are there any objections to going with their option 1 here? I don’t really want to have another tool for managing pre-commit hooks, especially when pre-commit is supposed to be able to do everything… but if it can’t, then… I am not sure what good alternative there is.

P.S. looking at [Issue with pretier 4.0.0@alpha3 and pre-commit · Issue #15742 · prettier/prettier · GitHub](https://github.com/prettier/prettier/issues/15742) it seems like the pre-commit mirror should still work, the issue that caused the archival was only temporary, so I suppose if someone forked this and updated it, it could be used. Sadly based on his past behaviour I don’t think we can rely on Anthony unarchiving the project any time soon (or ever).

---

_[View the full topic](https://forum.djangoproject.com/t/adding-a-formatter-for-css-js/25754)._
