Clarification for Inline Comments
@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
- Área
- documentation
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
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
- 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 airbnb/javascript
-
Severity: Unhandled promise rejection in `whitespace-async.js` when ESLint async path is usedPosiblemente ocupada @bodapatisaikrishna la tomó hace 24 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
airbnb/javascript#3237 · 6 comentarios ·
-
Inconsistent semicolon usage in examples (Arrays vs Functions)Posiblemente ocupada @Developer-shivamMishra la tomó hace 15 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
airbnb/javascript#3152 · 4 comentarios ·
-
No error handling around execSync + JSON.parse in whitespace.js (ESLint 9 path)Posiblemente ocupada @dataCenter430 la tomó hace 219 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 48/100
airbnb/javascript#3238 · 8 comentarios ·
-
Upgrading eslint-plugin-react-hooksPosiblemente ocupada @weihongyu12 la tomó hace 365 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 38/100
airbnb/javascript#3186 · 3 comentarios · 2 reacciones ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
airbnb/javascript#3173 · 9 comentarios · 1 reacción ·
Todos los issues de airbnb/javascript
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
XRPLF/xrpl-dev-portal#4000 ·
Los mantenedores suelen responder en 1 día
-
accessibility good first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 92/100
Los mantenedores suelen responder en 1 día
-
[BUG] Bubble chart series name is not XML-escaped in the embedded workbook (xl/tables/table1.xml)Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 94/100
-
Content:Learn needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
anoopcodehack/DevBoard#609 ·
Los mantenedores suelen responder en 1 día