Linter to create federation with Fedify#494
Conversation
Summary of ChangesHello @2chanhaeng, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces Fedify v2.0.0, a major release focused on improving modularity, developer experience, and runtime compatibility. The core Fedify library has been refactored to separate concerns, leading to the creation of new packages for vocabulary runtime and code generation. The CLI tool has been overhauled for native Node.js and Bun support, and deprecated integration modules have been removed in favor of dedicated packages. These changes streamline development, enhance maintainability, and align the framework more closely with modern JavaScript ecosystems and ActivityPub standards. Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new ESLint plugin package, @fedify/lint, to help developers identify common issues when implementing Fedify federation. The package is well-structured, leveraging rule factories and helper utilities to create a maintainable and extensible set of linting rules. The initial set of rules covers many important validation cases for actor properties.
However, I've identified a critical issue in the AST traversal logic that leads to false negatives in both *-required and *-mismatch rules, as it doesn't correctly analyze all control flow paths. Additionally, there are a few medium-severity issues, including a misleading error message, unhandled parameter destructuring, and some dead code.
Addressing the critical issue is essential for the linter to be reliable. The other suggestions aim to improve clarity, robustness, and code hygiene. Overall, this is a fantastic addition to the project, and with these improvements, it will be a very valuable tool for Fedify developers.
e16352c to
f320682
Compare
dahlia
left a comment
There was a problem hiding this comment.
Thank you for this great contribution! I have a few comments and suggestions below. One is a minor typo fix, and one is a larger suggestion about documentation that could be addressed in a follow-up PR if you prefer:
Documentation suggestion
Currently, the lint documentation consists of:
- A section in docs/tutorial/basics.md (“Linting your federation code”)
- The detailed packages/lint/README.md
I think it would be beneficial to add a dedicated manual page at docs/manual/lint.md, similar to other feature documentation like log.md, test.md, opentelemetry.md, etc. This would:
- Maintain consistency with the existing documentation structure
- Provide a proper reference for all 21 lint rules with detailed explanations
- Allow the tutorial section to remain concise (quick intro + link to manual)
The content could largely be based on the existing README.md.
This doesn't need to block this PR—it could be done as a follow-up if you prefer. What do you think?
Summary
Linter to create federation with Fedify.
Related Issue
Reference the related issue(s) by number, e.g.:
Changes
packages/lintBenefits
Now the users can more easily identify basic issues when create federation instance.
See the example video:
Checklist
Did you write a regression test to reproduce the bug (if it's a bug fix)?deno task test-allon your machine?