Skip to content

Conversation

@pkuczynski
Copy link
Collaborator

@pkuczynski pkuczynski commented Nov 9, 2025

Description of change

Bump eslint + plugins and update the config based on latest eslint documentation.

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

  • Chores
    • Updated ESLint configuration with modern recommended settings and improved parser integration for enhanced code quality checks.
    • Updated development dependencies including ESLint, TypeScript ESLint plugin, JSDoc plugin, and linting tools to latest stable versions for improved compatibility and features.
    • Optimized the linting script for streamlined execution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 9, 2025

Walkthrough

ESLint configuration modernized to use defineConfig API with updated imports and parser references. Multiple ESLint-related devDependencies updated to newer versions, and lint script simplified to remove the dot argument.

Changes

Cohort / File(s) Summary
ESLint Configuration
eslint.config.mjs
Changed default export from tseslint.config([...]) to defineConfig([...]). Updated imports to use js from @eslint/js, defineConfig from eslint/config, and ts from typescript-eslint. Parser reference updated from tseslint.parser to ts.parser. Added plugins section exposing js and ts. Updated extends to use js.configs.recommended and ts.configs.recommendedTypeChecked. Expanded no-unused-vars rule to include destructuredArrayIgnorePattern.
Dependencies & Scripts
package.json
Updated lint script from "eslint ." to "eslint". Updated devDependencies: @eslint/js (^9.36.0 → ^9.39.1), eslint (^9.36.0 → ^9.39.1), eslint-plugin-jsdoc (^60.3.0 → ^61.1.12), globals (^16.4.0 → ^16.5.0), lint-staged (^15.5.2 → ^16.2.6), typescript-eslint (^8.44.0 → ^8.46.3).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify that defineConfig API is compatible with the new ESLint versions
  • Confirm parser migration from tseslint.parser to ts.parser maintains consistent behavior
  • Validate that the updated preset configurations (js.configs.recommended, ts.configs.recommendedTypeChecked) provide equivalent or improved linting coverage
  • Review the new destructuredArrayIgnorePattern parameter in no-unused-vars rule to ensure it aligns with project conventions

Possibly related PRs

Suggested reviewers

  • gioboa
  • naorpeled
  • alumni

Poem

🐰 The configs dance in a new refrain,
From tseslint to defineConfig's reign,
Parsers hop, plugins align,
Dependencies sparkle with version nine,
Linting hops onward, cleaner and fine! ✨

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 title accurately summarizes the main changes: bumping ESLint dependencies and updating the configuration file accordingly.
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 9b1b1c2.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • eslint.config.mjs (4 hunks)
  • package.json (5 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-07-27T17:29:18.547Z
Learnt from: alumni
Repo: typeorm/typeorm PR: 11581
File: docs/docs/drivers/mongodb.md:9-13
Timestamp: 2025-07-27T17:29:18.547Z
Learning: TypeORM is compatible only with mongodb@^6, not v4 as previously suggested. The package.json file contains the authoritative peer dependency information for the MongoDB driver version compatibility.

Applied to files:

  • package.json
⏰ 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). (3)
  • GitHub Check: formatting
  • GitHub Check: build
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (8)
eslint.config.mjs (6)

1-5: LGTM! Modern ESLint 9 imports adopted.

The imports have been updated to use the new ESLint 9 flat config API, importing defineConfig, js from @eslint/js, and renaming typescript-eslint to ts for consistency with the new API patterns.


7-7: LGTM! defineConfig wrapper properly applied.

The export now uses defineConfig wrapper, which is the recommended approach in ESLint 9 for providing better type inference and validation for flat config arrays.


21-21: LGTM! Parser reference updated consistently.

The parser reference has been updated from tseslint.parser to ts.parser, matching the renamed import on line 5.


30-33: LGTM! Plugins section added per ESLint 9 flat config pattern.

The explicit plugins section exposes the js and ts plugins, which is required in the flat config system for the extends references to work correctly.


35-36: LGTM! Extends references updated to match new plugin namespace.

The extends array now references js.configs.recommended and ts.configs.recommendedTypeChecked, which properly align with the plugin definitions above and the ESLint 9 flat config API.


51-54: Good addition! destructuredArrayIgnorePattern enhances consistency.

Adding destructuredArrayIgnorePattern: "^_" alongside argsIgnorePattern provides consistent handling for unused destructured array elements (e.g., const [, _second, third] = arr), which is a common pattern in TypeScript codebases.

package.json (2)

115-115: All ESLint and related packages are already at their latest versions and secure.

Verification confirms: @eslint/js 9.39.1, eslint 9.39.1, eslint-plugin-jsdoc 61.1.12, globals 16.5.0, lint-staged 16.2.6, and typescript-eslint 8.46.3 are all at the latest available npm registry versions. The one identified ESLint security advisory (moderate severity RegExp DoS in versions < 4.18.2) does not apply to the current versions, which are significantly newer. No further action needed.


85-85: The lint script change is correct and safe for ESLint 9.

ESLint 9 correctly defaults to the current directory (.) when no arguments are provided, as confirmed by the debug output showing "Using file patterns: .". File discovery and the flat config system work as expected. All required dependencies are present in package.json, including @eslint/js, typescript-eslint, and eslint-plugin-jsdoc. No changes needed.


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.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 9, 2025

typeorm-sql-js-example

npm i https://pkg.pr.new/typeorm/typeorm@11756

commit: 49b3d66

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.

It looks great to me 👏

@coveralls
Copy link

coveralls commented Nov 9, 2025

Coverage Status

coverage: 76.433%. remained the same
when pulling 49b3d66 on pkuczynski:lint/bump-and-config
into 6381c8d on typeorm:master.

@pkuczynski pkuczynski merged commit 51fbcf4 into typeorm:master Nov 10, 2025
62 checks passed
@pkuczynski pkuczynski deleted the lint/bump-and-config branch November 10, 2025 10:17
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.

4 participants