Conversation
Use a scoped ancestor walk instead of parallel class/this traversal stacks. Preserve arrow-function scope, reject shadowed or disabled error globals, and use the canonical class-symbol helper for TypeScript declaration merging. Restrict autofixes to standalone block statements. Cover 96 source cases plus edit-demand boundaries; compare two real-source copies against pinned Unicorn v75. Full native/JS integration remains for CI.
Member
|
enable in preset plz |
Enable unicorn/no-useless-error-capture-stack-trace at error severity in the recommended preset and assert its public preset registration in the existing suite. The source-backed preset regression failed before the registration change and passes afterward. Only this rule is newly enabled; other preset settings are unchanged. Formatting and changed-file spelling checks pass.
elecmonkey
approved these changes
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Refs #1309.
Port
unicorn/no-useless-error-capture-stack-tracefrom eslint-plugin-unicorn v75.0.0. The rule was absent from main and exact-name, all-state PR searches returned no matches before implementation and on the final eligibility check.Changes
Use a scoped ancestor walk instead of parallel class/this traversal stacks. Preserve arrow-function scope, reject shadowed or disabled error globals, and use the canonical class-symbol helper for TypeScript declaration merging. Restrict autofixes to standalone block statements.
Add documentation, catalogue registration, a JavaScript upstream mirror, and separate upstream/extras Go suites. This branch is independent of the other new rule PRs and does not modify shared utility implementations.
Validation
packages/rslint/src/service/service.tsandpackages/rslint/src/eslint-plugin/plugin/plugin-loader.ts), each with an appended positive control. Checked diagnostic IDs/text, full ranges, applied autofixes and suggestion IDs/outputs. Reference: Unicorn 75.0.0, ESLint 10.10.0, typescript-eslint parser 8.62.0. This exercises the native rule harness, not the IPC layer.go test ./internal/plugins/unicorn/rules/no_useless_error_capture_stack_trace.--new-from-merge-base=origin/mainon the new rule package and changed Unicorn catalogue package.pnpm run format:check,gofmt, andgit diff --checkpassed. Normal repository pre-commit hooks remained enabled.Local integration limitation
The full catalogue test, schema dump, complete native/core-JavaScript builds, and JavaScript integration run were not executed in this batch. The Mac previously exhausted disk and experienced sustained full-catalogue linker pressure, so this batch reused the unchanged pinned compiler with task-local workspace files and bounded, focused verification. No repository toolchain or dependency versions were changed.
The JavaScript mirror is included and registered but is not claimed as passing locally. CI must validate full registration/build and native-JavaScript integration before merge.