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

Enable require-await rule #833

Merged
merged 4 commits into from
Nov 29, 2022
Merged

Enable require-await rule #833

merged 4 commits into from
Nov 29, 2022

Conversation

rajsite
Copy link
Member

@rajsite rajsite commented Nov 23, 2022

Pull Request

🤨 Rationale

Enables the eslint require-await rule after noticing some spots where async was used unexpectedly.

This is disabled in the ni eslint rules due to airbnb's configuration which I think is not well justified. At least in nimble we should prefer async-await syntax AND prefer to not mix async and promise syntax. Enabling this rule helps prevent mixing syntaxes and so far with enabling it helped prevent introducing unnecessary / unexpected async functions.

👩‍💻 Implementation

Enabled require-await or @typescript-eslint/require-await in each .eslintrs.jc file. The rule found additional places in source where the use of async was unnecessary.

🧪 Testing

Rely on CI.

✅ Checklist

  • I have updated the project documentation to reflect my changes or determined no changes are needed.

@rajsite rajsite enabled auto-merge (squash) November 29, 2022 23:32
@rajsite rajsite merged commit 3ff74ec into main Nov 29, 2022
@rajsite rajsite deleted the eslint-require-await branch November 29, 2022 23:41
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.

3 participants