You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Review .gitattributes so that Git tries harder to checkout LF line endings.
Ensure that IntelliJ and VSCode respect our prettier and eslint settings out of the box, as much as possible.
Preferable, they should apply the rules whenever a file is saved.
The text was updated successfully, but these errors were encountered:
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:
Set Run eslint --fix on every save on your IDE
Deactivate automated prettifier setting on your IDE
Even if spacing issues should not be conflicted anymore with the branch updates
This would lead us to always use recommended prettifier settings and only have one source of true.
TODO
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.The text was updated successfully, but these errors were encountered: