Skip to content

refactor: replace deprecated tseslint.config with defineConfig#151

Merged
Wintus merged 1 commit intotrunkfrom
fix-eslint-config-deprecation
Jan 16, 2026
Merged

refactor: replace deprecated tseslint.config with defineConfig#151
Wintus merged 1 commit intotrunkfrom
fix-eslint-config-deprecation

Conversation

@Wintus
Copy link
Owner

@Wintus Wintus commented Jan 16, 2026

Summary

  • Replace deprecated tseslint.config() with ESLint's native defineConfig() from eslint/config

Background

The tseslint.config() function was deprecated in favor of ESLint's defineConfig() (introduced in ESLint v9.22.0).

Reference: https://typescript-eslint.io/packages/typescript-eslint/#config-deprecated

Test plan

  • npm run lint passes
  • npm run build passes

Co-Authored-By: Claude

The tseslint.config() function was deprecated in favor of ESLint's
native defineConfig() from eslint/config (introduced in ESLint v9.22.0).

Co-Authored-By: Claude
@claude
Copy link

claude bot commented Jan 16, 2026

Code Review

Summary

This PR refactors the ESLint configuration to use the recommended defineConfig() from ESLint instead of the deprecated tseslint.config(). The change is minimal, focused, and follows best practices.

✅ Positive Observations

  1. Addresses Deprecation: The PR correctly migrates from the deprecated tseslint.config() to the recommended defineConfig() approach.

  2. Minimal Surface Area: The change is surgical - only modifying what's necessary (1 import + 1 function call).

  3. Test Coverage: All CI checks pass:

    • ✓ Lint passes
    • ✓ Tests pass
    • ✓ Type check passes
  4. Clear Documentation: The PR description provides context with a reference link to the deprecation notice.

  5. Proper Co-Authoring: Attribution to Claude is included in the commit message.

🔍 Technical Analysis

Code Quality: ★★★★★

  • Clean, straightforward refactoring
  • No unnecessary changes
  • Maintains existing configuration structure

Compatibility:

  • ESLint v9.39.2 is used (the change requires v9.22.0+) ✓
  • The defineConfig import from eslint/config is the correct approach

Functional Equivalence:
The migration maintains identical behavior since defineConfig() serves the same purpose as the deprecated tseslint.config() - both provide type safety for ESLint flat configs.

⚠️ Potential Consideration

Minor: While this change is correct, I'd note that the PR description mentions this was deprecated in favor of ESLint's native function. However, it's worth noting that tseslint.config() was a TypeScript-ESLint utility, and ESLint's defineConfig() is now the recommended standard for flat configs. The existing code still uses tseslint.configs.recommended which is appropriate and not deprecated.

🎯 Verdict

LGTM ✓ This is a clean, necessary refactoring that properly addresses the deprecation. No issues found.

Risk Level: Low
Impact: Maintenance (reduces deprecation warnings)
Recommendation: Approve and merge


Review generated following the project's functional programming style guide and TDD workflow as outlined in CLAUDE.md

@Wintus Wintus merged commit 549e1d0 into trunk Jan 16, 2026
4 checks passed
@Wintus Wintus deleted the fix-eslint-config-deprecation branch January 16, 2026 15:12
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