Skip to content

Comments

Moved to kebab case core final#25830

Merged
ibalosh merged 2 commits intomainfrom
moved-to-kebab-case-core-final
Jan 12, 2026
Merged

Moved to kebab case core final#25830
ibalosh merged 2 commits intomainfrom
moved-to-kebab-case-core-final

Conversation

@ibalosh
Copy link
Contributor

@ibalosh ibalosh commented Jan 12, 2026

ref #25815

  • Renamed files to match to kebab-case format
  • Updated linting rules config to match the updates - enabled kebab-case enforcement

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 12, 2026

Walkthrough

This PR renames module specifiers from PascalCase to lowercase kebab-case across core source files, tests, and JSDoc type annotations (require/import paths updated). ESLint filename rules were adjusted: core filename-exclusion list narrowed to only core/server/adapters/**, and helper filename validation regex and flag were changed. No exported API signatures or runtime control flow/logic were altered.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • 9larsons
  • cmraible
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Moved to kebab case core final' clearly summarizes the main change—converting core files from PascalCase to kebab-case naming conventions as confirmed by the changeset.
Description check ✅ Passed The description accurately explains the changeset: renaming files to kebab-case format and updating linting rules to enforce the new convention. It is directly related to all major modifications in the PR.

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

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 62cfa10 and 783d4d7.

📒 Files selected for processing (50)
  • ghost/admin/.eslintrc.js
  • ghost/core/.eslintrc.js
  • ghost/core/core/server/lib/image/blog-icon.js
  • ghost/core/core/server/lib/image/cached-image-size-from-url.js
  • ghost/core/core/server/lib/image/gravatar.js
  • ghost/core/core/server/lib/image/image-size.js
  • ghost/core/core/server/lib/image/image-utils.js
  • ghost/core/core/server/lib/image/index.js
  • ghost/core/core/server/services/custom-theme-settings.js
  • ghost/core/core/server/services/outbox/jobs/lib/process-entries.js
  • ghost/core/core/server/services/outbox/jobs/lib/process-outbox.js
  • ghost/core/core/shared/custom-theme-settings-cache/custom-theme-settings-bread-service.js
  • ghost/core/core/shared/custom-theme-settings-cache/custom-theme-settings-cache.js
  • ghost/core/core/shared/custom-theme-settings-cache/custom-theme-settings-service.js
  • ghost/core/core/shared/custom-theme-settings-cache/index.js
  • ghost/core/core/shared/events-ts/index.ts
  • ghost/core/core/shared/events-ts/post-deleted-event.ts
  • ghost/core/core/shared/events-ts/posts-bulk-add-tags-event.ts
  • ghost/core/core/shared/events-ts/posts-bulk-destroyed-event.ts
  • ghost/core/core/shared/events-ts/posts-bulk-featured-event.ts
  • ghost/core/core/shared/events-ts/posts-bulk-unfeatured-event.ts
  • ghost/core/core/shared/events-ts/posts-bulk-unpublished-event.ts
  • ghost/core/core/shared/events-ts/posts-bulk-unscheduled-event.ts
  • ghost/core/core/shared/events/index.js
  • ghost/core/core/shared/events/member-comment-event.js
  • ghost/core/core/shared/events/member-created-event.js
  • ghost/core/core/shared/events/member-entry-view-event.js
  • ghost/core/core/shared/events/member-link-click-event.js
  • ghost/core/core/shared/events/member-page-view-event.js
  • ghost/core/core/shared/events/member-paid-cancellation-event.js
  • ghost/core/core/shared/events/member-paid-conversion-event.js
  • ghost/core/core/shared/events/member-signup-event.js
  • ghost/core/core/shared/events/member-subscribe-event.js
  • ghost/core/core/shared/events/member-unsubscribe-event.js
  • ghost/core/core/shared/events/offer-redemption-event.js
  • ghost/core/core/shared/events/subscription-activated-event.js
  • ghost/core/core/shared/events/subscription-cancelled-event.js
  • ghost/core/core/shared/events/subscription-created-event.js
  • ghost/core/core/shared/events/url-resource-updated-event.js
  • ghost/core/core/shared/sentry-knex-tracing-integration.js
  • ghost/core/core/shared/sentry.js
  • ghost/core/core/shared/settings-cache/cache-manager.js
  • ghost/core/core/shared/settings-cache/index.js
  • ghost/core/test/unit/server/lib/image/blog-icon.test.js
  • ghost/core/test/unit/server/lib/image/cached-image-size-from-url.test.js
  • ghost/core/test/unit/server/lib/image/gravatar.test.js
  • ghost/core/test/unit/server/lib/image/image-size.test.js
  • ghost/core/test/unit/shared/custom-theme-settings-cache/cache.test.js
  • ghost/core/test/unit/shared/custom-theme-settings-cache/service.test.js
  • ghost/core/test/unit/shared/settings-cache.test.js
✅ Files skipped from review due to trivial changes (2)
  • ghost/core/core/shared/sentry.js
  • ghost/core/core/server/lib/image/image-utils.js
🚧 Files skipped from review as they are similar to previous changes (8)
  • ghost/core/test/unit/shared/custom-theme-settings-cache/cache.test.js
  • ghost/core/core/shared/custom-theme-settings-cache/custom-theme-settings-service.js
  • ghost/core/core/shared/events/index.js
  • ghost/core/test/unit/server/lib/image/image-size.test.js
  • ghost/core/core/shared/events-ts/index.ts
  • ghost/core/core/server/services/outbox/jobs/lib/process-entries.js
  • ghost/core/test/unit/server/lib/image/gravatar.test.js
  • ghost/core/core/shared/custom-theme-settings-cache/index.js
🧰 Additional context used
🧠 Learnings (15)
📓 Common learnings
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/components/**/*.{ts,tsx} : Use `PascalCase` for component identifiers in filenames while keeping ShadCN-generated files in kebab-case
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/**/*.{ts,tsx,js} : Use `camelCase` for function and variable names
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Test names should be lowercase and follow the format 'what is tested - expected outcome'
📚 Learning: 2026-01-08T10:26:38.700Z
Learnt from: rob-ghost
Repo: TryGhost/Ghost PR: 25791
File: ghost/core/core/server/api/endpoints/member-comment-ban.js:64-68
Timestamp: 2026-01-08T10:26:38.700Z
Learning: In the Ghost API, endpoints rely on the serialization layer to prepare frame.data[docName] as a non-empty array before query() executes. Endpoints access frame.data[docName][0] directly (e.g., frame.data.comment_bans[0], frame.data.members[0], frame.data.posts[0]) without per-endpoint validation. This pattern is common across API endpoints. When maintaining or creating endpoints, avoid duplicating validation for frame.data[docName] and ensure the serializer guarantees the shape and non-emptiness. If you add a new endpoint that uses this frame.data[docName], follow the same assumption and avoid redundant checks unless there's a documented exception.

