Skip to content

[ONB-1618] Migrar ESLint a flat config sobre ESLint 10 - #105

Merged
tlarrain merged 3 commits into
masterfrom
onb-1618-migrar-eslint-flat-config
Sep 8, 2026
Merged

[ONB-1618] Migrar ESLint a flat config sobre ESLint 10#105
tlarrain merged 3 commits into
masterfrom
onb-1618-migrar-eslint-flat-config

Conversation

@tlarrain

@tlarrain tlarrain commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Description

El setup de lint estaba pegado en ESLint 7 + airbnb-base + typescript-eslint 4, que ya no soportan las versiones actuales de ESLint ni TypeScript.

  • eslint.config.mjs con @eslint/js, typescript-eslint 8 y eslint-plugin-import-x; se elimina .eslintrc.js
  • Reglas type-aware de promesas vía projectService
  • Params sin uso y console en specs se resuelven desde la config, no con eslint-disable por archivo
  • reportUnusedDisableDirectives como error
  • Script lint:fix

Requirements

None.

Additional changes

  • El workflow linters.yml ahora se gatilla con cambios en eslint.config.mjs (antes apuntaba a un .eslintrc.json inexistente)

Tests

  • build, test y lint en verde

Created with Claude Code /fast-track command

The legacy .eslintrc.js pinned ESLint 7, typescript-eslint 4 and
airbnb-base, none of which support current ESLint or TypeScript
releases. Replace it with eslint.config.mjs built on @eslint/js,
typescript-eslint 8 and eslint-plugin-import-x, and drop airbnb-base
in favour of the recommended presets plus the few rules the codebase
actually relies on (import ordering, no-console, tsdoc syntax).

Type-aware promise rules are enabled via projectService since the SDK
is async-heavy. preserve-caught-error stays off because Error.cause is
unavailable on the supported Node 10 runtime.

Unused-parameter and spec-only console usage are now handled at the
config level (args: 'none', a src/spec override) instead of per-file
eslint-disable comments, and the directives that no longer apply
under the new preset set are removed so that
reportUnusedDisableDirectives can be enforced as an error.
The path filter listed .eslintrc.json, which never existed, so a
config-only change did not run the lint job. Point it at the new
flat config file.
@tlarrain tlarrain self-assigned this Sep 7, 2026
@tlarrain
tlarrain marked this pull request as ready for review September 7, 2026 21:05
@tlarrain
tlarrain requested a review from daleal September 7, 2026 21:05
Comment thread eslint.config.mjs Outdated
],
languageOptions: {
parserOptions: {
projectService: true,

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.

Creo que esto va a hacer que se carguen las reglas type-aware, que hacen que el linter sea mucho más lento :hide-the-pain-gary:

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.

según el clanker esto estaba en el archivo antiguo también, y se necesite para algunas reglas (no-floating-promises, no-misused-promises, await-thenable y switch-exhaustiveness-check). En el dashboard tenemos apagadas las reglas que necesitan eso, podemos hacer eso mismo aquí. El repo igual es más chico, la diferencia es proporcionalmente grande, pero igual corre como en 2 segundos en mi máquina

Removes projectService and the four rules that required it
(await-thenable, no-floating-promises, no-misused-promises,
switch-exhaustiveness-check), per review.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@tlarrain
tlarrain requested a review from daleal September 8, 2026 16:05

tlarrain commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

@daleal borré las reglas que nos obligaban a tener esa cosita

@tlarrain
tlarrain merged commit 1de61ed into master Sep 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants