dev: add imports to manage-db script#3772
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3772 +/- ##
=======================================
Coverage 81.34% 81.34%
=======================================
Files 622 622
Lines 39202 39202
Branches 6396 6396
=======================================
Hits 31889 31889
Misses 6326 6326
Partials 987 987 ☔ View full report in Codecov by Sentry. |
09b3f61 to
e87826a
Compare
RaymondLuong3
left a comment
There was a problem hiding this comment.
@RaymondLuong3 reviewed 1 file and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on marksvc).
| const _a = fs; | ||
| const _b = os; | ||
| const _c = path; |
There was a problem hiding this comment.
🟡 Dummy variable names _a, _b, _c are meaningless and violate naming conventions
The variables _a, _b, _c at scripts/db_tools/manage-db.ts:57-59 are used to prevent tree-shaking of the fs, os, and path imports so they remain available in eval code. However, these names convey no information about what they hold or why they exist. Per REVIEW.md: "Pay particular attention to how accurate and precise the names of methods, variables, and other named entities are." Per AGENTS.md: "It is better to write code that is verbose and understandable than terse and concise." These should be named something descriptive like _fs, _os, _path so a reader immediately understands both what module they reference and that they are intentionally unused aliases.
| const _a = fs; | |
| const _b = os; | |
| const _c = path; | |
| const _fs = fs; | |
| const _os = os; | |
| const _path = path; |
Was this helpful? React with 👍 or 👎 to provide feedback.
Code passed to manage-db can need fs, os, and path. This patch imports them and helps them stick around without being auto-removed by lint rules.
This change is