Applied to files:

  • ghost/core/core/server/services/custom-theme-settings.js
  • ghost/core/core/server/lib/image/index.js
  • ghost/core/test/unit/shared/settings-cache.test.js
  • ghost/core/test/unit/server/lib/image/blog-icon.test.js
  • ghost/core/test/unit/server/lib/image/cached-image-size-from-url.test.js
  • ghost/core/test/unit/shared/custom-theme-settings-cache/service.test.js
  • ghost/core/core/shared/settings-cache/index.js
  • ghost/core/core/server/services/outbox/jobs/lib/process-outbox.js
📚 Learning: 2025-08-11T19:39:00.428Z
Learnt from: kevinansfield
Repo: TryGhost/Ghost PR: 24651
File: ghost/core/test/utils/urlUtils.js:53-57
Timestamp: 2025-08-11T19:39:00.428Z
Learning: In Ghost's test utilities, when fixing specific issues like async behavior, it's preferred to maintain existing error handling patterns (even if suboptimal) to keep PRs focused on their primary objective. Error handling improvements can be addressed in separate, dedicated PRs.

Applied to files:

  • ghost/admin/.eslintrc.js
📚 Learning: 2025-11-24T11:12:15.712Z
Learnt from: sagzy
Repo: TryGhost/Ghost PR: 24673
File: ghost/i18n/lib/i18n.js:34-35
Timestamp: 2025-11-24T11:12:15.712Z
Learning: In the Ghost i18n package (ghost/i18n/lib/i18n.js), changing existing locale codes requires backwards compatibility handling for users who have already configured those locales. Such changes should be done in a separate PR with migration logic rather than included in feature PRs.

Applied to files:

  • ghost/admin/.eslintrc.js
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/src/components/**/*.{ts,tsx} : Use `PascalCase` for component identifiers in filenames while keeping ShadCN-generated files in kebab-case

Applied to files:

  • ghost/admin/.eslintrc.js
  • ghost/core/.eslintrc.js
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Test suite names should follow the format 'Ghost Admin - Feature' or 'Ghost Public - Feature'

Applied to files:

  • ghost/admin/.eslintrc.js
📚 Learning: 2025-11-26T11:05:59.314Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: apps/shade/AGENTS.md:0-0
Timestamp: 2025-11-26T11:05:59.314Z
Learning: Applies to apps/shade/{src,test}/**/*.{ts,tsx,js} : Follow ESLint and `tailwindcss/*` plugin rules when writing styles

Applied to files:

  • ghost/admin/.eslintrc.js
  • ghost/core/.eslintrc.js
📚 Learning: 2025-05-29T07:45:35.714Z
Learnt from: ErisDS
Repo: TryGhost/Ghost PR: 23582
File: ghost/core/.c8rc.json:24-24
Timestamp: 2025-05-29T07:45:35.714Z
Learning: In Ghost project, app.js files under core/server/web are intentionally excluded from unit test coverage because they are not easily unit-testable due to being entry points with initialization code and side effects.

Applied to files:

  • ghost/core/.eslintrc.js
📚 Learning: 2025-10-30T17:13:26.190Z
Learnt from: sam-lord
Repo: TryGhost/Ghost PR: 25303
File: ghost/core/core/server/services/email-service/BatchSendingService.js:19-19
Timestamp: 2025-10-30T17:13:26.190Z
Learning: In ghost/core/core/server/services/email-service/BatchSendingService.js and similar files in the Ghost codebase, prefer using `{...options}` spread syntax without explicit guards like `...(options || {})` when spreading potentially undefined objects, as the maintainer prefers cleaner syntax over defensive patterns when the behavior is safe.

Applied to files:

  • ghost/core/.eslintrc.js
📚 Learning: 2025-08-01T12:44:07.467Z
Learnt from: niranjan-uma-shankar
Repo: TryGhost/Ghost PR: 24557
File: apps/admin-x-settings/src/components/settings/general/TimeZone.tsx:7-7
Timestamp: 2025-08-01T12:44:07.467Z
Learning: In Ghost development, PRs may depend on unpublished changes from SDK packages. When this occurs, TypeScript compilation errors for missing exports are expected and documented in the PR description until the dependency packages are published and updated. This is normal workflow for cross-repository feature development.

Applied to files:

  • ghost/core/.eslintrc.js
📚 Learning: 2025-11-25T14:28:50.351Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:28:50.351Z
Learning: Run `yarn lint` to lint all packages or `cd ghost/core && yarn lint` to lint Ghost core (server, shared, frontend, tests)

Applied to files:

  • ghost/core/.eslintrc.js
📚 Learning: 2025-04-23T15:44:52.549Z
Learnt from: 9larsons
Repo: TryGhost/Ghost PR: 21866
File: ghost/core/core/server/web/admin/middleware/serve-auth-frame-file.js:10-19
Timestamp: 2025-04-23T15:44:52.549Z
Learning: The existing implementation in `ghost/core/core/server/web/admin/middleware/serve-auth-frame-file.js` using `path.parse(req.url).base` is secure against path traversal attacks as it properly extracts only the filename component without any directory parts.

Applied to files:

  • ghost/core/.eslintrc.js
📚 Learning: 2025-11-25T14:28:50.351Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T14:28:50.351Z
Learning: Ghost admin serves admin-x apps from `/ghost/assets/{app-name}/{app-name}.js` URLs

Applied to files:

  • ghost/core/.eslintrc.js
📚 Learning: 2025-11-24T17:29:43.865Z
Learnt from: CR
Repo: TryGhost/Ghost PR: 0
File: e2e/AGENTS.md:0-0
Timestamp: 2025-11-24T17:29:43.865Z
Learning: Applies to e2e/**/*.test.ts : Test names should be lowercase and follow the format 'what is tested - expected outcome'

Applied to files:

  • ghost/core/test/unit/server/lib/image/cached-image-size-from-url.test.js
  • ghost/core/test/unit/shared/custom-theme-settings-cache/service.test.js
📚 Learning: 2025-11-10T23:10:17.470Z
Learnt from: troyciesco
Repo: TryGhost/Ghost PR: 25288
File: ghost/core/core/server/services/member-welcome-emails/jobs/lib/process-entries.js:46-64
Timestamp: 2025-11-10T23:10:17.470Z
Learning: In ghost/core/core/server/services/member-welcome-emails/jobs/lib/process-entries.js and the outbox processing flow, entries are marked as PROCESSING before being processed. If a failure occurs after email send but before deletion, the entry remains stuck in PROCESSING state (not reprocessed). This intentional design prevents duplicate emails. Handling stuck PROCESSING entries is planned for a separate PR.

Applied to files:

  • ghost/core/core/server/services/outbox/jobs/lib/process-outbox.js
🧬 Code graph analysis (6)
ghost/core/test/unit/shared/settings-cache.test.js (1)
ghost/core/core/shared/settings-cache/index.js (1)
  • CacheManager (1-1)
ghost/core/test/unit/server/lib/image/blog-icon.test.js (1)
ghost/core/core/server/lib/image/image-utils.js (1)
  • BlogIcon (1-1)
ghost/core/test/unit/server/lib/image/cached-image-size-from-url.test.js (1)
ghost/core/core/server/lib/image/image-utils.js (1)
  • CachedImageSizeFromUrl (2-2)
ghost/core/test/unit/shared/custom-theme-settings-cache/service.test.js (2)
ghost/core/test/unit/shared/custom-theme-settings-cache/cache.test.js (1)
  • Cache (3-3)
ghost/core/core/shared/custom-theme-settings-cache/custom-theme-settings-service.js (1)
  • require (5-5)
ghost/core/core/shared/settings-cache/index.js (1)
ghost/core/test/unit/shared/settings-cache.test.js (1)
  • CacheManager (7-7)
ghost/core/core/server/services/outbox/jobs/lib/process-outbox.js (1)
ghost/core/core/server/services/outbox/jobs/lib/process-entries.js (3)
  • MemberCreatedEvent (4-4)
  • require (2-2)
  • require (3-3)
🔇 Additional comments (11)
ghost/core/core/server/services/outbox/jobs/lib/process-outbox.js (1)

3-3: LGTM!

The import path update to member-created-event (kebab-case) is consistent with the same import pattern in the sibling file process-entries.js (line 3), aligning with the PR's kebab-case migration objective.

ghost/core/test/unit/shared/settings-cache.test.js (1)

7-7: LGTM!

The import path is correctly updated to the kebab-case filename cache-manager. The variable name CacheManager appropriately remains PascalCase as it references a class constructor.

ghost/core/core/shared/settings-cache/index.js (1)

1-1: LGTM!

The require path is correctly updated to use kebab-case (./cache-manager), consistent with the corresponding test file import.

ghost/core/test/unit/shared/custom-theme-settings-cache/service.test.js (1)

8-9: LGTM!

Import paths correctly updated to lowercase kebab-case, consistent with the cache.test.js pattern shown in the relevant code snippets and the broader PR migration objectives.

ghost/core/core/server/lib/image/index.js (1)

8-8: LGTM!

Import path correctly updated to kebab-case format, aligning with the broader filename migration in this PR.

ghost/core/core/server/services/custom-theme-settings.js (1)

1-1: LGTM!

Import path correctly updated to lowercase kebab-case, consistent with the renamed module file and the broader codebase migration.

ghost/core/.eslintrc.js (2)

120-127: Helper filename rule correctly configured.

Setting the rule to 'off' for helper files is the right approach since these filenames (e.g., ghost_head.js) directly map to Handlebars helper names and cannot be renamed without breaking existing themes.


103-118: Kebab-case exclusions appropriately narrowed.

The reduction of excludedFiles to only core/server/adapters/** is appropriate since:

  1. Adapter filenames must match config values (well-documented in comment)
  2. Other previously-excluded directories have been migrated to kebab-case in this PR

All files in core/shared/events, core/shared/events-ts, core/shared/custom-theme-settings-cache, core/shared/settings-cache, and core/server/lib now follow kebab-case naming conventions.

ghost/admin/.eslintrc.js (1)

31-32: Kebab-case filename rule is correctly configured.

The regex pattern ^[a-z0-9.-]+$ properly enforces kebab-case filenames. All 670 existing source files (.js/.ts/.tsx) in ghost/admin already comply with this rule—no violations found. Safe to merge without requiring file migrations.

ghost/core/test/unit/server/lib/image/blog-icon.test.js (1)

4-4: LGTM!

The import path correctly reflects the renamed source file to kebab-case. This is consistent with the source file update in image-utils.js which also imports from ./blog-icon.

ghost/core/test/unit/server/lib/image/cached-image-size-from-url.test.js (1)

4-5: LGTM!

The import path for CachedImageSizeFromUrl correctly reflects the kebab-case rename. The MemoryCache import on line 5 appropriately remains PascalCase as adapter files are excluded from the kebab-case enforcement.


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.

@ibalosh ibalosh force-pushed the moved-to-kebab-case-core-final branch 3 times, most recently from 62cfa10 to 2ab72de Compare January 12, 2026 12:19
@ibalosh ibalosh force-pushed the moved-to-kebab-case-core-final branch from 2ab72de to 783d4d7 Compare January 12, 2026 12:34
@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.35%. Comparing base (865c618) to head (783d4d7).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #25830   +/-   ##
=======================================
  Coverage   72.35%   72.35%           
=======================================
  Files        1542     1542           
  Lines      118532   118532           
  Branches    14218    14218           
=======================================
+ Hits        85761    85766    +5     
+ Misses      31756    31751    -5     
  Partials     1015     1015           
Flag Coverage Δ
admin-tests 51.83% <ø> (+0.03%) ⬆️
e2e-tests 72.35% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ibalosh ibalosh merged commit 1ffd35c into main Jan 12, 2026
39 checks passed
@ibalosh ibalosh deleted the moved-to-kebab-case-core-final branch January 12, 2026 13:32
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.

1 participant