Add ESLint strictness and Prettier code formatting integration#123
Add ESLint strictness and Prettier code formatting integration#123rotarymars merged 86 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds Prettier configuration and ignore rules, VSCode settings, a new "Prettier Check" CI job integrated into ci-status reporting, extended ESLint rules and dev tooling, and package.json script/dependency updates; plus minor CI comment/spacing tweaks. Changes
Sequence Diagram(s)sequenceDiagram
participant Repo as Repository
participant Runner as GitHub Actions Runner
participant Setup as setup job
participant Node as Node/npm
participant Prettier as Prettier Check job
participant CIStatus as ci-status job
Repo->>Runner: Push / PR triggers workflow
Runner->>Setup: run setup job
Setup-->>Runner: completes
Runner->>Node: setup-node & install deps (cached/conditional)
Runner->>Prettier: run `npm run format:check`
Prettier-->>Runner: pass / fail (needs.format.result)
Runner->>CIStatus: aggregate needs.* results (includes format)
CIStatus->>Runner: print aggregated CI summary
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Fix all issues with AI agents
In @.github/workflows/ci.yml:
- Around line 104-124: The `format` job block in the workflow is misindented so
its properties (name, runs-on, needs, steps) are not children of `format:`; fix
by indenting the `name`, `runs-on`, `needs`, and `steps` lines (and their nested
step entries like the `- name: Run Prettier` step and uses: actions/checkout@v4,
actions/setup-node@v4, actions/cache@v4) under the `format:` key so the YAML
parser treats them as the job definition.
In `@eslint.config.mjs`:
- Around line 65-73: The "id-match" ESLint rule in the config is too broad (the
rule named "id-match" with pattern "^(is|has|can)[A-Z].*") and will reject
non-boolean identifiers; remove this rule or downgrade it to "warn", or better
replace it with an `@typescript-eslint/naming-convention` rule that only targets
boolean variables (use selector/type filtering for boolean variables and enforce
a prefix like is/has/can), updating the ESLint config to use the new rule
instead of "id-match".
- Around line 115-121: The current ESLint override only exempts "**/page.tsx"
from the "import/no-default-export" rule but Next.js also requires default
exports for layout.tsx, loading.tsx, error.tsx, not-found.tsx, template.tsx and
route handlers; update the override object (the one with files: ["**/page.tsx"]
and rule "import/no-default-export") to include those special filenames (e.g.,
add patterns for "**/layout.tsx", "**/loading.tsx", "**/error.tsx",
"**/not-found.tsx", "**/template.tsx" and route handler patterns like
"**/route.ts" / "**/route.tsx") so the rule is turned off for all Next.js
special files.
- Around line 54-63: The rule currently forces all const variables to be
UPPER_CASE by having a general "variable" rule with format ["camelCase"] and
then a later "variable" rule with modifiers ["const"] and format ["UPPER_CASE"];
to fix this, change the const-specific rule so it only applies to
exported/module-level constants (e.g., use modifiers ["const","exported"] or
["const","global"] depending on desired scope) or allow both formats for const
by using format ["camelCase","UPPER_CASE"]; update the rule that references
selector: "variable" and modifiers: ["const"] accordingly so normal local consts
can remain camelCase while only exported/global constants must be UPPER_CASE.
In `@package.json`:
- Line 9: Update the package.json "lint" script to call just eslint . (replace
the current "eslint . --ext .js,.jsx,.ts,.tsx") and let eslint.config.mjs
control file selection via its files patterns; if you need .js/.jsx linting also
add those globs to the eslint.config.mjs "files" array and include the
appropriate overrides/rule sets there so the CLI no longer specifies extensions.
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)
278-280: Consider addingformatto the required checks for CI failure.The
formatjob result is reported in the summary but not included in the failure condition. If Prettier formatting is a requirement, add it to the exit condition.Proposed fix
# Determine overall status if [[ "${{ needs.typecheck.result }}" != "success" ]] || \ [[ "${{ needs.lint.result }}" != "success" ]] || \ + [[ "${{ needs.format.result }}" != "success" ]] || \ [[ "${{ needs.build.result }}" != "success" ]]; then
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
|
(m_m) |
Resolve merge conflicts in DynamicLink.tsx (combine Prettier formatting with regex fix from main) and regenerate package-lock.json. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The --ext flag is not supported in flat config (eslint.config.mjs). File selection is now controlled by the files patterns in the config. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add Japanese translations for the Prettier Configuration and Tool Usage sections that were present in CODE-STYLE.md but missing from the Japanese version, as flagged in PR review. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
あと一人です |
|
あー、マージコンフリクトでも変更扱いになってもう一度承認が必要になるんですね、 |
# Conflicts: # src/app/api/auth/login/route.ts
|
ずっと他のPRのマージによってブロックされ続けてきたので、問題なさそうなので実行しました。 |
追加機能
詳細
Eslintについて
prettierについて
注意
Summary by CodeRabbit
Chores
Style