Enable type safety, unused-symbol and definition-order lint rules

Abierto
#9,502 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
eslint, javascript, typescript
Área
devtools

Línea de trabajo

Start with eslint.config.mjs, including the generated OpenAPI override, to see which core and TypeScript rules already apply to .js, .ts and .vue files. Enable one of the five listed rules on a branch from main, then run npm run lint to record the real violations and the files they affect before changing anything. Done means each rule is enabled on its intended file types, its violations are fixed without weakening tests, and npm run lint, npm run ts:check, npm test and npm run build pass.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

frontend help wanted javascript technical debt

Goal

Review and enable five deferred semantic JavaScript/TypeScript rules, fixing real problems rather than changing logic to make lint quiet.

Rules

  • @typescript-eslint/no-explicit-any (~17 historical hits)
  • @typescript-eslint/no-unused-vars (~78)
  • @typescript-eslint/no-use-before-define (~38)
  • no-unused-vars (~3)
  • no-use-before-define (~8)

The sum (~144) may overlap; recalculate on current main.

Getting started

  1. Read eslint.config.mjs, including the generated OpenAPI override. Establish which core rules and which TypeScript extension rules should apply to .js, .ts and .vue files. Do not activate conflicting duplicate diagnostics.
  2. Enable one rule at a time in a branch from main. Record real violations, affected files and why the flag exists before applying any fix.
  3. When addressing any, prefer a concrete type or unknown plus verified narrowing, not a permissive cast that hides the original issue.
  4. Before deleting an apparently unused symbol, check callers, module exports, initialization-time behavior and test fixtures. Before moving a declaration, check when it is initialized and executed.
  5. Keep per-rule DCO-signed commits and document any narrowly justified exceptions. Do not weaken tests or use blanket suppressions.

Tests and evidence

Run git diff --check, npm run lint, npm run ts:check, npm test and npm run build. For changed public exports, tests or initialization order, add focused regression tests that would fail if the behavior changed. Include the effective rule matrix by file type in the PR review description.

Done when

  • Rules run on the intended file types without duplicate false positives.
  • Types are meaningful; no legitimate side effects, consumers or public contracts are removed.
  • Tests and CI pass, or precise blockers are recorded for maintainer decisions.
  • Changes remain narrowly scoped and traceable per rule.

Out of scope and contributor suitability

Do not change generated API types, JSDoc policy or Vue public-property rules. This requires semantic inspection and is not a good first issue in its present combined scope.

Additional context

Development workflow: https://docs.libresign.coop/developer_manual/development-workflow.html
Questions: https://t.me/LibreSign

Lenguaje dominante
PHP
Estrellas
844
Forks
176
Merge medio
14 h 3 min
PR fusionados (30 d)
344

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de LibreSign/libresign

Todos los issues de LibreSign/libresign

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.