Skip to content

Conversation

kasir-barati
Copy link
Contributor

Just some chores like getting rid of this warning in terminal each time you run e2e tests:

WARN[0000] /home/kasir/projects/nestjs-query/examples/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 

Typed jest conf file for better dev exp when you need to modify it.

Some typos that where here an there.

BTW I also like to ask @TriPSs why he has increased the printWidth of prettier to 130! I mean the recommended length is 70. So if your OK with it I am gonna change it to 70. TBH it is really long and hard to make sense of a lot of stuff. But I am also open to not touch it since it is growing on me too (as of lately I feel more comfortable around it 😅).

One thing that bothers me though is that if I save docker-compose.yml or any JSON conf file my IDE format it and I was thinking if possible either override them in .prettierrc or decrease the printWidth to 70 since the only configuration that causes VSCode to format them in my case.

Copy link

nx-cloud bot commented Dec 14, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 11d7558. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 5 targets

Sent with 💌 from NxCloud.

@kasir-barati kasir-barati changed the title chore: typed jest conf + remove versions from compose file + fix typo chore: typed jest conf + remove version from compose file + fix typo Dec 14, 2024
@kasir-barati
Copy link
Contributor Author

BTW while I was learning new stuff I saw some missing imports in the docs so I took it upon myself to fix them.

To stay relevant and up to date I removed version fom docker-compose.yml and renamed it to compose.yml since it is shorter and the preferred name.

Before I forget, I still had to prevent my IDE from formatting docs, otherwise there would be a really big change in this PR. So my suggestion is to add prettier as a precommit hook.

@TriPSs
Copy link
Owner

TriPSs commented Dec 14, 2024

The reason why I changed prettier width is that I don't like prettier at all, and the small initial width was very anying (I also do not have it enabled I think for this project on my machine 😅)

Ps: did this quick check on my phone so made some mistakes

@kasir-barati
Copy link
Contributor Author

The reason why I changed prettier width is that I don't like prettier at all, and the small initial width was very anying (I also do not have it enabled I think for this project on my machine 😅)

Ps: did this quick check on my phone so made some mistakes

So what's it gonna be? We can go down 2 different path IMO:

  1. Config a GH action to prettify.
  2. Add npm run format in husky (as of our pre-commit, might slow down committing new stuff since it runs a script before each commit).

Personally I love the first solution + configured IDEs so that we can commit things fast, but we have GH workflows as some sort of guardrail. So we're gonna have a prettified codebase all the time.

@TriPSs
Copy link
Owner

TriPSs commented Dec 15, 2024

Let me think about it a bit, atm we atleast have the linter in the CI and I think my preference would go to removing prettier and do everything with eslint. But I will comeback on this.

@TriPSs TriPSs merged commit c4731d0 into TriPSs:master Dec 15, 2024
14 checks passed
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