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

Update no-nested-steps.ts #669

Merged
merged 4 commits into from
Aug 2, 2024
Merged

Update no-nested-steps.ts #669

merged 4 commits into from
Aug 2, 2024

Conversation

swiecki
Copy link
Contributor

@swiecki swiecki commented Aug 1, 2024

Today we had an interesting and expensive learning experience- we had pushed step.sendEvent inside step.run. As part of the retrospective I noticed the eslint plugin seemed to only be picking up step.run inside step.run, not step.invoke or step.sendEvent etc.

UPDATED: eslint-plugin/src/rules/no-nested-steps.ts

  • Updated rule to disallow use of any step.* within another step.* function
  • Added check to report error if step.* is used within another step.* function
  • issue with counting the depth of nested step.run() calls

Summary

Checklist

  • Added a docs PR that references this PR N/A Bug fix
  • Added unit/integration tests
  • Added changesets if applicable

UPDATED: eslint-plugin/src/rules/no-nested-steps.ts

- Updated rule to disallow use of any `step.*` within another `step.*` function
- Added check to report error if `step.*` is used within another `step.*` function
- issue with counting the depth of nested `step.run()` calls
Copy link

changeset-bot bot commented Aug 1, 2024

🦋 Changeset detected

Latest commit: 5ae044b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@inngest/eslint-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jpwilliams jpwilliams self-assigned this Aug 2, 2024
@jpwilliams jpwilliams added the Bug Something isn't working label Aug 2, 2024
@jpwilliams jpwilliams added the 📦 @inngest/eslint-plugin Affects the `@inngest/eslint-plugin` package label Aug 2, 2024
@jpwilliams
Copy link
Member

Thanks, @swiecki! Apologies this caught you out.

@jpwilliams jpwilliams merged commit cff63ca into inngest:main Aug 2, 2024
45 of 48 checks passed
jpwilliams pushed a commit that referenced this pull request Aug 5, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @inngest/[email protected]

### Patch Changes

- [#669](#669)
[`cff63ca`](cff63ca)
Thanks [@swiecki](https://github.com/swiecki)! - Fix `no-nested-steps`
not catching nested steps other than `step.run()`

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working 📦 @inngest/eslint-plugin Affects the `@inngest/eslint-plugin` package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants