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

added eslint await error #393

Merged
merged 2 commits into from
Jul 12, 2023
Merged

added eslint await error #393

merged 2 commits into from
Jul 12, 2023

Conversation

ejahnGithub
Copy link
Collaborator

add the eslint to check the async func will return value after all the async calls finish. Also, test the eslint by removing await in below code block, and it would detect it.

    try {
      if (fs.existsSync(filePath)) {
        await targetInfo.verify(fs.createReadStream(filePath));
        return filePath;

ref to this PR: #362

Copy link
Collaborator

@bdehamer bdehamer left a comment

Choose a reason for hiding this comment

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

This is great. Thanks for wiring this up!

In both the instances where you disabled the rule, I think the linter is showing us legit errors in our code (though no where near as serious as our previous missing `await)

packages/client/src/__tests__/utils/tmpfile.test.ts Outdated Show resolved Hide resolved
packages/client/src/updater.ts Outdated Show resolved Hide resolved
@ejahnGithub ejahnGithub enabled auto-merge (squash) July 12, 2023 13:23
@ejahnGithub ejahnGithub merged commit 00f7e7a into main Jul 12, 2023
24 checks passed
@ejahnGithub ejahnGithub deleted the eugene/es-lint-await-error branch July 12, 2023 13:23
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