djlint run locally reports 54 findings that MegaLinter's HTML_DJLINT never surfaces
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- html
- Área
- ci-cd, testing-qa, web-dev
Línea de trabajo
Empieza ejecutando djlint --lint *.html con .djlintrc; después, revisa cómo MegaLinter invoca HTML_DJLINT y compara su conjunto de reglas con el comando local. Revisa CLAUDE.md, .djlintrc y sitemap.html; se considera terminado cuando el comportamiento local y el de CI sean deliberados y estén documentados, y H006 y H031 se hayan corregido o se hayan ignorado explícitamente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Found incidentally while checking whether an inline onerror on a script tag would trip an HTML rule (#94 / #108). Not caused by that change - it reproduces identically on master.
What happens
Running djlint over the pages the way .djlintrc configures it:
$ djlint --lint *.html
...
Linted 16 files, found 54 errors.
54 findings, all pre-existing:
- H006 (53) -
Img tag should have height and width attributes, on essentially every<img>on the site, banner/spotlight heroes and gallery thumbs alike. - H031 (1) -
Consider adding meta keywords, onsitemap.htmlonly. Every other page has the meta tag;sitemap.htmldoes not.
MegaLinter is green on master and green on #108, so HTML_DJLINT as MegaLinter invokes it is evidently not running --lint, or is running it with a different rule set. Verified by exporting masters HTML plus .djlintrc to a clean directory and linting there: same 54, same set.
Why it is worth a look
Two separate things, and they want separating:
- The gate does not do what the docs imply.
CLAUDE.mdsays the pre-commit hooks are the fast local subset and "full linting is MegaLinter in CI". Anyone who takes that at face value, runs djlint locally to check their HTML before pushing, and gets 54 errors will either assume they broke something or conclude djlint is noise and stop running it. WhicheverHTML_DJLINTis actually doing, the discrepancy should be deliberate and written down. - H006 is not purely cosmetic. Missing intrinsic dimensions on the hero and gallery images means the browser cannot reserve space before the image decodes, which is layout shift on exactly the sections #85, #87 and #92 were about. The
.imagecontainers may already be sized in CSS, in which case the finding is genuinely moot here and the rule should be added to theignorelist in.djlintrcnext to H021 and H023, with the reason - rather than left to fail silently for whoever runs the tool by hand.
Suggested outcome
Establish which mode MegaLinter runs HTML_DJLINT in, then either bring the local invocation into line with it or record why they differ. Separately, decide H006 on its merits - fix the dimensions, or ignore the rule with a stated reason. H031 on sitemap.html is a one-line fix or a one-line ignore either way.
Refs #94, #108
- Lenguaje dominante
- HTML
- Estrellas
- 0
- Forks
- 0
- Merge medio
- 9 h 52 min
- PR fusionados (30 d)
- 59
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de laywill/laywill.github.io
-
design
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
laywill/laywill.github.io#186 ·
-
design
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
laywill/laywill.github.io#183 · 1 comentario ·
-
Dificultad 2/5 Medio día Aptitud para principiantes 74/100
laywill/laywill.github.io#135 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
laywill/laywill.github.io#106 ·
-
infra needs-william
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
laywill/laywill.github.io#35 · 1 comentario ·
Todos los issues de laywill/laywill.github.io
Issues similares
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
[BUG] Azure.AppService.PlanInstanceCount incorrectly applies to Flex Consumption (FC1) plans Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Azure/PSRule.Rules.Azure#3929 · 1 comentario ·
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 78/100
Mintplex-Labs/anything-llm#6490 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100