-
Notifications
You must be signed in to change notification settings - Fork 0
[hotfix] eslint + format #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis update primarily involves code style, formatting, and minor configuration improvements across multiple files. The Makefile and ESLint configuration are refactored for clarity and maintainability, with updated dependency versions in Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Makefile
participant Prettier
participant ESLint
User->>Makefile: make format
Makefile->>Prettier: Run formatting
Prettier-->>Makefile: Formatting complete
Makefile->>ESLint: Run lint-fix (auto-fix lint issues)
ESLint-->>Makefile: Linting complete
Makefile-->>User: format target complete
Estimated code review effort2 (~15 minutes) Possibly related PRs
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @gocanto, 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 serves as a hotfix to address and improve the project's ESLint configuration and related development tooling. It updates various ESLint dependencies, refines the ESLint configuration file for better maintainability and correctness, and applies automated linting fixes across several Vue component files. The changes aim to ensure code quality and consistency moving forward.
Highlights
- ESLint Configuration Modernization: Updated
eslint.config.jsto streamline imports, adopt theglobalspackage for managing global variables (e.g.,browser,node), and refine parser options for Vue files, enhancing the new flat config format. - Dependency Updates: Bumped versions for core ESLint, TypeScript ESLint, and Vue ESLint related packages in
package.jsonto their latest compatible versions, ensuring up-to-date linting capabilities. - Build Script Enhancements: Modified
Makefiletargets, renamingenv:freshtoenv-freshand simplifying linting commands. Also addedrm package-lock.jsonto theenv-freshtarget for a cleaner environment reset. - Vue Template Linting Fixes: Applied automated or manual fixes to Vue component templates, primarily reordering attributes for
v-fordirectives and adding aneslint-disable-next-linecomment for av-htmldirective where its usage is intentional.
Using Gemini Code Assist
The 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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.
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 or fill out our survey to provide feedback.
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
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request updates the project's ESLint configuration to the modern flat format, upgrades dependencies, and applies automatic fixes to Vue components. I've provided feedback on re-introducing a lint-check command to the Makefile and adding a configuration block for standalone TypeScript files in the ESLint configuration. Additionally, I've suggested moving the class attribute after the v-for directive in several Vue components for better readability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (6)
src/partials/FeaturedProjectsPartial.vue (1)
8-9: Good improvement! Structural directives now prioritized.Moving
v-forand:keyto the beginning of the attribute list improves readability and follows Vue.js best practices for directive ordering.src/partials/TalksPartial.vue (1)
10-10: Class attribute should be placed after the v-for directive.The class attribute is still positioned before the v-for directive, which contradicts the previous review feedback for better readability and maintainability.
src/partials/EducationPartial.vue (1)
6-6: Class attribute should be placed after the v-for directive.The class attribute positioning still doesn't follow the previous review feedback for better readability and maintainability.
src/partials/RecommendationPartial.vue (1)
6-6: Class attribute should be placed after the v-for directive.The class attribute positioning still doesn't follow the previous review feedback for better readability and maintainability.
eslint.config.js (1)
16-16: Missing TypeScript file configuration still needs to be addressedThe configuration is still missing a dedicated block for standalone TypeScript files (
.ts). Currently, only TypeScript within.vuefiles is being parsed with@typescript-eslint/parser, which means standalone TypeScript files likevite.config.ts,src/router.ts, and Pinia stores are not getting TypeScript-specific linting.Makefile (1)
1-1: Consider re-adding lint-check commandIt would be beneficial to have a separate
lint-checkcommand for checking linting issues without automatically fixing them. This is especially useful in CI/CD pipelines to fail builds on lint errors.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (13)
Makefile(1 hunks)eslint.config.js(2 hunks)package.json(1 hunks)src/pages/ProjectsPage.vue(1 hunks)src/partials/EducationPartial.vue(3 hunks)src/partials/FeaturedProjectsPartial.vue(1 hunks)src/partials/ProjectCardPartial.vue(2 hunks)src/partials/RecommendationPartial.vue(3 hunks)src/partials/SideNavPartial.vue(1 hunks)src/partials/TalksPartial.vue(2 hunks)src/public.ts(1 hunks)src/stores/users/response.ts(11 hunks)src/stores/users/userType.ts(1 hunks)
🪛 checkmake (0.2.2)
Makefile
[warning] 1-1: Missing required phony target "all"
(minphony)
[warning] 1-1: Missing required phony target "clean"
(minphony)
[warning] 1-1: Missing required phony target "test"
(minphony)
🧰 Additional context used
🪛 checkmake (0.2.2)
Makefile
[warning] 1-1: Missing required phony target "all"
(minphony)
[warning] 1-1: Missing required phony target "clean"
(minphony)
[warning] 1-1: Missing required phony target "test"
(minphony)
🔇 Additional comments (20)
src/public.ts (1)
7-16: LGTM! Consistent quote style and formatting improvements.The changes improve code consistency by standardizing on single quotes and adding proper semicolons. No functional changes detected.
src/pages/ProjectsPage.vue (1)
24-28: LGTM! Improved text formatting consistency.Consolidating the paragraph text into single lines improves readability and maintains consistent formatting across the component.
src/partials/ProjectCardPartial.vue (2)
12-12: Good consolidation of simple img tag.Placing all attributes on a single line for this simple
<img>tag improves consistency and readability.
34-34: Consistent formatting for defineProps.The bracket alignment improvement enhances code formatting consistency.
src/stores/users/userType.ts (1)
43-43: No breaking change:photois consistently required and handledAll instances of the
Talksinterface and its usage already assume a requiredphotostring. Sample API data and UI templates supply and consumetalk.photowithout optional checks, so makingphotonon-optional does not introduce any breaking behavior.• src/stores/users/userType.ts –
photo: stringininterface Talks
• src/stores/users/response.ts – everyTalksobject in sample responses includes aphotofield
• src/partials/TalksPartial.vue –talk.photois used directly in both script and templatesrc/partials/TalksPartial.vue (1)
6-6: Good defensive programming practice.Adding the
v-if="talks.length"condition prevents rendering an empty grid container when there are no talks to display.src/partials/SideNavPartial.vue (2)
83-83: Good TypeScript improvement.Adding the explicit
Refimport improves type clarity and enables better IDE support.
86-86: Explicit type annotation improves code clarity.The explicit type annotation for
currentRouteenhances TypeScript support and code readability.package.json (1)
26-27: ✅ Dependency versions verified; no security issues found.
- package.json (lines 26–27, 29, 31–32, 37)
- @typescript-eslint/eslint-plugin@8.38.0
- @typescript-eslint/parser@8.38.0
- eslint@9.31.0
- eslint-plugin-vue@10.3.0
- vue-eslint-parser@10.2.0
- globals@16.3.0
- All versions exist on npm and
npm auditreports zero vulnerabilities.These linting updates are safe to merge.
src/partials/EducationPartial.vue (2)
32-32: Appropriate ESLint disable comment.The ESLint disable comment is correctly placed since the HTML content is sanitized with DOMPurify before rendering.
48-49: Improved type annotation formatting.The single-line type annotation formatting is cleaner and more consistent.
src/partials/RecommendationPartial.vue (2)
16-16: Good formatting and ESLint improvements.Removing the trailing space and adding the appropriate ESLint disable comment for sanitized HTML rendering improves code quality.
Also applies to: 20-20
42-43: Improved TypeScript and formatting consistency.The type annotation formatting and explicit arrow function parentheses improve code consistency and readability.
Also applies to: 46-46
src/stores/users/response.ts (1)
150-470: LGTM - Consistent quote formatting appliedThe systematic conversion from double quotes to single quotes throughout the Response object aligns perfectly with the updated ESLint configuration and formatting standards. This change improves code consistency across the project.
eslint.config.js (3)
2-9: LGTM - Cleaner import organizationThe refactored imports are more organized and the addition of the
globalspackage simplifies global variable management.
26-26: Good addition of clarifying commentThe comment explaining
requireConfigFile: falsehelps understand the Babel parser configuration.
29-30: Improved global variable handlingUsing
...globals.browserand...globals.nodedirectly is cleaner than manual extraction and leverages the globals package properly.Also applies to: 48-48
Makefile (3)
1-4: LGTM - Better organization and new ROOT_PATH variableMoving
.PHONYto the top improves readability, and theROOT_PATHvariable is a good practice for making paths more explicit and maintainable.
6-8: Efficient workflow improvementThe updated
formattarget that automatically runslint-fixafter prettier creates a streamlined formatting and linting workflow.
10-14: Good use of absolute paths in env-freshUsing
ROOT_PATHfor absolute paths in theenv-freshtarget makes the commands more explicit and safer.
Summary by CodeRabbit