Repository navigation
Quality: stale root cleanup, import cycle guards, shared API payload types, ESLint rule tests (#1774-#1777) - #1820
Closed
yachamdaniel1-alt wants to merge 1 commit into
Closed
yachamdaniel1-alt wants to merge 1 commit into
yachamdaniel1-alt wants to merge 1 commit into
Conversation
…types, ESLint rule tests (Xoulomon#1774-Xoulomon#1777)
|
@yachamdaniel1-alt Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Closes #1774
Closes #1775
Closes #1776
Closes #1777
Branch: fix/issues-1774-1777 (account: yachamdaniel1-alt)
Summary
#1774 — Remove stale root-level report/PR message files (scope: repo root)
ANALYTICS_CONSOLIDATION_COMPLETION_REPORT.md,PR_MESSAGE_1540-1543.md,PR_MESSAGE_1544-1545-1546.md..gitignore.scripts/check-stale-root-files.sh(fails onPR_MESSAGE_*.md/*_REPORT.mdat the repo root)..github/workflows/docs-checks.yml.__tests__/cleanup/root-stale-files.test.ts(vitest).#1775 — Deduplicate shared types into packages/ (scope: packages)
Role,TransferStatus,Participant/Raw*,Incentive,Material,Waste,WasteTransfer, stats, metrics,ContractError,RawContractPayload) fromfrontend/src/api/types.tsintopackages/types/src/index.ts(asApi*-prefixed interfaces to avoid colliding with the existing camelCase domain types).frontend/src/api/types.tsis now a thin backwards-compatible re-export layer — every original export name and shape is preserved, so no import sites changed.frontend/src/features/transfers/types.tsnow re-exportsTransferStatusfrom@scavngr/typesinstead of duplicating the union.export * from '../constants'(the module does not exist) fromfrontend/src/api/index.ts.frontend/src/api/types.test.ts(7 tests covering enums, payload shapes, ContractError, and the RawContractPayload union).Backwards-compatibility impact: none — all existing imports from
@/api/typesandfeatures/transfers/typesresolve to identical shapes.#1776 — Enforce import ordering and no-cycle rules (scope: eslint-rules)
import/no-cycle(error,ignoreExternal: true),import/no-self-import(error), andimport/no-duplicates(error) tofrontend/eslint.config.js,indexer/eslint.config.js, andeslint.config.base.js.import/order(alphabetical) toindexer/eslint.config.js— the indexer previously had no import-ordering rule (frontend/base usesimple-import-sort).import/no-duplicatesacross 8 frontend files and 22import/orderviolations across 16 indexer files (autofix only — import reordering).#1777 — Custom ESLint rules documentation and tests (scope: eslint-rules)
node:test:eslint-rules/__tests__/error-message-format.test.js(10 cases) andeslint-rules/__tests__/no-only-tests.test.js(10 cases).test:eslint-rules(node --test eslint-rules/__tests__/*.test.js)..github/workflows/eslint-rules-tests.ymlso rule regressions fail fast.eslint-rules/README.md: documented theno-only-testsrule, added a Testing section, and corrected the inaccurate "auto-fixable" claim.meta.fixableflag fromerror-message-format(the rule has no fixer).Verification
node --test eslint-rules/__tests__/*.test.js→ 20/20 pass.frontend/src/api/types.test.ts→ 7/7 pass.indexer/src/stellar/streamer.tserror-message-format), and unrelated frontend lint debt.