43081j / 43081j/eslint-plugin-wc

Disallow setting `innerHTML` inside the constructor

Abierto
#55 0 comentarios 1 reacción 0 asignados Ver en GitHub
help wanted new lint rule
Lenguaje dominante
TypeScript
Estrellas
113
Forks
19
Merge medio
3 h 14 min
PR fusionados (30 d)
2

Descripción

As @bennypowers points out in his tweet, https://twitter.com/PowersBenny/status/1383706876106395648

It can be detrimental to performance to set `innerHTML` inside the constructor. To accomplish this in a more performant way, you can create a static template and append that to the shadow dom instead.

This would be a fairly easy rule to detect and provide guidance for better perf.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Look at existing rules in the plugin to understand the AST patterns for detecting `innerHTML` assignments inside constructor methods. The rule should flag such usage and suggest using a static template. Check how other performance-related lint rules are structured and test with the project's test suite.

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

Evaluación

Stack tecnológico
javascript, typescript
Área
devtools, tooling
Tipo de issue
Nueva funcionalidad
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
40/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.