Skip to content

chore: #ENABLING-938 rendre les warnings de lint bloquants (--max-warnings 0)#511

Open
pascalsaussier-edifice wants to merge 3 commits into
develop-enablingfrom
chore-ENABLING-938-lint-max-warnings
Open

chore: #ENABLING-938 rendre les warnings de lint bloquants (--max-warnings 0)#511
pascalsaussier-edifice wants to merge 3 commits into
develop-enablingfrom
chore-ENABLING-938-lint-max-warnings

Conversation

@pascalsaussier-edifice

@pascalsaussier-edifice pascalsaussier-edifice commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Description

Les warnings de lint ne remontaient pas dans le résumé Turbo et ne faisaient pas échouer la tâche (ESLint sort en code 0 tant qu'il n'y a que des warnings) : ils s'accumulaient silencieusement, figés « verts » par le cache, et un éventuel basculement en erreur passait inaperçu.

Cette PR ajoute --max-warnings 0 à tous les scripts lint (eslint + stylelint), aligné sur ce que faisait déjà le script fix de react, puis nettoie les 16 warnings préexistants sans changement de comportement. Bonus : suppression du boilerplate Husky v9 déprécié dans le hook pre-commit.

Ticket : ENABLING-938

Which Package changed?

  • Components
  • Core
  • Icons
  • Hooks

Has the documentation changed?

  • Storybook

Type of change

  • Chore (PATCH)
  • Doc (PATCH)
  • Bug fix (PATCH)
  • New feature (MINOR)
  • Breaking change (MAJOR)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

🤖 Generated with Claude Code

Copilot AI 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.

Pull request overview

This PR makes lint warnings fail CI/Turbo tasks by enforcing --max-warnings 0 across package lint scripts, and cleans up existing ESLint warnings (mostly hook dependency / unused-arg related) to keep behavior unchanged.

Changes:

  • Add --max-warnings 0 to ESLint/Stylelint lint scripts across packages.
  • Resolve pre-existing ESLint warnings (hook deps, unused imports/args) without functional changes.
  • Simplify the Husky pre-commit hook.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/utilities/package.json Make lint fail on any ESLint warning.
packages/rest-client-base/package.json Make lint fail on any ESLint warning for src.
packages/react/src/modules/multimedia/WorkspaceFolders/WorkspaceFolders.tsx Add explicit exhaustive-deps suppression with rationale.
packages/react/src/modules/modals/OnboardingModal/useOnboardingModal.ts Add explicit exhaustive-deps suppression with rationale.
packages/react/src/modules/editor/components/EditorToolbar/EditorToolbar.tsx Fix hook dependency array by including cantooEditor.
packages/react/src/modules/editor/components/Editor/CantooAdaptTextBoxView.tsx Add explicit exhaustive-deps suppression with rationale.
packages/react/src/hooks/useWorkspaceFolders/useWorkspaceFoldersTree.ts Remove unused client hook usage; fix memo deps to include t.
packages/react/src/hooks/useUploadFiles/useUploadFiles.ts Fix callback deps by including resetInputValue.
packages/react/src/hooks/useHttpErrorToast/useHttpErrorToast.ts Avoid re-subscribing by reading latest options from a ref.
packages/react/src/hooks/useDate/useDate.ts Fix callback dependency arrays to reference the actual used values.
packages/react/src/hooks/useCheckable/useCheckable.ts Use functional state update to avoid missing deps / stale closures.
packages/react/src/components/Layout/hooks/useHelp.tsx Stabilize effect dependency by deriving a primitive boolean flag.
packages/react/package.json Make lint fail on any ESLint warning.
packages/extensions/src/image/image.ts Remove unused parameter from parseHTML handler.
packages/extensions/package.json Make lint fail on any ESLint warning.
packages/client/package.json Make lint fail on any ESLint warning.
packages/bootstrap/package.json Make lint fail on any Stylelint warning.
.husky/pre-commit Simplify hook to call pnpm pre-commit (but see review comment).
Comments suppressed due to low confidence (1)

.husky/pre-commit:2

  • Without a shebang, Git may fail to execute this hook directly (e.g., when core.hooksPath=.husky), resulting in an “exec format error” and the hook not running. Keep a shell shebang so the hook remains executable across environments.
pnpm pre-commit


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

@damienromito damienromito left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

hâte !

@pascalsaussier-edifice
pascalsaussier-edifice force-pushed the chore-ENABLING-938-lint-max-warnings branch from 0006498 to 95bea1f Compare June 23, 2026 09:00
@pascalsaussier-edifice
pascalsaussier-edifice force-pushed the chore-ENABLING-938-lint-max-warnings branch from 95bea1f to a7a7b63 Compare June 23, 2026 10:09
@pascalsaussier-edifice
pascalsaussier-edifice force-pushed the chore-ENABLING-938-lint-max-warnings branch from a7a7b63 to 655b52d Compare June 25, 2026 12:27
@pascalsaussier-edifice
pascalsaussier-edifice force-pushed the develop-enabling branch 2 times, most recently from ab73b57 to 434033a Compare July 1, 2026 09:29
@pascalsaussier-edifice
pascalsaussier-edifice force-pushed the chore-ENABLING-938-lint-max-warnings branch from 655b52d to 8a2ac05 Compare July 1, 2026 13:27
@pascalsaussier-edifice
pascalsaussier-edifice force-pushed the chore-ENABLING-938-lint-max-warnings branch from 8a2ac05 to 5a488ff Compare July 16, 2026 13:48
pascalsaussier-edifice and others added 3 commits July 20, 2026 22:22
…nings 0)

Ajoute --max-warnings 0 aux scripts lint de tous les packages (eslint +
stylelint) pour que les warnings fassent échouer la tâche et remontent
dans le résumé Turbo, au lieu de rester masqués (exit 0, cache vert).

Nettoie les 16 warnings préexistants sans changement de comportement :
- useDate : vraies dépendances (toComputedDate, t)
- useCheckable : forme fonctionnelle de setSelectedItems
- useHttpErrorToast : pattern latest-ref pour options
- useUploadFiles : ajout de resetInputValue (déjà stable)
- useWorkspaceFoldersTree : ajout de t, retrait de user inutile + import mort
- useHelp : booléen dérivé isHelpEnabled
- EditorToolbar : ajout de cantooEditor
- CantooAdaptTextBoxView / useOnboardingModal / WorkspaceFolders :
  eslint-disable justifiés (effets one-shot / déclencheur intentionnel)
- image.ts : paramètre element inutilisé retiré

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The shebang and husky.sh sourcing lines are deprecated since husky v9 and
will fail in v10. Keep only the hook command.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… les warnings ESLint post-rebase

Le rebase avait laissé une virgule manquante dans packages/client/package.json
(JSON invalide) et réintroduit 2 warnings ESLint dans PageLayoutOverlay.tsx,
faisant échouer le lint --max-warnings 0.
@pascalsaussier-edifice
pascalsaussier-edifice force-pushed the chore-ENABLING-938-lint-max-warnings branch from 5a488ff to 746051f Compare July 20, 2026 20:31
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