refactor: use singular and kebab-case for source folder names by tbouffard · Pull Request #985 · maxGraph/maxGraph · GitHub
Skip to content

refactor: use singular and kebab-case for source folder names#985

Merged
tbouffard merged 3 commits into
mainfrom
refactor/source_folders_name_kebab-case_only
Dec 23, 2025
Merged

refactor: use singular and kebab-case for source folder names#985
tbouffard merged 3 commits into
mainfrom
refactor/source_folders_name_kebab-case_only

Conversation

@tbouffard

@tbouffard tbouffard commented Dec 23, 2025

Copy link
Copy Markdown
Member

Standardize folder naming convention:

  • codecs → codec
  • mixins → mixin
  • plugins → plugin
  • undoable_changes → undoable-change

Summary by CodeRabbit

  • Refactor
    • Internal module and export locations reorganized for consistency; no changes to public APIs or runtime behavior visible to users.
  • Documentation
    • Added guidance on source folder naming (singular, kebab-case) to developer docs.
  • Note
    • User-facing features and functionality remain unchanged.

✏️ Tip: You can customize this high-level summary in your review settings.

Standardize folder naming convention:
  - codecs → codec
  - mixins → mixin
  - plugins → plugin
  - undoable_changes → undoable-change
@tbouffard tbouffard added the refactor Code refactoring label Dec 23, 2025
@coderabbitai

coderabbitai Bot commented Dec 23, 2025

Copy link
Copy Markdown

Document the naming rules for source folders in packages/core/src/:
- Use singular form (handler/, not handlers/)
- Use kebab-case (my-feature/, not myFeature/)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 64dd088 and d076d35.

📒 Files selected for processing (1)
  • CLAUDE.md
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js,jsx,json,md}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Format code using Prettier with tab width 2, trailing comma ES5, print width 90, and end of line auto.

Files:

  • CLAUDE.md
🧠 Learnings (5)
📓 Common learnings
Learnt from: tbouffard
Repo: maxGraph/maxGraph PR: 857
File: packages/core/src/view/plugins/SelectionHandler.ts:1081-1092
Timestamp: 2025-06-26T13:27:19.012Z
Learning: User tbouffard prefers to keep PRs focused on their main objective and defer implementation improvements or logic fixes to future dedicated PRs. For maxGraph, refactoring PRs like Dictionary→Map migration should not include unrelated logic improvements even when valid issues are identified in the migrated code.
Learnt from: tbouffard
Repo: maxGraph/maxGraph PR: 776
File: packages/core/src/view/AbstractGraph.ts:492-495
Timestamp: 2025-04-24T12:34:56.726Z
Learning: PR #776 focuses on refactoring to introduce AbstractGraph as a base class and moving code from Graph to AbstractGraph. Type improvements and other refinements should be addressed in future PRs to keep this one focused on the core architectural change.
Learnt from: CR
Repo: maxGraph/maxGraph PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T13:43:28.685Z
Learning: Applies to packages/core/package.json : Configure imports and exports to use ES2020 module format, with conditional exports supporting both ESM and CommonJS through proper package.json exports field.
Learnt from: CR
Repo: maxGraph/maxGraph PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T16:45:26.610Z
Learning: Applies to packages/core/__tests__/**/*.ts : Import paths in tests should omit the `.js` extension (handled by moduleNameMapper)
Learnt from: tbouffard
Repo: maxGraph/maxGraph PR: 849
File: packages/html/stories/DragSource.stories.js:98-101
Timestamp: 2025-06-13T07:48:10.300Z
Learning: User tbouffard prefers answers in English; avoid switching to other languages in future replies.
📚 Learning: 2025-12-19T16:45:26.610Z
Learnt from: CR
Repo: maxGraph/maxGraph PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T16:45:26.610Z
Learning: Applies to packages/core/src/**/*.ts : Use functions from `internal/i18n-utils.js` (translate, isI18nEnabled) instead of accessing `GlobalConfig.i18n` directly

Applied to files:

  • CLAUDE.md
📚 Learning: 2025-12-19T16:45:26.610Z
Learnt from: CR
Repo: maxGraph/maxGraph PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T16:45:26.610Z
Learning: Applies to packages/core/__tests__/**/*.ts : Tests should be located in `packages/core/__tests__/` mirroring the structure of `src/` directory

Applied to files:

  • CLAUDE.md
📚 Learning: 2025-12-19T16:45:26.610Z
Learnt from: CR
Repo: maxGraph/maxGraph PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-19T16:45:26.610Z
Learning: Applies to packages/core/src/**/*.ts : Shapes must be registered via registries (e.g., `ShapeRegistry`) before use; `Graph` class auto-registers default shapes, but `BaseGraph` requires manual registration

Applied to files:

  • CLAUDE.md
📚 Learning: 2025-12-10T13:43:28.685Z
Learnt from: CR
Repo: maxGraph/maxGraph PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-12-10T13:43:28.685Z
Learning: Applies to packages/core/__tests__/**/*.test.ts : Test files must follow the naming pattern `**/*.test.ts` and be located in `packages/core/__tests__/` directory.

Applied to files:

  • CLAUDE.md
🪛 markdownlint-cli2 (0.18.1)
CLAUDE.md

299-299: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🔇 Additional comments (1)
CLAUDE.md (1)

293-309: Source folder naming guidelines are clear and well-documented.

The new section effectively documents the naming convention (singular form, kebab-case) with concrete good/bad examples. The placement and tone align well with the rest of CLAUDE.md and match the PR objectives for standardizing folder names.

Comment thread CLAUDE.md Outdated
@sonarqubecloud

Copy link
Copy Markdown

@tbouffard tbouffard merged commit 2fee9aa into main Dec 23, 2025
6 checks passed
@tbouffard tbouffard deleted the refactor/source_folders_name_kebab-case_only branch December 23, 2025 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Code refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant