Repository navigation
chore(eslint): prohibit immediate call-result invocation - #10060
Conversation
Overall package sizeSelf size: 8.56 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.4.0 | 127.33 kB | 447.04 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
🎉 All green!🧪 All tests passed 🔄 Datadog retried 2 tests - 2 passed on retry 🎯 Code Coverage (details) 🔗 Commit SHA: e8ce71c | Docs | View more details | Give us feedback! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10060 +/- ##
==========================================
- Coverage 98.60% 97.73% -0.87%
==========================================
Files 992 989 -3
Lines 149800 149549 -251
Branches 12758 12761 +3
==========================================
- Hits 147704 146163 -1541
- Misses 2096 3386 +1290 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
BenchmarksBenchmark execution time: 2026-08-31 14:19:55 Comparing candidate commit e8ce71c in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 2299 metrics, 10 unstable metrics.
|
Exact bulk suppressions preserve the existing baseline while making every new call-result invocation fail lint.
2bc3fb1 to
e8ce71c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e8ce71cd56
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Exact bulk suppressions preserve the existing baseline while making every new call-result invocation fail lint.
Exact bulk suppressions preserve the existing baseline while making every new call-result invocation fail lint.
Exact bulk suppressions preserve the existing baseline while making every new call-result invocation fail lint.
Exact bulk suppressions preserve the existing baseline while making every new call-result invocation fail lint.
What does this PR do?
This adds a local ESLint rule that prohibits immediate invocation of functions returned by calls. IIFEs remain allowed when their function is defined at the invocation site.
The rule covers direct calls and
.call()/.apply(). Exact bulk suppressions preserve the existing 265 violations across 92 files.Motivation
Naming a returned function before invoking it exposes the callable and prevents opaque thunk chains. New violations now fail lint without rewriting unrelated code.