Skip to content

feat(eslint): update deps and configs#352

Merged
kodiakhq[bot] merged 1 commit into
mainfrom
update-deps
Feb 13, 2026
Merged

feat(eslint): update deps and configs#352
kodiakhq[bot] merged 1 commit into
mainfrom
update-deps

Conversation

@mheob
Copy link
Copy Markdown
Owner

@mheob mheob commented Feb 13, 2026

Summary

Update ESLint ecosystem dependencies to latest major versions and enhance the React and perfectionist configurations with new rules and improved flexibility.

Changes

  • ESLint v10: Bump ESLint from v9 to v10 along with compatible plugin updates
  • Perfectionist v5: Update eslint-plugin-perfectionist to v5, adapting sort-imports groups to the new naming convention (type-import, value-builtin, etc.)
  • React Server Components: Add react-rsc plugin with function-definition rule
  • Type-aware React rules: Add no-implicit-key and no-leaked-conditional-rendering rules for type-aware linting
  • React naming conventions: Enable context-name, ref-name, and use-state rules
  • Ignores enhancements: Support function-based userIgnores overrides and automatic TypeScript file ignoring when TypeScript is disabled
  • New glob: Add GLOB_ASTRO_TS pattern for Astro TypeScript virtual files
  • Type updates: Add ignoresTypeAware option to OptionsTypeScriptParserOptions
  • Updated typegen: Regenerated type definitions reflecting new and updated plugin rules
  • Dependency bumps: Update ~40 dependencies including @stylistic/eslint-plugin, eslint-plugin-regexp (v3), eslint-plugin-unicorn (v63), eslint-plugin-yml (v3), globals (v17), prettier (v3.8), and more
  • Remove .coderabbit.yaml: Drop CodeRabbit configuration file

Motivation

Keep the ESLint configuration up to date with the latest ecosystem releases, especially the ESLint v10 and perfectionist v5 major upgrades. The new React rules improve type safety and enforce better patterns for Server Components, naming conventions, and conditional rendering.

Summary by CodeRabbit

  • New Features

    • React Server Components support added to ESLint config
    • Type-aware React linting and new React naming rules enabled
    • Option to ignore TypeScript files for type-aware rules
  • Dependencies

    • ESLint upgraded to v10; Perfectionist upgraded to v5
    • Broad set of dev tooling and ESLint plugin updates
  • Chores

    • Removed existing predefined automation/config defaults file

@mheob mheob added eslint 🚨 Belongs to ESLint config deps 📦 labels Feb 13, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 13, 2026

🦋 Changeset detected

Latest commit: b2d67c6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@mheob/eslint-config Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
eslint-config Ready Ready Preview, Comment Feb 13, 2026 3:43pm

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 13, 2026

Warning

Ignoring CodeRabbit configuration file changes. For security, only the configuration from the base branch is applied for open source repositories.

Walkthrough

Updates ESLint and related plugins (including ESLint v10 and perfectionist v5), adds React Server Components and type-aware React rules, extends ignore handling (function-based + TypeScript/astro patterns), adjusts import/prop sorting to perfectionist v5 conventions, and bumps many dependency versions.

Changes

Cohort / File(s) Summary
Dependency pins & workspace
packages/eslint-config/src/cli/versions-map.generated.ts, pnpm-workspace.yaml
Bump ESLint to v10, perfectionist to v5, update numerous eslint plugins/parsers and workspace dependency versions.
Changelog / Release note
.changeset/update-eslint-deps-and-configs.md
New changeset documenting dependency and config upgrades, RSC support, type-aware rules, and perfectionist v5 migration.
Config removal
.coderabbit.yaml
Removed entire CodeRabbit configuration file.
Ignore handling
packages/eslint-config/src/configs/ignores.ts, packages/eslint-config/src/factory.ts
ignores() now accepts function or array, adds ignoreTypeScript flag; factory passes ignores(options.ignores, !enableTypeScript).
React config + types
packages/eslint-config/src/configs/react.ts, packages/eslint-config/src/types.ts
react() signature updated to include parser options; adds filesTypeAware/ignoresTypeAware defaults, type-aware React rules, react-rsc plugin/rule, naming-convention rules, and expanded next/react-refresh allowances.
Perfectionist sorting
packages/eslint-config/src/configs/perfectionist.ts
Reworked import groups to composite v5-style groups, removed internalPattern filtering, and renamed JSX prop group names to v5 conventions.
Globs
packages/eslint-config/src/globs.ts
Added GLOB_ASTRO_TS glob for TypeScript in Astro files.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

eslint, dependencies

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(eslint): update deps and configs' accurately and concisely summarizes the main changes: ESLint dependency updates and configuration enhancements across multiple config files and plugins.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update-deps

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
packages/eslint-config/src/configs/ignores.ts (1)

15-23: Nice flexible API for ignore customization.

The function-based override pattern gives consumers full control while the default array-append behavior is preserved. The logic is clean.

One minor note: the local variable ignores shadows the function name ignores, which can be slightly confusing when reading the code. Consider renaming the local to ignorePatterns or similar.

♻️ Proposed rename
 export async function ignores(
 	userIgnores: ((originals: string[]) => string[]) | string[] = [],
 	ignoreTypeScript = false,
 ): Promise<TypedFlatConfigItem[]> {
-	let ignores = [...GLOB_EXCLUDE];
+	let ignorePatterns = [...GLOB_EXCLUDE];
 
-	if (ignoreTypeScript) ignores.push(GLOB_TS, GLOB_TSX);
+	if (ignoreTypeScript) ignorePatterns.push(GLOB_TS, GLOB_TSX);
 
-	ignores = typeof userIgnores === 'function' ? userIgnores(ignores) : [...ignores, ...userIgnores];
+	ignorePatterns = typeof userIgnores === 'function' ? userIgnores(ignorePatterns) : [...ignorePatterns, ...userIgnores];
 
 	return [
 		{
-			ignores,
+			ignores: ignorePatterns,
 			name: 'mheob/ignores',
 		},
 	];
 }

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.

@claude
Copy link
Copy Markdown

claude Bot commented Feb 13, 2026

PR Review: Update ESLint Dependencies and Configurations

I've reviewed PR #352 which updates ESLint to v10 and enhances React/perfectionist configurations. Here's my comprehensive feedback:


Strengths

1. Proper Version Management

  • Correctly marked as a major version bump in the changeset, which is appropriate given ESLint v10 is a breaking change
  • Changeset documentation is thorough and well-structured

2. Enhanced Type Safety

  • New type-aware React rules (no-implicit-key, no-leaked-conditional-rendering) improve type safety
  • Added ignoresTypeAware option to exclude certain file patterns from type-aware linting
  • Properly separates type-aware rules into their own configuration block (lines 417-427 in react.ts)

3. React Server Components Support

  • Added react-rsc plugin with the function-definition rule for better RSC patterns
  • This is timely given the increasing adoption of Next.js App Router

4. Better Next.js Integration

  • Added missing Next.js export names (generateImageMetadata, generateSitemaps)
  • Removed deprecated config export
  • Added helpful documentation links for each export category

5. Improved Naming Conventions

  • New rules for React naming: context-name, ref-name, use-state
  • Helps enforce consistent naming patterns across codebases

6. Enhanced Flexibility

  • ignores() function now accepts a function callback for dynamic ignore patterns: (originals: string[]) => string[]
  • Automatically ignores TypeScript files when TypeScript is disabled

🔍 Potential Issues & Concerns

1. Breaking Change: Removed TypeScript Parser Config (react.ts:330-336)

The removal of TypeScript parser configuration from the main React config block could be problematic:

// REMOVED:
...(isTypeAware
  ? {
      project: tsconfigPath,
      projectService: true,
      tsconfigRootDir: import.meta.dirname,
    }
  : {}),

Issue: Type-aware rules (no-implicit-key, no-leaked-conditional-rendering) require TypeScript parser configuration to function properly. Where is this configuration now applied?

Recommendation: Verify that the type-aware configuration block (lines 417-427) includes the necessary parser options, or document where this configuration is now handled.


2. Severity Change: react-refresh/only-export-components (line 352)

Changed from 'warn' to 'error':

-'warn',
+'error',

Impact: This is a breaking change for existing codebases that may have warnings. Users will now get build failures instead of warnings.

Recommendation:

  • Document this change prominently in the changeset/release notes
  • Consider a migration guide for users who need to fix existing violations
  • Alternatively, keep as 'warn' for one major version before upgrading to 'error'

3. Perfectionist v5 Migration (perfectionist.ts:236-262)

The import group names have changed significantly:

  • 'type''type-import'
  • 'builtin-type' → split into 'value-builtin' and type variants
  • 'object''ts-equals-import'

Removed: internalPattern: ['^@/.*', '^~/.*']

Issue: Removing internalPattern means internal imports will no longer be recognized as such. This could change the sorting behavior for projects using @/ or ~/ aliases.

Recommendation: Investigate if perfectionist v5 has a replacement for internalPattern or if this needs to be configured differently.


4. Missing TypeScript Configuration

In react.ts:301-302, new options are destructured:

filesTypeAware = [GLOB_TS, GLOB_TSX],
ignoresTypeAware = [`${GLOB_MARKDOWN}/**`, GLOB_ASTRO_TS],

But I notice that filesTypeAware is destructured but may not be used effectively if the parser configuration was removed (see issue #1).


5. Glob Pattern Concern (globs.ts:452)

export const GLOB_ASTRO_TS = '**/*.astro/*.ts';

Issue: This pattern seems unusual. Astro doesn't typically have nested .ts files inside .astro files in the file system. This might be for virtual files generated by the Astro parser.

Recommendation: Add a comment explaining this is for Astro's virtual TypeScript files, not physical file paths.


📝 Code Quality & Best Practices

1. Good Documentation

  • Comments added for Next.js export names with links to documentation
  • Clear separation of plugin rules with headers

2. Proper Type Safety

  • OptionsTypeScriptParserOptions interface properly updated
  • Type definitions regenerated (typegen.d.ts)

3. Configuration Organization

  • Logical separation of TypeScript and type-aware rules
  • Clear configuration blocks with descriptive names

🔒 Security Concerns

No security issues identified. The changes are primarily configuration updates.


Performance Considerations

Potential Performance Impact:

  • Type-aware rules (no-implicit-key, no-leaked-conditional-rendering) require TypeScript type checking, which can be slower
  • The new ignoresTypeAware option helps mitigate this by excluding markdown and Astro virtual files

Recommendation: Document performance implications of enabling type-aware React rules in the README.


🎯 Action Items

High Priority:

  1. ✅ Verify TypeScript parser configuration is properly applied for type-aware rules
  2. ✅ Document the breaking change for react-refresh/only-export-components severity
  3. ✅ Investigate the removal of internalPattern in perfectionist config

Medium Priority:
4. Add comment explaining GLOB_ASTRO_TS is for virtual files
5. Consider adding migration guide for users upgrading from v9 to v10
6. Add performance notes for type-aware rules in documentation

Low Priority:
7. Consider adding tests for new configurations (no test files currently exist)


📊 Overall Assessment

This is a solid update that brings the package up to date with the latest ESLint ecosystem. The changes are well-structured and add valuable features (RSC support, better type safety, improved naming conventions).

However, there are a few breaking changes that need careful attention:

  • Removal of TypeScript parser config needs verification
  • Severity change for react-refresh rule will impact existing projects
  • perfectionist's internalPattern removal may affect import sorting

Recommendation:Approve with minor changes

Address the TypeScript parser configuration concern and document the breaking changes clearly in release notes. The rest can be handled in follow-up PRs or documentation updates.


Great work on keeping the ESLint configuration up to date! 🎉

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@packages/eslint-config/src/configs/ignores.ts`:
- Around line 11-12: Update the JSDoc for the function in ignores.ts to add a
missing `@param` description for ignoreTypeScript and refresh the userIgnores
description to reflect it can be either CLI prompt choices or a function;
specifically edit the `@param` entries for userIgnores and ignoreTypeScript (the
parameter names userIgnores and ignoreTypeScript) so userIgnores explains the
allowed types/behaviour (e.g., array or function that returns/filters ignores)
and ignoreTypeScript documents what the flag controls (e.g., whether TypeScript
files are ignored), keeping the wording concise and consistent with the
function's actual behavior.

In `@packages/eslint-config/src/configs/react.ts`:
- Around line 257-281: The config names in the react config block are using the
wrong namespace prefix; update the two entries named 'antfu/react/typescript'
and 'antfu/react/type-aware-rules' to use the project's consistent 'mheob/'
prefix so they read 'mheob/react/typescript' and 'mheob/react/type-aware-rules';
locate the object with name fields in the array (the rule set with files:
filesTypeAware and the conditional isTypeAware branch) and replace the string
literals accordingly to restore consistent naming with other entries like
'mheob/react/setup' and 'mheob/react/rules'.
🧹 Nitpick comments (1)
packages/eslint-config/src/configs/ignores.ts (1)

19-19: Local variable ignores shadows the enclosing function name.

Consider renaming to ignorePatterns (or similar) to avoid confusion when reading or debugging.

♻️ Proposed rename
-	let ignores = [...GLOB_EXCLUDE];
+	let ignorePatterns = [...GLOB_EXCLUDE];
 
-	if (ignoreTypeScript) ignores.push(GLOB_TS, GLOB_TSX);
+	if (ignoreTypeScript) ignorePatterns.push(GLOB_TS, GLOB_TSX);
 
-	ignores = typeof userIgnores === 'function' ? userIgnores(ignores) : [...ignores, ...userIgnores];
+	ignorePatterns = typeof userIgnores === 'function' ? userIgnores(ignorePatterns) : [...ignorePatterns, ...userIgnores];
 
 	return [
 		{
-			ignores,
+			ignores: ignorePatterns,
 			name: 'mheob/ignores',
 		},
 	];

Comment thread packages/eslint-config/src/configs/ignores.ts Outdated
Comment thread packages/eslint-config/src/configs/react.ts
BREAKING CHANGES:

- Bump ESLint to v10, perfectionist to v5, and
  other dependencies to latest versions
- Add React Server Components support (react-rsc)
- Add type-aware React rules and naming conventions
- Update perfectionist sort-imports for v5 compat
- Enhance ignores with function-based overrides
- Remove .coderabbit.yaml configuration
@sonarqubecloud
Copy link
Copy Markdown

@claude
Copy link
Copy Markdown

claude Bot commented Feb 13, 2026

Pull Request Review

This is a well-structured major version update that modernizes the ESLint configuration ecosystem. The changes are comprehensive and follow good practices for configuration library maintenance.

✅ Strengths

1. Proper Version Management

  • Correctly marked as a major version bump in the changeset, appropriate for ESLint v10 upgrade
  • Comprehensive changelog documentation with clear bullet points
  • Follows conventional commit patterns per CLAUDE.md

2. React Configuration Enhancements (packages/eslint-config/src/configs/react.ts)

  • Type-aware rules: New rules no-implicit-key and no-leaked-conditional-rendering (lines 61-63, 276-278) improve type safety
  • React Server Components: Added react-rsc/function-definition rule (line 204) for RSC best practices
  • Naming conventions: New rules for context-name, ref-name, and use-state (lines 152-154) enforce consistency
  • Framework detection: Smart detection of Next.js, Remix, and React Router for appropriate allowExportNames configuration
  • React Compiler support: Comprehensive set of rules (lines 131-149) when compiler is detected

3. Perfectionist Configuration (packages/eslint-config/src/configs/perfectionist.ts)

  • Correctly updated import sorting groups (lines 66-82) to perfectionist v5 naming convention:
    • typetype-import
    • builtinvalue-builtin
    • externalvalue-external, type-external
    • etc.
  • Maintains proper ordering: type imports first, then builtins, externals, internals, parent/sibling, side-effects, styles

4. Enhanced Ignores Configuration (packages/eslint-config/src/configs/ignores.ts)

  • Function-based overrides: Lines 16, 23 now support (originals: string[]) => string[] for dynamic ignore patterns
  • TypeScript file ignoring: Lines 17, 21 auto-ignore TS/TSX files when TypeScript is disabled
  • More flexible for consumers

5. Type System Improvements (packages/eslint-config/src/types.ts)

  • Added ignoresTypeAware option (lines 66-67) for better control over type-aware linting
  • Clear JSDoc documentation explaining defaults
  • New GLOB_ASTRO_TS pattern (line 21 in globs.ts) for Astro virtual TypeScript files

6. Ecosystem Updates

  • ESLint v10 with compatible plugin versions
  • Perfectionist v5 with breaking changes properly handled
  • ~40 dependency updates including regexp (v3), unicorn (v63), yml (v3), globals (v17)

🔍 Observations & Suggestions

1. Type-Aware Rules Default Behavior
In react.ts:60-63, type-aware rules are defined but only applied when tsconfigPath is provided (lines 270-281). Consider:

  • Document this behavior in the types or README so users know these rules require explicit opt-in
  • The ignoresTypeAware default includes markdown and Astro files - good, but verify Astro virtual TS files (**/*.astro/*.ts) are correctly handled

2. React Compiler Rules Coverage
Lines 131-149 add comprehensive React Compiler rules when the compiler is detected. Suggestion:

  • Consider if 'warn' severity would be better for incompatible-library and unsupported-syntax to avoid blocking builds during gradual adoption
  • Already set to 'warn' - good choice! ✅

3. Naming Convention Rules Severity
Lines 152-154 use 'warn' for naming rules (context-name, ref-name, use-state). This is appropriate for:

  • Existing codebases to adopt gradually
  • Personal preference vs strict requirement
  • Good balance! ✅

4. Type Safety - Any Usage
Line 80 in react.ts uses // eslint-disable-next-line ts/no-explicit-any with (pluginReact.configs.all as any). This is:

  • Acceptable given the upstream plugin's type limitations
  • Could be resolved with proper upstream typing, but not under your control
  • Consider adding a comment explaining this is due to upstream type gaps

5. Perfectionist Import Groups
The new groups structure (lines 66-82 in perfectionist.ts) looks correct for v5. Verify:

  • ts-equals-import placement (line 80) - is this the correct group name for import foo = require('bar') syntax?
  • Placement after styles but before unknown seems logical ✅

6. Ignores Function Signature
Line 16 in ignores.ts now accepts function or array. Consideration:

  • Good TypeScript typing prevents misuse
  • Document this pattern for users migrating from string[] only
  • Example use case would help: e.g., (orig) => orig.filter(p => !p.includes('special'))

🔒 Security Considerations

  • ✅ No security concerns identified
  • ✅ All changes are configuration-based, no runtime vulnerabilities introduced
  • ✅ Dependency updates come from trusted ESLint ecosystem packages
  • ✅ No exposure of sensitive data or execution of untrusted code

⚡ Performance Considerations

  • Type-aware rules: Lines 270-281 conditionally apply type-aware rules only to non-ignored files - excellent for performance!
  • Default ignores: Astro TS virtual files in ignoresTypeAware prevent unnecessary type checking on generated code
  • Consider: Document that type-aware rules add build time overhead for users evaluating the tsconfigPath option

🐛 Potential Issues

Minor - Documentation Gap

  • The .coderabbit.yaml removal is mentioned in the PR description but has no context
  • Not a code issue, but users might wonder why - consider briefly noting "switching to different review tooling" or similar

Minor - Generated Files

  • typegen.d.ts has +2153/-871 lines (massive change)
  • This is expected when plugin versions update, but verify it was regenerated correctly
  • Ensure the pnpm typegen script ran successfully before merging

📋 Testing Recommendations

Before merging, verify:

  1. ✅ Run pnpm build across all packages - should succeed
  2. ✅ Run pnpm lint - existing code should still pass (or only show expected warnings from new rules)
  3. ✅ Test in a React project with:
    • React Server Components (test react-rsc/function-definition)
    • Type-aware linting enabled (test no-implicit-key, no-leaked-conditional-rendering)
    • Various naming patterns (test new naming convention rules)
  4. ✅ Verify perfectionist sorting still works correctly with v5 group names
  5. ✅ Test ignores function: userIgnores: (orig) => [...orig, 'custom/**']

📝 Minor Code Quality Notes

  1. Line 46 in react.ts: ignoresTypeAware uses template literal for markdown glob - consistent with line 45's array syntax, good!

  2. Backwards compatibility: This is a major version bump, so breaking changes are acceptable. The perfectionist group name changes are breaking, correctly marked in changeset.

  3. Type definitions: OptionsTypeScriptParserOptions properly documents defaults in JSDoc (types.ts:58, 65) - excellent DX!


Summary

This is a high-quality PR that:

  • ✅ Properly handles breaking changes with major version bump
  • ✅ Adds valuable new rules for React Server Components, type safety, and naming conventions
  • ✅ Correctly migrates to perfectionist v5 group naming
  • ✅ Improves flexibility with function-based ignore overrides
  • ✅ Updates ~40 dependencies responsibly
  • ✅ Maintains good code quality and documentation

Recommendation: ✅ Approve and merge after running the test suite to verify no regressions.

Great work maintaining this configuration library! The enhancements will provide real value to users. 🚀

@kodiakhq kodiakhq Bot merged commit 8693238 into main Feb 13, 2026
10 checks passed
@kodiakhq kodiakhq Bot deleted the update-deps branch February 13, 2026 16:14
kodiakhq Bot pushed a commit that referenced this pull request Feb 13, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.


# Releases
## @mheob/eslint-config@10.0.0

### Major Changes

-   [#352](#352) ([@mheob](https://github.com/mheob)): Update ESLint dependencies and enhance React and perfectionist configs
    -   Bump ESLint to v10, perfectionist to v5, and many other dependencies
    -   Add React Server Components support via react-rsc plugin
    -   Add type-aware React rules (no-implicit-key, no-leaked-conditional-rendering)
    -   Add React naming convention rules (context-name, ref-name, use-state)
    -   Update perfectionist sort-imports groups to v5 naming convention
    -   Enhance ignores config to support function-based userIgnores and TypeScript file ignoring
    -   Add GLOB_ASTRO_TS glob pattern and ignoresTypeAware type option
    -   Update generated type definitions for new plugin rules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

eslint 🚨 Belongs to ESLint config

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant