Skip to content

feat(eslint-config): migrate to native flat config and upgrade to ESLint 10 / @wordpress/eslint-plugin 25 - #140

Merged
YvetteNikolov merged 1 commit into
mainfrom
feat/migrate-eslint-and-update-to-10
Jul 14, 2026
Merged

feat(eslint-config): migrate to native flat config and upgrade to ESLint 10 / @wordpress/eslint-plugin 25#140
YvetteNikolov merged 1 commit into
mainfrom
feat/migrate-eslint-and-update-to-10

Conversation

@YvetteNikolov

Copy link
Copy Markdown
Contributor

Dependencies geupdatet naar 10 en migreert de eslint config van FlatCamp-bridge naar de native flat config:

  • ESLint naar 10 (nu @wordpress/eslint-plugin eindelijk support heeft)
  • TypeScript wordt geregistreerd via typescript-eslint (werkt ook zonder dat typescript toegevoegd is in de package.json van het project die deze config consumeert)
  • Dependencies opgeschoond (zijn allemaal dependencies van @wordpress/eslint-plugin)
  • @yardinternet/toolkit dependencies rechtgetrokken

Tests zijn groen 💚

@YvetteNikolov
YvetteNikolov force-pushed the feat/migrate-eslint-and-update-to-10 branch from 943d1a1 to a3e9fb9 Compare July 13, 2026 11:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR upgrades the monorepo’s ESLint stack to ESLint 10 and @wordpress/eslint-plugin 25, and migrates @yardinternet/eslint-config from the FlatCompat bridge to native flat config exports. It also updates dependency alignment in @yardinternet/toolkit and refreshes the config snapshots accordingly.

Changes:

  • Migrate @yardinternet/eslint-config to native flat config by directly exporting @wordpress/eslint-plugin’s recommended flat config and layering local overrides.
  • Upgrade ESLint to ^10.6.0 and @wordpress/eslint-plugin to ^25.6.0, with corresponding dependency cleanup/realignment.
  • Update Vitest snapshots to reflect the new config shape/rulesets.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/toolkit/package.json Upgrades ESLint/WordPress plugin deps and realigns toolkit dependencies for the new linting stack.
packages/eslint-config/src/index.js Switches config export to native flat config and reworks JS/TS overrides on top of WordPress recommended.
packages/eslint-config/package.json Updates dependencies for the new flat config approach and ESLint 10.
packages/eslint-config/tests/snapshots/config.snapshot.test.js.snap Refreshes snapshots to match the updated config/rules/patterns.
package.json Adjusts the root Prettier alias version range.

Comment on lines +59 to +63
// Register TS ourselves so it works regardless of whether the consumer has
// `typescript` installed. Scoped to TS files to keep the babel parser on JS.
...tseslint.configs.recommended.map( ( config ) => ( {
...config,
files: [ '**/*.ts', '**/*.tsx' ],

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

True maar we gebruiken nooit .mts of .cts bestanden, dus deze laat ik

Comment on lines 20 to +24
"dependencies": {
"@babel/eslint-parser": "^7.25.7",
"@babel/preset-react": "^7.29.7",
"@eslint/compat": "^2.1.0",
"@eslint/eslintrc": "^3.3.3",
"@eslint/js": "^9.39.1",
"@typescript-eslint/eslint-plugin": "^8.60.1",
"@typescript-eslint/parser": "^8.60.1",
"@wordpress/eslint-plugin": "^24.5.0",
"eslint-config-prettier": "^10.1.8",
"@wordpress/eslint-plugin": "^25.6.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-react-hooks": "^7.1.1",
"globals": "^17.6.0"
"globals": "^17.7.0",
"typescript-eslint": "^8.62.1"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Linting gaat via de @yardinternet/toolkit package, en daar staat hij bij. Hier is ie niet nodig

Comment on lines 36 to 40
"stylelint": "^17.13.0",
"stylelint-config-idiomatic-order": "^10.0.0",
"stylelint-config-recommended": "^18.0.0"
"stylelint-config-recommended": "^18.0.0",
"typescript-eslint": "^8.62.1"
},

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Klopt niet, @typescript-eslint heeft alleen typescript als dependency nodig voor rules die type-aware zijn. En in de recommended config zijn er geen type-aware rules.

@YvetteNikolov
YvetteNikolov merged commit 8ac3296 into main Jul 14, 2026
2 checks passed
@YvetteNikolov
YvetteNikolov deleted the feat/migrate-eslint-and-update-to-10 branch July 14, 2026 07:50

@FreakyWizard FreakyWizard left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(beter laat dan nooit)

Lekker bezig! Wel jammer dat mijn werk nu deels overbodig is.

Het kan nog wel van CommonJS naar module worden overgezet

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