Skip to content

Add ESLint strictness and Prettier code formatting integration#123

Merged
rotarymars merged 86 commits intomainfrom
feature/eslint-stricter
Mar 31, 2026
Merged

Add ESLint strictness and Prettier code formatting integration#123
rotarymars merged 86 commits intomainfrom
feature/eslint-stricter

Conversation

@SakaYq4875
Copy link
Copy Markdown
Member

@SakaYq4875 SakaYq4875 commented Feb 5, 2026

追加機能

詳細

Eslintについて

  • eslintの厳格化
  • コード整形の設定を無効化したり(prettierと競合しないようにするため)、importのソートするためのプラグインを追加。(package.jsonの差分を参照)

prettierについて

  • pretteirで コードスタイルに基づいて整形ルールを定めた。
  • vscodeでコードを保存したときに自動整形する設定を入れた。
  • CIでフォーマットできるように設定した

注意

  • わからないことが多く、AIに聞いたことが多いので、ハルシネーションしていたらすみません。
  • ディレクトリの名前も強制するプラグインがあるようですが、インストールしますか?
  • is, has, canをつけたらbooleanにしなければならない系ルールなど、厳しいすぎるルールはwarningにしたり、そもそもコードを削除したりしてださい。

Summary by CodeRabbit

  • Chores

    • Added an automated Prettier check to CI with status reporting and CI dependency update; added format and format:check npm scripts; normalized package name to lowercase.
  • Style

    • Added Prettier configuration and ignore rules, VS Code format-on-save settings, and expanded ESLint rules to enforce consistent formatting, naming, import/export ordering, and code style.

@vercel
Copy link
Copy Markdown

vercel bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
kss-it-committee-github-io Ready Ready Preview, Comment Mar 31, 2026 1:18pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 5, 2026

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds 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

Cohort / File(s) Summary
Formatting config & editor
​.prettierrc, ​.prettierignore, ​.vscode/settings.json
Add Prettier config, ignore patterns, and VSCode settings (format on save, Prettier as default, enable ESLint fixes on save).
CI workflow
​.github/workflows/ci.yml
Add new format job ("Prettier Check") with checkout, Node setup, cache, conditional install, and npm run format:check; include format in ci-status needs and surface its result in CI summary. Minor inline comment/spacing tweaks.
Linting config & deps
eslint.config.mjs, package.json
Extend ESLint rules (import/export sorting, naming/id rules, Prettier integration, Next.js page overrides), update devDependencies and npm scripts (add format and lint:fix), and change package name casing.

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • katsumata68
  • K10-K10
  • hatuna-827
  • kinoto0103
  • mochi-k18

Poem

🐇 I hopped through lines with tidy cheer,
Prettier whiskers, linting near,
CI checks a tidy trail,
Imports sorted, no detail frail—
A tiny hop, the repo's clear.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add ESLint strictness and Prettier code formatting integration' accurately and concisely summarizes the main changes: tightening ESLint rules and adding Prettier for code formatting.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/eslint-stricter

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
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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 adding format to the required checks for CI failure.

The format job 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

Comment thread .github/workflows/ci.yml Outdated
Comment thread eslint.config.mjs Outdated
Comment thread eslint.config.mjs Outdated
Comment thread eslint.config.mjs Outdated
Comment thread package.json Outdated
@SakaYq4875 SakaYq4875 changed the title Feature/eslint stricter Add ESLint strictness and Prettier code formatting integration Feb 5, 2026
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@rotarymars
Copy link
Copy Markdown
Member

(m_m)

Comment thread docs/CODE-STYLE.md
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>
hatuna-827
hatuna-827 previously approved these changes Mar 22, 2026
Copy link
Copy Markdown
Contributor

@hatuna-827 hatuna-827 left a comment

Choose a reason for hiding this comment

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

ABAM

@rotarymars
Copy link
Copy Markdown
Member

あと一人です

Shirym-min
Shirym-min previously approved these changes Mar 26, 2026
@rotarymars rotarymars dismissed stale reviews from Shirym-min and hatuna-827 via d23cc2f March 26, 2026 09:32
@rotarymars
Copy link
Copy Markdown
Member

あー、マージコンフリクトでも変更扱いになってもう一度承認が必要になるんですね、

K10-K10
K10-K10 previously approved these changes Mar 26, 2026
@rotarymars rotarymars merged commit 9e1db41 into main Mar 31, 2026
19 checks passed
@rotarymars
Copy link
Copy Markdown
Member

ずっと他のPRのマージによってブロックされ続けてきたので、問題なさそうなので実行しました。

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.

10 participants