azerothcore / wow-statistics

GNU Affero General Public License v3.0
8 stars 4 forks source link

Add a common formatter #19

Closed alecsci closed 3 years ago

alecsci commented 3 years ago

Given the fact we are using different OS/IDE we have different formatting, so we should agree upon a standard one.

Helias commented 3 years ago

we could use prettier, it's available in multiple IDE even in the JetBrains IDE https://prettier.io/docs/en/editors.html

alecsci commented 3 years ago

I think we are also using ESLint given the fact the app was boostraped with CRA. I will look into https://github.com/prettier/eslint-config-prettier#installation.

alecsci commented 3 years ago

@Helias , adding prettier was pretty easy.

I also tried to add husky + commit-lint, to enforce the conventional commit paradigm, but it's not working at all at least on my machine. I have win 10 - node 14.x , npm 6.x. Maybe we should tackle this in a separate issue, since this was only related to formatting.

See https://github.com/typicode/husky/issues/557 which is the same on my machine.

Helias commented 3 years ago

husky is a good choice to force some regex in the commit name, we could add it here locally and in the pipeline and maybe... we could find a way to force the convetions in AzerothCore too ;-)