jupyterlite / jupyterlite-sphinx

Sphinx extension using JupyterLite to render Notebooks
https://jupyterlite-sphinx.readthedocs.io/en/latest
BSD 3-Clause "New" or "Revised" License
68 stars 21 forks source link

Suggestion: Add pre-commit to format js and css files. #137

Closed Carreau closed 8 months ago

Carreau commented 9 months ago

I don't believe most of us know the current conventions and have the tooling installed. So it might be a good thing to have a consistent style.

If we do this we can also add pre-commit-ci so that PR are automatically updated. I'm generally not a fan of pre-commit hooks in general and pre commit-ci as it either can take forcer before you can already commit, or also when CI push on the PR, prevent pushing before pulling which can be annoying for contributor. So either choice is good for me.

Carreau commented 8 months ago

Any thought on this ? I keep forgetting it's not using prettier, and my editor keep reformatting the whole file, so I would to either get that in, or know it won't so I can look into configuring my system to not format JS only on this project.

jtpio commented 8 months ago

Sounds good, thanks!

As a follow-up, maybe we can also enable pre-commit CI for the repo?

Carreau commented 8 months ago

Yes, +1 on pre-commit-ci, it slightly annoying sometime when it pushed and you need to pull/push, but I think it's better in most cases.

Carreau commented 8 months ago

Ok, let's get that in. I'll add pre-commit-ci later.