fix: multiple lint & type issues#659
Conversation
instead of relying in global Buffer function
enforced by eslint --fix
Assisted-by: MiMo V2.5 Pro in Pi https://pi.dev/session/#62b956c4b00c1ae8e95c4f39d437d1a7
📝 WalkthroughWalkthroughThis 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. ChangesXML Typing and Component Refactoring
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
hanthor
left a comment
There was a problem hiding this comment.
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.
Lint changes via
eslint --fixscripts/tests/update-dakota-versions.test.ts: DeclareBufferimport fromnode:bufferdirectly instead of relying in global Buffer functionsrc/components/TopNavbar.vue: ConvertcloseMenuinto a functionsrc/components/ImageChooser.vue&src/utils/feedParser.tssrc/components/dakota/DakotaScene.vue&src/components/sections/SectionCommunity.vuesrc/tests/composables.test.ts,src/tests/feedParser.test.ts&src/components/RssFeed.vueType issue fixed for
src/utils/feedParser.tsXmlParserinterface had a manually-definedreturn type ({ documentElement?: ...; getElementsByTagName: ... })andmimeType: stringparam, which was incompatible withDOMParser's native signature (parseFromString(xml: string, type: DOMParserSupportedType): Document). The interface now matchesDOMParserexactly, so the default parameter newDOMParser()satisfies the type constraint.Assisted-by: MiMo V2.5 Pro in Pi
https://pi.dev/session/#62b956c4b00c1ae8e95c4f39d437d1a7
Summary by CodeRabbit
Style
Tests
Refactor