Skip to content

feat: port rule promise/no-promise-in-callback#1065

Open
elecmonkey wants to merge 1 commit into
mainfrom
feat/port-rule-promise_no_promise_in_callback-20260607
Open

feat: port rule promise/no-promise-in-callback#1065
elecmonkey wants to merge 1 commit into
mainfrom
feat/port-rule-promise_no_promise_in_callback-20260607

Conversation

@elecmonkey

Copy link
Copy Markdown
Member

Summary

promise/no-promise-in-callback

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings June 7, 2026 17:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Ports promise/no-promise-in-callback into rslint’s eslint-plugin-promise implementation, wiring it into the promise plugin, adding documentation, and adding both Go + JS harness test coverage so the rule can ship enabled in presets.

Changes:

  • Implement promise/no-promise-in-callback rule in the Go promise plugin.
  • Add upstream-migrated + rslint-specific extra Go test suites, plus JS RuleTester coverage and test-runner registration.
  • Enable the rule in the promise recommended config and register it in the promise plugin rule list.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/rslint/src/configs/promise.ts Enables promise/no-promise-in-callback in the promise recommended preset.
packages/rslint-test-tools/tests/eslint-plugin-promise/rules/no-promise-in-callback.test.ts Adds JS RuleTester cases for the new rule.
packages/rslint-test-tools/rstest.config.mts Registers the new JS test file in the test runner config.
internal/plugins/promise/rules/no_promise_in_callback/no_promise_in_callback.md Adds user-facing rule documentation.
internal/plugins/promise/rules/no_promise_in_callback/no_promise_in_callback.go Implements the rule logic + options parsing + reporting.
internal/plugins/promise/rules/no_promise_in_callback/no_promise_in_callback_upstream_test.go Ports the upstream valid/invalid suite into Go tests.
internal/plugins/promise/rules/no_promise_in_callback/no_promise_in_callback_extras_test.go Adds additional edge-shape / branch lock-in Go tests.
internal/plugins/promise/all.go Registers the new rule in the promise plugin’s exported rule list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 10 to +14
'promise/param-names': 'error',
// 'promise/catch-or-return': 'error', // not implemented
// 'promise/no-native': 'off', // not implemented
// 'promise/no-nesting': 'warn', // not implemented
// 'promise/no-promise-in-callback': 'warn', // not implemented
'promise/no-promise-in-callback': 'warn',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

the inconsistent introduced by catch-or-return's porting PR. should not fix in this PR.

@elecmonkey elecmonkey force-pushed the feat/port-rule-promise_no_promise_in_callback-20260607 branch from b056d17 to 202d6f7 Compare June 7, 2026 18:08
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