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(server): eslint await-thenable #7545

Merged
merged 15 commits into from Mar 5, 2024
Merged

Conversation

etnoy
Copy link
Contributor

@etnoy etnoy commented Mar 1, 2024

Looking for feedback on this before modifying other packages.

I had an unneeded await in my code and found an eslint rule to prevent it. It also found three other parts where it could have been used incorrectly

Copy link

cloudflare-pages bot commented Mar 1, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: d66a581
Status: ✅  Deploy successful!
Preview URL: https://84dc9f44.immich.pages.dev
Branch Preview URL: https://chore-eslint-await-thenable.immich.pages.dev

View logs

Copy link
Contributor

@jrasm91 jrasm91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. maybe we can look at making a parent config that these all extend so they can all have the same core set of rules.

@etnoy
Copy link
Contributor Author

etnoy commented Mar 1, 2024

LGTM. maybe we can look at making a parent config that these all extend so they can all have the same core set of rules.

Seems like it shouldn't be too hard. https://turbo.build/repo/docs/handbook/linting/eslint

@benmccann
Copy link
Contributor

There are a few other rules to improve promise handling that I just turned on in the web project and which you might find to be useful here: https://github.com/immich-app/immich/pull/7382/files#diff-c1f89ef5e816f54437b1a48e36db79213d698329e9bbafd4c84a81506d8f197fR52

@etnoy
Copy link
Contributor Author

etnoy commented Mar 1, 2024

There are a few other rules to improve promise handling that I just turned on in the web project and which you might find to be useful here: https://github.com/immich-app/immich/pull/7382/files#diff-c1f89ef5e816f54437b1a48e36db79213d698329e9bbafd4c84a81506d8f197fR52

Thanks, Ben! I added those rules and made the corresponding modifications :)

server/.eslintrc.js Outdated Show resolved Hide resolved
@jrasm91 jrasm91 merged commit 5d377e5 into main Mar 5, 2024
25 checks passed
@jrasm91 jrasm91 deleted the chore/eslint-await-thenable branch March 5, 2024 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants