Refine require-new-url-try-catch safe-argument detection#46190
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
|
Hey
|
There was a problem hiding this comment.
Pull request overview
Refines URL lint-rule precision for statically safe arguments.
Changes:
- Recognizes recursively constant string concatenations.
- Exempts
import.meta.urlas the first argument. - Adds regression coverage and changes the auto-upgrade schedule.
Show a summary per file
| File | Description |
|---|---|
eslint-factory/src/rules/require-new-url-try-catch.ts |
Refines static argument detection. |
eslint-factory/src/rules/require-new-url-try-catch.test.ts |
Tests new valid and invalid cases. |
.github/workflows/agentic-auto-upgrade.yml |
Unrelated generated schedule change requiring removal. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Medium
|
@copilot please run the Unresolved review threads (newest first):
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Reverted the incidental cron schedule change in |
|
🎉 This pull request is included in a new release. Release: |
require-new-url-try-catchwas over-classifying somenew URL(...)calls as runtime-risky. In particular, it flagged provably constant string concatenations andnew URL(import.meta.url), even though both are syntactically safe and non-throwing in the cases covered here.Rule precision
+concatenations composed only of the aboveimport.meta.urlsafe-value exemption for the first argument, not just the base argumentBehavioral effect
Coverage
import.meta.urlin first-argument position