Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Clarification for Inline Comments

Abierto
#1,506 7 comentarios 0 reacciones 0 asignados Ver en GitHub

@prateekbisht23 ya está trabajando en esto.

Desde el 15/9/2025.

  • #3174 de @prateekbisht23 — cerrado sin fusionar

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
30/100
Tipo de issue
Documentación
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
javascript

Línea de trabajo

Empieza leyendo la sección existente "Comments" de la guía de estilo y el hilo de siete comentarios. Determina si el hilo establece directrices para los comentarios inline y las líneas largas; se considera terminado cuando se documenta una regla aprobada por un maintainer con ejemplos, o se identifica que aún es necesario tomar una decisión.

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

Descripción

editorial pull request wanted

Thanks for the excellent style guide!

One thing that is not explicitly defined by the guide is inline comments. Can a section on this topic be added to the "Comments" section block, please?

For example,

let foo = 145; // This is modified below in the "baz()" function

Is this a legal line in the airbnb style?

And the follow-up question: if it is not legal, then I assume that the correct fix to have it be moved above, like this?

// This is modified below in the "baz()" function
let foo = 145;

Yet another follow-up question: if inline comments are legal, then what is the correct fix for in-line comments that make the line extend past 100 character? Like the following:

// This is a comment describing the following block of variable initializations
let foo = 123; // used in various contexts, but mostly for soccer games, basketball, and football games
let bar = 456; // used only for horse races; it is explicitly reset at the beginning of the "endRace()" function
let baz = 789; // used only for car races; it will be overwritten once we reach the "oilChange()" function

If it were moved above, it would overlap with the block comment header. So then does it make the most sense to move them down to the next line, like this?

// This is a comment describing the following block of variable initializations
let foo = 123;
// used in various contexts, but mostly for soccer games, basketball, and football games
let bar = 456;
// used only for horse races; it is explicitly reset at the beginning of the "endRace()" function
let baz = 789;
// used only for car races; it will be overwritten once we reach the "oilChange()" function
Lenguaje dominante
JavaScript
Estrellas
148k
Forks
26.6k
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 airbnb/javascript

Todos los issues de airbnb/javascript

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.