TUfast_TUD
TUfast_TUD copied to clipboard
Enforce consistent code style through prettier
Description
This is a proposal of a prettier config for this repository, I tried to make the config as close as possible to the current code style. You can see the changes by cloning my fork A-K-O-R-A/TUfast_TUD, switching to the coding-with-style
branch and then running npm install
followed by npm run prettier:fix
.
Adding this config will also make the CI fail if the pushed code wasn't formatted with prettier. The easiest solution is to just configure your editor to format on save by. In the case of VSCode there is a extension esbenp.prettier-vscode which I also added as a recommended VSCode extension for this repository in the .vscode/extension.json
file.
References
This repository does not have a consistent code style yet and only a few linting rules which leads to a very inconsistent code style and allows for errors like missing closing tags in HTML files or confusing indentations which degrades the readability significantly.
Type of change
- [x] Code style change
- [ ] Bug fix (non-breaking change which fixes a bug)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that might cause existing functionality to not work as expected)
Testing
- [x] Tested my changes on Firefox
- [ ] Tested my changes on Chromium-Based-Browsers
- [x] Successfully run
npm run test
locally