Skip to content

fix: multiple lint & type issues#659

Merged
hanthor merged 6 commits into
projectbluefin:mainfrom
KiKaraage:lintfix-260531
May 31, 2026
Merged

fix: multiple lint & type issues#659
hanthor merged 6 commits into
projectbluefin:mainfrom
KiKaraage:lintfix-260531

Conversation

@KiKaraage
Copy link
Copy Markdown
Collaborator

@KiKaraage KiKaraage commented May 31, 2026

Lint changes via eslint --fix

  • scripts/tests/update-dakota-versions.test.ts: Declare Buffer import from node:buffer directly instead of relying in global Buffer function
  • src/components/TopNavbar.vue: Convert closeMenu into a function
  • Prettify code in src/components/ImageChooser.vue & src/utils/feedParser.ts
  • Remove excess blank lines in src/components/dakota/DakotaScene.vue & src/components/sections/SectionCommunity.vue
  • Reorganize import orders in src/tests/composables.test.ts, src/tests/feedParser.test.ts & src/components/RssFeed.vue

Type issue fixed for src/utils/feedParser.ts

XmlParser interface had a manually-defined return type ({ documentElement?: ...; getElementsByTagName: ... }) and mimeType: string param, which was incompatible with DOMParser's native signature (parseFromString(xml: string, type: DOMParserSupportedType): Document). The interface now matches DOMParser exactly, so the default parameter new DOMParser() satisfies the type constraint.

Assisted-by: MiMo V2.5 Pro in Pi
https://pi.dev/session/#62b956c4b00c1ae8e95c4f39d437d1a7

Summary by CodeRabbit

  • Style

    • Fixed formatting and line breaks in component templates and stylesheets for improved readability.
  • Tests

    • Updated test utilities and imports for better compatibility.
  • Refactor

    • Reorganized import statements across files and refined type definitions for consistency.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 31, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR refactors XML parser typing to standardize on native DOM Document interface, adds optional getAttribute method to XmlNodeLike, reorganizes test imports across multiple files, and cleans up Vue component formatting and import organization.

Changes

XML Typing and Component Refactoring

Layer / File(s) Summary
XML parser typing and helper contracts
src/utils/feedParser.ts
XmlNodeLike interface gains optional getAttribute(name) method. XmlParser.parseFromString now accepts DOMParserSupportedType and returns standard Document instead of custom type shape. Helper function signatures (getFirstElement, getTextContent, getAttribute) are updated to align with revised contract.
Test file imports and dependencies
scripts/tests/update-dakota-versions.test.ts, src/tests/feedParser.test.ts, src/tests/composables.test.ts
Buffer imported from node:buffer for GitHub content decoding. XmlParser type import moved ahead of other imports in feedParser.test.ts. Vitest imports reordered before Vue ref import in composables.test.ts.
Vue component import organization and formatting
src/components/RssFeed.vue, src/components/ImageChooser.vue, src/components/TopNavbar.vue, src/components/dakota/DakotaScene.vue, src/components/sections/SectionCommunity.vue
RssFeed.vue imports reordered for consistency. ImageChooser.vue line breaks reflowed in selectArchitecture and Download-step "Back" button handler without logic changes. TopNavbar.vue closeMenu converted from arrow-function to function declaration. DakotaScene.vue stray numeric lines removed from SCSS .release-links section. SectionCommunity.vue template whitespace adjusted.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • projectbluefin/website#597: Both PRs touch src/components/dakota/DakotaScene.vue's .release-links section (PR #597 adds alpha 1/alpha 2 links and styling, this PR cleans up the corresponding SCSS formatting).
  • projectbluefin/website#581: The Dakota scene component touched in this PR was introduced as part of the /dakota sub-page work in PR #581, making this SCSS cleanup directly related at the file/component level.

Suggested reviewers

  • castrojo

Poem

🐰 A twist of types and a brush of code,
XML paths now clearly showed,
Imports aligned and whitespace clean,
The tidiest refactor I have seen!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: multiple lint & type issues' accurately and concisely describes the changeset, which includes multiple lint fixes and TypeScript type corrections across the codebase.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Member

@hanthor hanthor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Excellent refactoring of XML parser typing to natively match DOMParser, and solid formatting/eslint hygiene fixes across the codebase. GHA checks are fully passing. Ready to merge.

@hanthor hanthor added this pull request to the merge queue May 31, 2026
Merged via the queue into projectbluefin:main with commit cfa5327 May 31, 2026
3 checks passed
@KiKaraage KiKaraage deleted the lintfix-260531 branch May 31, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants