Skip to content

Comments

chore: migration ESLint flat config and update packages dependencies#2517

Open
yvalentin wants to merge 17 commits intomainfrom
build/update-eslint
Open

chore: migration ESLint flat config and update packages dependencies#2517
yvalentin wants to merge 17 commits intomainfrom
build/update-eslint

Conversation

@yvalentin
Copy link
Contributor

Résumé

Cette PR consolide deux axes de travail menés en parallèle sur la branche build/update-package puis fusionnés dans build/update-eslint :

1. Migration ESLint vers la « flat config » (ESLint 9)

  • Suppression de tous les fichiers .eslintrc.json par workspace (root, apps/nuxt, apps/nuxt-e2e, apps/nuxt-artillery, libs/backend-ddd, libs/common, libs/data)
  • Suppression de .eslintignore et .eslintrc-auto-import.json
  • Création des fichiers eslint.config.mjs correspondants au nouveau format ESLint 9 (flat config)
  • Mise à jour de nx.json pour pointer vers les nouvelles configurations

2. Mise à jour des dépendances

Package Avant Après
eslint 8.x 9.x
@typescript-eslint/* 7.x 8.x
typescript-eslint 8.x
eslint-plugin-vue 9.x 10.x
vue-eslint-parser 10.x (peer dep)
@nuxt/devtools 1.x 2.x
@vue/test-utils 2.4.x 2.4.6
nuxt-security 1.x 2.2.0
sharp 0.33.x 0.34.x
@swc-node/register 1.9.x 1.11.x
@swc/core 1.9.x 1.15.x
urllib3 (ETL Python) 2.5.0 2.6.3
  • Suppression des dépendances Jest inutilisées
  • Mise à jour du moteur npm requis (>=10.0 <12)

3. Correctifs mineurs

  • apps/nuxt/src/tools/helpers.ts et requests.ts : ajustements pour la conformité avec les nouvelles règles ESLint
  • Configuration de sécurité iframe mise à jour dans nuxt.config.ts

PRs Dependabot associées

Les PRs Dependabot suivantes sont couvertes ou rendues obsolètes par cette PR (le package-lock.json résout déjà des versions >= aux cibles) :

Note : Les PRs #2498 et #2328 (vue-dsfr-nuxt-module 3.x) ne sont pas couvertes — elles nécessitent une migration vers Nuxt 4 et feront l'objet d'une PR dédiée.

Plan de test

  • npm run lint — vérifier qu'aucune erreur ESLint n'est remontée
  • npm run type:check — vérifier la cohérence TypeScript
  • npm run test — tests unitaires data + backend-ddd
  • npm run build — build complet sans erreur
  • Vérifier que l'ETL Python fonctionne (baserow_extractor, siren_extractor, posthog_extractor)

🤖 Generated with Claude Code

yvalentin and others added 16 commits June 11, 2025 18:00
… to version 0.7.6 in package.json and package-lock.json
# Conflicts:
#	package-lock.json
#	package.json
# Conflicts:
#	package-lock.json
#	package.json
- Add vue-eslint-parser@^10.4.0 as explicit peer dep required by eslint-plugin-vue@10.x
- Pin dependencies to exact versions
- Bump multiple packages (nuxt, sentry, vueuse, dsfr, etc.)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Contributor

Copilot AI left a comment

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 migrates the monorepo to ESLint 9 “flat config” across Nx workspaces while updating a broad set of JS/TS and Python ETL dependencies.

Changes:

  • Replace legacy .eslintrc.json-based configs with workspace eslint.config.mjs files and a new root eslint.config.mjs.
  • Update Nx configuration to account for the new ESLint config filenames and remove the Nx Jest plugin.
  • Bump multiple dependencies (ESLint/TypeScript/Vue ecosystem, Nuxt tooling, ETL urllib3) and apply small lint-driven code cleanups.

Reviewed changes

Copilot reviewed 26 out of 27 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
package.json Updates engines/dependencies and introduces ESLint 9 + TypeScript-ESLint v8 stack.
nx.json Updates named inputs for flat config and removes Nx Jest plugin registration.
libs/etl/requirements.txt Bumps ETL Python dependency urllib3.
libs/data/src/common/brevo/brevoManager.ts Removes file-level ESLint disable to align with new lint rules.
libs/data/eslint.config.mjs Adds flat config for libs/data with workspace-specific ignores.
libs/data/.eslintrc.json Removes legacy ESLint config (flat config migration).
libs/common/eslint.config.mjs Adds flat config for libs/common.
libs/common/.eslintrc.json Removes legacy ESLint config (flat config migration).
libs/backend-ddd/tests/opportunity/infrastructure/api/brevo/mock/brevoMail.mock.ts Removes lint suppression in a mock implementation.
libs/backend-ddd/src/opportunity/infrastructure/api/brevo/brevoContact.ts Removes a lint suppression comment.
libs/backend-ddd/eslint.config.mjs Adds flat config for libs/backend-ddd.
libs/backend-ddd/.eslintrc.json Removes legacy ESLint config (flat config migration).
eslint.config.mjs Introduces the root ESLint 9 flat config (Nx boundaries, TS rules, Prettier, unused imports).
apps/nuxt/src/tools/requests.ts Minor formatting changes after lint migration.
apps/nuxt/src/tools/helpers.ts Minor formatting/comment removals after lint migration.
apps/nuxt/eslint.config.mjs Adds Nuxt/Vue workspace flat config (Vue recommended + per-file overrides + ignores).
apps/nuxt/.eslintrc.json Removes legacy ESLint config (flat config migration).
apps/nuxt-e2e/eslint.config.mjs Adds flat config for Playwright e2e workspace.
apps/nuxt-e2e/.eslintrc.json Removes legacy ESLint config (flat config migration).
apps/nuxt-artillery/eslint.config.mjs Adds flat config for Artillery/Playwright workspace.
apps/nuxt-artillery/.eslintrc.json Removes legacy ESLint config (flat config migration).
.eslintrc.json Removes root legacy ESLint config (flat config migration).
.eslintrc-auto-import.json Removes legacy auto-import globals config (flat config migration).
.eslintignore Removes legacy ignore file in favor of flat-config ignores.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


export default class BrevoMailMock {
// eslint-disable-next-line @typescript-eslint/no-empty-function
sendReturnReceipt: MailerManager['sendReturnReceipt'] = async (): Promise<Maybe<Error> | void> => {}
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

sendReturnReceipt is implemented as an empty async function body, which is typically flagged by @typescript-eslint/no-empty-function under the recommended config (and will fail lint in CI). Replace it with an expression body (e.g., return undefined) or add a minimal implementation so the function is not empty.

Suggested change
sendReturnReceipt: MailerManager['sendReturnReceipt'] = async (): Promise<Maybe<Error> | void> => {}
sendReturnReceipt: MailerManager['sendReturnReceipt'] = async (): Promise<Maybe<Error> | void> => {
return undefined
}

Copilot uses AI. Check for mistakes.
"@artilleryio/playwright-reporter": "^1.0.0",
"@nuxt/devtools": "^2.7.0",
"@nuxt/eslint-config": "~0.7.6",
"@eslint/js": "^9.28.0",
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

@eslint/js is added to devDependencies but is not imported/used anywhere in the repo (including the new flat ESLint configs). Either remove it to keep the dependency set minimal, or wire it into eslint.config.mjs (e.g. as a base JS ruleset) if it’s intended to be used.

Suggested change
"@eslint/js": "^9.28.0",

Copilot uses AI. Check for mistakes.
"jest-util": "30.0.5",
"jiti": "2.4.2",
"eslint-plugin-unused-imports": "^4.0.0",
"globals": "^16.2.0",
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

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

globals is added to devDependencies but is not imported/used anywhere in the ESLint flat configs (current repo only references vitest/globals types, which is unrelated). Either remove it or incorporate it into ESLint languageOptions.globals if you meant to declare globals explicitly.

Suggested change
"globals": "^16.2.0",

Copilot uses AI. Check for mistakes.
@yvalentin yvalentin changed the title chore: migration ESLint flat config et mise à jour des dépendances chore: migration ESLint flat config and update packages dependencies Feb 23, 2026
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