Skip to content

Conversation

@pkuczynski
Copy link
Collaborator

@pkuczynski pkuczynski commented Nov 9, 2025

Description of change

Similar to #11755 but for samples folder. Additionally removes a lot of commented code...

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • This pull request links relevant issues as Fixes #00000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change

Summary by CodeRabbit

Release Notes

  • Refactor

    • Simplified module import paths across sample applications for improved consistency.
    • Standardized decorator syntax patterns in entity definitions for cleaner code structure.
    • Removed unused callback parameters in promise chains to reduce code verbosity.
    • Eliminated redundant code blocks throughout samples for better maintainability.
  • Chores

    • Code organization and cleanup across sample applications.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 9, 2025

Walkthrough

Standardizes import paths from "../../src/index" to "../../src" across all sample applications. Removes unused parameters from promise chain callbacks in multiple sample app files. Updates decorator signatures in entity files by changing type resolver patterns from (type) => Class to () => Class. Removes commented code blocks from several sample applications.

Changes

Cohort / File(s) Summary
Import path updates across sample app.ts files
sample/sample1-simple-entity/app.ts, sample/sample10-mixed/app.ts, sample/sample11-all-types-entity/app.ts, sample/sample12-custom-naming-strategy/app.ts, sample/sample13-everywhere-abstraction/app.ts, sample/sample14-errors-in-wrong-metdata/app.ts, sample/sample16-indexes/app.ts, sample/sample17-versioning/app.ts, sample/sample18-lazy-relations/app.ts, sample/sample19-one-side-relations/app.ts, sample/sample2-one-to-one/app.ts, sample/sample20-join-without-relation/app.ts, sample/sample21-custom-join-table-column/app.ts, sample/sample22-closure-table/app.ts, sample/sample23-nested-joins/app.ts, sample/sample25-insert-from-inverse-side/app.ts, sample/sample26-embedded-tables/app.ts, sample/sample27-composite-primary-keys/app.ts, sample/sample28-single-table-inheritance/app.ts, sample/sample3-many-to-one/app.ts, sample/sample30-default-order-by/app.ts, sample/sample31-table-prefix/app.ts, sample/sample32-migrations/app.ts, sample/sample34-mongodb/app.ts, sample/sample4-many-to-many/app.ts, sample/sample5-subscribers/app.ts, sample/sample6-abstract-table/app.ts, sample/sample7-pagination/app.ts, sample/sample8-self-referencing/app.ts, sample/sample9-entity-listeners/app.ts
Changed import resolution from "../../src/index" to "../../src" for DataSource and DataSourceOptions.
Promise chain parameter removals in app.ts files
sample/sample10-mixed/app.ts, sample/sample11-all-types-entity/app.ts, sample/sample12-custom-naming-strategy/app.ts, sample/sample14-errors-in-wrong-metdata/app.ts, sample/sample18-lazy-relations/app.ts, sample/sample19-one-side-relations/app.ts, sample/sample2-one-to-one/app.ts, sample/sample20-join-without-relation/app.ts, sample/sample21-custom-join-table-column/app.ts, sample/sample22-closure-table/app.ts, sample/sample23-nested-joins/app.ts, sample/sample25-insert-from-inverse-side/app.ts, sample/sample3-many-to-one/app.ts, sample/sample4-many-to-many/app.ts, sample/sample5-subscribers/app.ts, sample/sample7-pagination/app.ts, sample/sample9-entity-listeners/app.ts
Removed unused parameters from .then() handlers in promise chains (e.g., .then((post) => ...).then(() => ...)).
Commented code removal in app.ts files
sample/sample10-mixed/app.ts, sample/sample19-one-side-relations/app.ts, sample/sample20-join-without-relation/app.ts
Removed large blocks of commented/dead code containing complex query-building and entity manipulation logic.
ManyToMany decorator signature updates in entity files
sample/sample13-everywhere-abstraction/entity/Blog.ts, sample/sample13-everywhere-abstraction/entity/Post.ts, sample/sample13-everywhere-abstraction/entity/PostCategory.ts, sample/sample14-errors-in-wrong-metdata/entity/Post.ts, sample/sample18-lazy-relations/entity/Category.ts, sample/sample20-join-without-relation/entity/Post.ts, sample/sample21-custom-join-table-column/entity/Category.ts, sample/sample23-nested-joins/entity/Category.ts, sample/sample30-default-order-by/entity/Post.ts, sample/sample4-many-to-many/entity/Post.ts, sample/sample4-many-to-many/entity/PostAuthor.ts, sample/sample4-many-to-many/entity/PostDetails.ts, sample/sample4-many-to-many/entity/PostImage.ts, sample/sample4-many-to-many/entity/PostInformation.ts, sample/sample4-many-to-many/entity/PostMetadata.ts, sample/sample5-subscribers/entity/PostCategory.ts, sample/sample6-abstract-table/entity/PostCategory.ts, sample/sample7-pagination/entity/PostCategory.ts, sample/sample9-entity-listeners/entity/PostCategory.ts
Updated @ManyToMany decorator first argument from (type) => TargetClass to () => TargetClass pattern across multiple relation definitions.
Column decorator signature updates in entity files
sample/sample26-embedded-tables/entity/Post.ts, sample/sample26-embedded-tables/entity/Question.ts
Updated @Column decorator argument from (type) => EmbeddedClass to () => EmbeddedClass for embedded type references.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Decorator pattern consistency: Verify that changing all type resolver functions from (type) => Class to () => Class does not affect ORM's type resolution logic or lazy loading behavior. These changes affect decorator metadata which controls runtime relation and column type handling.
  • Import path resolution: Confirm that "../../src" re-exports all necessary symbols that were previously exported from "../../src/index", ensuring no missing exports or import breakage.
  • Promise chain refactoring: Review promise chain parameter removals to ensure no side effects or unintended state changes from unused parameter elimination in callback handlers.
  • Code removal verification: Check that removed commented code blocks were genuinely dead code with no hidden dependencies or undocumented behaviors.

Possibly related PRs

Suggested reviewers

  • mguida22
  • gioboa
  • naorpeled

Poem

🐰 Hops through the samples with glee,
From index to src, paths run free,
Decorators simplified, less to refine,
Unused parameters? Left behind!
A cleaner codebase, don't you agree?

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: fixing eslint violations for the @typescript-eslint/no-unused-vars rule across sample files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b639d33 and 3987589.

📒 Files selected for processing (51)
  • sample/sample1-simple-entity/app.ts (1 hunks)
  • sample/sample10-mixed/app.ts (1 hunks)
  • sample/sample11-all-types-entity/app.ts (2 hunks)
  • sample/sample12-custom-naming-strategy/app.ts (2 hunks)
  • sample/sample13-everywhere-abstraction/app.ts (1 hunks)
  • sample/sample13-everywhere-abstraction/entity/Blog.ts (1 hunks)
  • sample/sample13-everywhere-abstraction/entity/Post.ts (1 hunks)
  • sample/sample13-everywhere-abstraction/entity/PostCategory.ts (1 hunks)
  • sample/sample14-errors-in-wrong-metdata/app.ts (2 hunks)
  • sample/sample14-errors-in-wrong-metdata/entity/Post.ts (1 hunks)
  • sample/sample16-indexes/app.ts (1 hunks)
  • sample/sample17-versioning/app.ts (1 hunks)
  • sample/sample18-lazy-relations/app.ts (5 hunks)
  • sample/sample18-lazy-relations/entity/Category.ts (1 hunks)
  • sample/sample19-one-side-relations/app.ts (1 hunks)
  • sample/sample2-one-to-one/app.ts (2 hunks)
  • sample/sample20-join-without-relation/app.ts (1 hunks)
  • sample/sample20-join-without-relation/entity/Post.ts (1 hunks)
  • sample/sample21-custom-join-table-column/app.ts (2 hunks)
  • sample/sample21-custom-join-table-column/entity/Category.ts (1 hunks)
  • sample/sample22-closure-table/app.ts (2 hunks)
  • sample/sample23-nested-joins/app.ts (6 hunks)
  • sample/sample23-nested-joins/entity/Category.ts (1 hunks)
  • sample/sample25-insert-from-inverse-side/app.ts (3 hunks)
  • sample/sample26-embedded-tables/app.ts (1 hunks)
  • sample/sample26-embedded-tables/entity/Post.ts (1 hunks)
  • sample/sample26-embedded-tables/entity/Question.ts (1 hunks)
  • sample/sample27-composite-primary-keys/app.ts (1 hunks)
  • sample/sample28-single-table-inheritance/app.ts (1 hunks)
  • sample/sample3-many-to-one/app.ts (2 hunks)
  • sample/sample30-default-order-by/app.ts (1 hunks)
  • sample/sample30-default-order-by/entity/Post.ts (1 hunks)
  • sample/sample31-table-prefix/app.ts (1 hunks)
  • sample/sample32-migrations/app.ts (1 hunks)
  • sample/sample34-mongodb/app.ts (1 hunks)
  • sample/sample4-many-to-many/app.ts (2 hunks)
  • sample/sample4-many-to-many/entity/Post.ts (1 hunks)
  • sample/sample4-many-to-many/entity/PostAuthor.ts (1 hunks)
  • sample/sample4-many-to-many/entity/PostDetails.ts (1 hunks)
  • sample/sample4-many-to-many/entity/PostImage.ts (1 hunks)
  • sample/sample4-many-to-many/entity/PostInformation.ts (1 hunks)
  • sample/sample4-many-to-many/entity/PostMetadata.ts (1 hunks)
  • sample/sample5-subscribers/app.ts (2 hunks)
  • sample/sample5-subscribers/entity/PostCategory.ts (1 hunks)
  • sample/sample6-abstract-table/app.ts (1 hunks)
  • sample/sample6-abstract-table/entity/PostCategory.ts (1 hunks)
  • sample/sample7-pagination/app.ts (2 hunks)
  • sample/sample7-pagination/entity/PostCategory.ts (1 hunks)
  • sample/sample8-self-referencing/app.ts (1 hunks)
  • sample/sample9-entity-listeners/app.ts (2 hunks)
  • sample/sample9-entity-listeners/entity/PostCategory.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-07-27T20:50:10.364Z
Learnt from: alumni
Repo: typeorm/typeorm PR: 11581
File: docs/docs/drivers/postgres.md:23-23
Timestamp: 2025-07-27T20:50:10.364Z
Learning: The correct data source type for Aurora PostgreSQL in TypeORM is `aurora-postgres`, not `aurora-data-api-pg`. The `aurora-data-api-pg` driver was renamed to `aurora-postgres` according to the CHANGELOG.md. This is defined in the DatabaseType union type and AuroraPostgresConnectionOptions interface.

Applied to files:

  • sample/sample11-all-types-entity/app.ts
  • sample/sample21-custom-join-table-column/app.ts
  • sample/sample27-composite-primary-keys/app.ts
  • sample/sample12-custom-naming-strategy/app.ts
  • sample/sample4-many-to-many/app.ts
  • sample/sample13-everywhere-abstraction/app.ts
  • sample/sample34-mongodb/app.ts
  • sample/sample2-one-to-one/app.ts
  • sample/sample16-indexes/app.ts
  • sample/sample7-pagination/app.ts
  • sample/sample17-versioning/app.ts
  • sample/sample32-migrations/app.ts
  • sample/sample1-simple-entity/app.ts
  • sample/sample6-abstract-table/app.ts
  • sample/sample14-errors-in-wrong-metdata/app.ts
  • sample/sample18-lazy-relations/app.ts
  • sample/sample5-subscribers/app.ts
  • sample/sample23-nested-joins/app.ts
  • sample/sample31-table-prefix/app.ts
  • sample/sample26-embedded-tables/app.ts
  • sample/sample3-many-to-one/app.ts
  • sample/sample10-mixed/app.ts
  • sample/sample9-entity-listeners/app.ts
  • sample/sample25-insert-from-inverse-side/app.ts
  • sample/sample30-default-order-by/app.ts
  • sample/sample19-one-side-relations/app.ts
  • sample/sample20-join-without-relation/app.ts
🧬 Code graph analysis (21)
sample/sample9-entity-listeners/entity/PostCategory.ts (1)
src/decorator/relations/ManyToMany.ts (1)
  • ManyToMany (33-77)
sample/sample21-custom-join-table-column/entity/Category.ts (1)
src/decorator/relations/ManyToMany.ts (1)
  • ManyToMany (33-77)
sample/sample4-many-to-many/entity/PostImage.ts (1)
src/decorator/relations/ManyToMany.ts (1)
  • ManyToMany (33-77)
sample/sample6-abstract-table/entity/PostCategory.ts (1)
src/decorator/relations/ManyToMany.ts (1)
  • ManyToMany (33-77)
sample/sample4-many-to-many/entity/PostDetails.ts (1)
src/decorator/relations/ManyToMany.ts (1)
  • ManyToMany (33-77)
sample/sample7-pagination/entity/PostCategory.ts (1)
src/decorator/relations/ManyToMany.ts (1)
  • ManyToMany (33-77)
sample/sample20-join-without-relation/entity/Post.ts (1)
src/decorator/relations/ManyToMany.ts (1)
  • ManyToMany (33-77)
sample/sample26-embedded-tables/entity/Post.ts (1)
src/decorator/columns/Column.ts (1)
  • Column (134-220)
sample/sample26-embedded-tables/entity/Question.ts (1)
src/decorator/columns/Column.ts (1)
  • Column (134-220)
sample/sample14-errors-in-wrong-metdata/entity/Post.ts (1)
src/decorator/relations/ManyToMany.ts (1)
  • ManyToMany (33-77)
sample/sample4-many-to-many/entity/PostInformation.ts (1)
src/decorator/relations/ManyToMany.ts (1)
  • ManyToMany (33-77)
sample/sample30-default-order-by/entity/Post.ts (1)
src/decorator/relations/ManyToMany.ts (1)
  • ManyToMany (33-77)
sample/sample4-many-to-many/entity/PostAuthor.ts (1)
src/decorator/relations/ManyToMany.ts (1)
  • ManyToMany (33-77)
sample/sample4-many-to-many/entity/Post.ts (1)
src/decorator/relations/ManyToMany.ts (1)
  • ManyToMany (33-77)
sample/sample5-subscribers/entity/PostCategory.ts (1)
src/decorator/relations/ManyToMany.ts (1)
  • ManyToMany (33-77)
sample/sample23-nested-joins/entity/Category.ts (1)
src/decorator/relations/ManyToMany.ts (1)
  • ManyToMany (33-77)
sample/sample13-everywhere-abstraction/entity/Blog.ts (1)
src/decorator/relations/ManyToMany.ts (1)
  • ManyToMany (33-77)
sample/sample4-many-to-many/entity/PostMetadata.ts (1)
src/decorator/relations/ManyToMany.ts (1)
  • ManyToMany (33-77)
sample/sample13-everywhere-abstraction/entity/PostCategory.ts (1)
src/decorator/relations/ManyToMany.ts (1)
  • ManyToMany (33-77)
sample/sample13-everywhere-abstraction/entity/Post.ts (1)
src/decorator/relations/ManyToMany.ts (1)
  • ManyToMany (33-77)
sample/sample18-lazy-relations/entity/Category.ts (1)
src/decorator/relations/ManyToMany.ts (1)
  • ManyToMany (33-77)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: tests-linux (18) / sqlite
  • GitHub Check: tests-linux (18) / sqljs
  • GitHub Check: tests-windows / sqlite
  • GitHub Check: tests-windows / sqljs
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (65)
sample/sample23-nested-joins/entity/Category.ts (1)

14-14: LGTM! Unused parameter removed.

The removal of the unused type parameter correctly fixes the @typescript-eslint/no-unused-vars violation while maintaining identical functionality.

sample/sample20-join-without-relation/entity/Post.ts (1)

21-21: LGTM! Unused parameter correctly removed.

The change from (type) => Category to () => Category properly fixes the lint violation by removing the unused type parameter.

sample/sample26-embedded-tables/entity/Post.ts (1)

15-15: LGTM! Unused parameter correctly removed.

The change from (type) => Counters to () => Counters properly addresses the lint violation.

sample/sample7-pagination/entity/PostCategory.ts (1)

13-16: LGTM! Unused parameter correctly removed.

The decorator signature update removes the unused type parameter while preserving the inverse side mapping and cascade options.

sample/sample30-default-order-by/entity/Post.ts (1)

22-22: LGTM! Unused parameter correctly removed.

The change properly fixes the lint violation by removing the unused type parameter.

sample/sample4-many-to-many/entity/PostAuthor.ts (1)

17-18: LGTM! Unused parameter correctly removed.

The decorator update removes the unused type parameter while maintaining the proper inverse side mapping.

sample/sample21-custom-join-table-column/entity/Category.ts (1)

13-14: LGTM! Unused parameter correctly removed.

The change properly addresses the lint violation by removing the unused type parameter from the decorator function.

sample/sample18-lazy-relations/entity/Category.ts (1)

13-14: LGTM! Unused parameter correctly removed.

The decorator signature update removes the unused type parameter while maintaining the lazy relation behavior.

sample/sample6-abstract-table/entity/PostCategory.ts (1)

13-16: LGTM! Unused parameter correctly removed.

The change correctly fixes the lint violation while preserving the inverse side mapping and cascade configuration.

sample/sample27-composite-primary-keys/app.ts (1)

2-2: LGTM: Import path simplification.

The import path change from "../../src/index" to "../../src" correctly relies on the barrel export and aligns with the PR's goal to standardize imports across samples.

sample/sample1-simple-entity/app.ts (1)

2-2: LGTM: Import path simplification.

The import path change correctly simplifies module resolution without affecting behavior.

sample/sample8-self-referencing/app.ts (1)

2-2: LGTM: Import path simplification.

The import path change is consistent with the PR's standardization effort.

sample/sample26-embedded-tables/app.ts (1)

2-2: LGTM: Import path simplification.

The import path change is correct and consistent with other samples.

sample/sample32-migrations/app.ts (1)

2-2: LGTM: Import path simplification.

The import path change correctly simplifies module resolution.

sample/sample11-all-types-entity/app.ts (2)

2-2: LGTM: Import path simplification.

The import path change correctly simplifies module resolution.


102-102: LGTM: Fixes unused variable lint violation.

Removing the unused entity parameter correctly addresses the @typescript-eslint/no-unused-vars rule without affecting behavior.

sample/sample30-default-order-by/app.ts (1)

2-2: LGTM: Import path simplification.

The import path change is consistent with the PR's standardization effort.

sample/sample5-subscribers/app.ts (2)

2-2: LGTM: Import path simplification.

The import path change correctly simplifies module resolution.


69-69: LGTM: Fixes unused variable lint violation.

Removing the unused post parameter correctly addresses the @typescript-eslint/no-unused-vars rule without affecting behavior.

sample/sample17-versioning/app.ts (1)

2-2: LGTM: Import path standardization.

The import path change from "../../src/index" to "../../src" standardizes module resolution across sample files without affecting functionality.

sample/sample13-everywhere-abstraction/app.ts (1)

2-2: LGTM: Import path standardization.

Consistent with other samples in this PR, the import path is simplified to "../../src".

sample/sample31-table-prefix/app.ts (1)

2-2: LGTM: Import path standardization.

The import path simplification is consistent with the broader refactoring across sample files.

sample/sample9-entity-listeners/app.ts (2)

2-2: LGTM: Import path standardization.

The import path is simplified consistently with other sample files.


69-71: LGTM: Unused parameter removal.

The callback parameter from postRepository.remove() was unused and is correctly removed to satisfy the @typescript-eslint/no-unused-vars rule.

sample/sample6-abstract-table/app.ts (1)

2-2: LGTM: Import path standardization.

Consistent import path simplification across samples.

sample/sample14-errors-in-wrong-metdata/app.ts (2)

2-2: LGTM: Import path standardization.

Import path simplified consistently with other samples.


32-32: LGTM: Unused parameter removal.

The post parameter was not referenced in the callback body and is correctly removed to fix the lint violation.

sample/sample16-indexes/app.ts (1)

2-2: LGTM: Import path standardization.

The import path change aligns with the consistent refactoring pattern across all sample files.

sample/sample4-many-to-many/app.ts (2)

2-2: LGTM: Import path standardization.

Consistent with the module resolution refactoring across all samples.


35-35: LGTM: Unused parameter removal.

The post parameter was not used in the callback and is correctly removed to satisfy the lint rule.

sample/sample28-single-table-inheritance/app.ts (1)

2-2: LGTM! Import path standardized.

The import path simplification from "../../src/index" to "../../src" is correct and consistent with the broader refactoring across sample files.

sample/sample3-many-to-one/app.ts (2)

2-2: LGTM! Import path standardized.

The import path simplification is consistent with the repository-wide refactoring.


49-49: LGTM! Unused parameter correctly removed.

Removing the unused post parameter from the promise callback correctly addresses the @typescript-eslint/no-unused-vars lint rule without affecting functionality.

sample/sample12-custom-naming-strategy/app.ts (2)

2-2: LGTM! Import path standardized.

The import path change is consistent with the repository-wide refactoring pattern.


29-29: LGTM! Unused parameter correctly removed.

Removing the unused post parameter correctly addresses the linting rule without changing behavior.

sample/sample21-custom-join-table-column/app.ts (2)

2-2: LGTM! Import path standardized.

Consistent with the repository-wide import path refactoring.


41-41: LGTM! Unused parameter correctly removed.

The post parameter was not used in the callback body. Removing it correctly addresses the @typescript-eslint/no-unused-vars rule.

sample/sample22-closure-table/app.ts (2)

2-2: LGTM! Import path standardized.

The import path simplification is consistent with the broader refactoring effort.


42-42: LGTM! Unused parameter correctly removed.

The callback uses category1 from the outer scope (line 46) rather than the parameter, so removing the unused category parameter correctly addresses the linting rule.

sample/sample4-many-to-many/entity/PostMetadata.ts (1)

17-17: LGTM! Unused decorator parameter correctly removed.

The type parameter in the @ManyToMany decorator's type resolver function was unused. Since the parameter is optional per the decorator signature, removing it correctly addresses the @typescript-eslint/no-unused-vars rule without affecting functionality.

sample/sample13-everywhere-abstraction/entity/Blog.ts (1)

12-12: LGTM! Unused decorator parameter correctly removed.

Removing the unused type parameter from the @ManyToMany decorator's type resolver correctly addresses the linting rule. This change is consistent with similar updates across other entity files in this PR.

sample/sample34-mongodb/app.ts (1)

2-2: LGTM! Import path standardized.

The import path simplification is consistent with the repository-wide refactoring across all sample files.

sample/sample14-errors-in-wrong-metdata/entity/Post.ts (1)

38-38: LGTM!

The unused type parameter has been correctly removed from the type resolver function, fixing the @typescript-eslint/no-unused-vars violation.

sample/sample4-many-to-many/entity/PostDetails.ts (1)

32-32: LGTM!

The unused type parameter has been correctly removed from the type resolver function, fixing the @typescript-eslint/no-unused-vars violation.

sample/sample9-entity-listeners/entity/PostCategory.ts (1)

23-23: LGTM!

The unused type parameter has been correctly removed from the type resolver function, fixing the @typescript-eslint/no-unused-vars violation.

sample/sample25-insert-from-inverse-side/app.ts (2)

2-2: LGTM!

Import path normalized from "../../src/index" to "../../src".


30-30: LGTM!

Unused parameters correctly removed from promise callbacks, fixing @typescript-eslint/no-unused-vars violations. The saved entities are refetched via findOneBy anyway, so these parameters were indeed unused.

Also applies to: 42-42

sample/sample10-mixed/app.ts (1)

2-2: LGTM!

Import path normalized from "../../src/index" to "../../src". The removal of commented-out code (mentioned in the summary) is also good housekeeping.

sample/sample13-everywhere-abstraction/entity/PostCategory.ts (1)

13-13: LGTM!

The unused type parameter has been correctly removed from the type resolver function, fixing the @typescript-eslint/no-unused-vars violation.

sample/sample19-one-side-relations/app.ts (1)

2-2: LGTM!

Import path normalized from "../../src/index" to "../../src". The removal of commented-out code (mentioned in the summary) is also good housekeeping.

sample/sample7-pagination/app.ts (2)

2-2: LGTM!

Import path normalized from "../../src/index" to "../../src".


51-51: LGTM!

Unused parameter correctly removed from promise callback, fixing @typescript-eslint/no-unused-vars violation.

sample/sample5-subscribers/entity/PostCategory.ts (1)

13-16: LGTM! Unused parameter removed from decorator.

The type parameter in the @ManyToMany decorator was unused and has been correctly removed, fixing the linting error without affecting functionality.

sample/sample23-nested-joins/app.ts (2)

2-2: LGTM! Import path simplified.

The import path change from "../../src/index" to "../../src" is functionally equivalent and follows standard module resolution conventions.


44-51: LGTM! Unused promise parameters removed.

The promise handler parameters have been correctly removed where the resolved values were not used, fixing linting errors without affecting the promise chain logic.

Also applies to: 66-73, 83-90, 97-104, 109-116

sample/sample4-many-to-many/entity/PostInformation.ts (1)

17-20: LGTM! Unused parameter removed from decorator.

The unused type parameter has been correctly removed from the @ManyToMany decorator, consistent with the linting fix pattern applied across all sample entities.

sample/sample2-one-to-one/app.ts (2)

2-2: LGTM! Import path simplified.

The import path simplification is functionally equivalent and follows standard conventions.


48-57: LGTM! Unused promise parameter removed.

The saved post value was not used in the callback, so removing the parameter correctly fixes the linting error.

sample/sample26-embedded-tables/entity/Question.ts (1)

12-13: LGTM! Unused parameter removed from decorator.

The unused type parameter has been correctly removed from the @Column decorator for the embedded type, fixing the linting error.

sample/sample18-lazy-relations/app.ts (2)

2-2: LGTM! Import path simplified.

The import path simplification is functionally equivalent.


50-61: LGTM! Unused variables and type annotations fixed.

The changes correctly address linting issues by:

  • Removing explicit : any type annotations where parameters are still used (lines 50, 56, 109)
  • Removing unused parameters entirely where values aren't referenced (lines 79, 96, 115)

Also applies to: 79-95, 96-105, 109-114, 115-117

sample/sample4-many-to-many/entity/PostImage.ts (1)

17-18: LGTM! Unused parameter removed from decorator.

The unused type parameter has been correctly removed from the @ManyToMany decorator.

sample/sample13-everywhere-abstraction/entity/Post.ts (1)

12-16: LGTM! Unused parameter removed from decorator.

The unused type parameter has been correctly removed from the @ManyToMany decorator, consistent with the linting fix pattern throughout the PR.

sample/sample20-join-without-relation/app.ts (1)

2-2: LGTM: Import path simplified.

The import path change from "../../src/index" to "../../src" is a standard simplification that relies on automatic index file resolution.

sample/sample4-many-to-many/entity/Post.ts (1)

28-67: LGTM: Unused parameter removed from type resolvers.

All six @ManyToMany decorators correctly remove the unused type parameter from their type resolver functions. Since the parameter is optional in the decorator signature and was never referenced, changing (type) => ClassName to () => ClassName properly resolves the lint violations without any functional impact.


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
Collaborator

@gioboa gioboa left a comment

Choose a reason for hiding this comment

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

Thanks @pkuczynski 🙏

@michaelbromley michaelbromley merged commit 69dfc42 into typeorm:master Nov 9, 2025
60 checks passed
ThbltLmr pushed a commit to ThbltLmr/typeorm that referenced this pull request Dec 2, 2025
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.

3 participants