Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: format web base code consistently #1460

Merged
merged 5 commits into from
Jul 12, 2024
Merged

chore: format web base code consistently #1460

merged 5 commits into from
Jul 12, 2024

Conversation

dgdavid
Copy link
Contributor

@dgdavid dgdavid commented Jul 12, 2024

Problem

For whatever reason, the code web frontend code does not have a consistent format.

Solution

Reformat the code with Prettier by running npx prettier . -w after adapting the configuration we had in .prettierrc and updating the list of directories/files it should ignore via .prettierignore file.

We have decided to use as much defaults as possible, ending up with just one override: printWidth. Having lines up to 100 characters length looks a good compromise for us in terms of code readability.

To make the change possible, conflicts between ESLint and Prettier has been solved by making use of https://github.com/prettier/eslint-config-prettier. Something similar with Stylelint, for which https://github.com/prettier/stylelint-prettier has been used.

To keep only the line length override, since we would like to stick as
much as possible to the default configuration but 100 characters length
looks a good compromise for having a readable code.
By running `npx prettier . -w`;
@dgdavid dgdavid merged commit ef05fe8 into master Jul 12, 2024
2 checks passed
@dgdavid dgdavid deleted the prettify branch July 12, 2024 12:00
@imobachgs imobachgs mentioned this pull request Sep 20, 2024
imobachgs added a commit that referenced this pull request Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants