plone / cookieplone-templates

Plone templates used with cookieplone
MIT License
0 stars 0 forks source link

How to use pre-commit / husky / plone/meta in a monorepo #5

Open ericof opened 2 months ago

ericof commented 2 months ago

Nowadays we have two different approaches to lint/formatting backend codebases:

We want to unify this behavior, but:

So, we should discuss how to solve this

ericof commented 2 months ago

Article about a tool that would allow us to use pre-commit with a monorepo.

ericof commented 2 months ago

@gforcada, @fredvd

fredvd commented 2 months ago

We discussed this at the Beethoven sprint, also about the politics behind the current offerings .I'm mostly responding from the perspective of how much work and ongoing maintenance will choosing a direction mean for us:

The main team supporting/maintaining precommit actively disapproves of any support for monorepo's, although many users would like this, so the plugin is actually patching precommit and could require some support from our community in the future.

An alternative would be add some tooling to wrap precommit and let it run on the packages, mentioned by @davisagli , and is from a coding perspective less risky, but could need more support and we'll have to 'own' the wrapper.

Not using pre-commit but looking for another alternative would not solve the issue to have one setup to 'rule them all', or we would have to change plone meta as well, which will be even more work. Where plone meta seems to do a large part of the job currently (for the backend) and uses one of the most 'popular' tools, precommit.