Open Henner25 opened 7 months ago
I modified the .gitattributes
and the .prettierrc
.
We currrently set the prettier rules with eslint and a prettifier plugin:
'extends: [ ... 'plugin:prettier/recommended', ],'
Depending on your IDE Settings, the IDE will use their own prettifier settings, or automaticly serach for a .prettierrc
file.
Searching for a best practice guide, there was no clear solution what do do.
Currently it seems to me, that following way of code styling is the best:
Run eslint --fix on every save
on your IDEThis would lead us to always use recommended prettifier settings and only have one source of true.
We should add a developer part to the documentation for code styling
Depending on your Git configuration, IDE (version), plugins and/or settings, you might end up with minor differences in code style, especially with regard to indentation and line endings. Differences in code style result in friction in pull requests and differences in line endings may even break scripts such as
sql/pg_restore.sh
.For new setups, we want to minimize the (IDE) configuration as much as possible:
.gitattributes
so that Git tries harder to checkoutLF
line endings.