Clarification for Inline Comments
@prateekbisht23 y travaille déjà.
Depuis le 15/9/2025.
- #3174 par @prateekbisht23 — fermée sans fusion
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 30/100
- Type d'issue
- Documentation
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- javascript
- Domaine
- documentation
Piste de recherche
Commencez par lire la section existante "Comments" du guide de style et le fil de discussion de sept commentaires. Déterminez si le fil établit des directives pour les commentaires inline et les lignes longues ; le travail est terminé lorsqu’une règle approuvée par un maintainer avec des exemples est documentée, ou lorsqu’il est identifié qu’une décision est encore nécessaire.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- JavaScript
- Étoiles
- 148k
- Forks
- 26.5k
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de airbnb/javascript
-
Severity: Unhandled promise rejection in `whitespace-async.js` when ESLint async path is usedPeut-être pris @bodapatisaikrishna l’a pris il y a 29 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
airbnb/javascript#3237 · 6 commentaires ·
-
Inconsistent semicolon usage in examples (Arrays vs Functions)Peut-être pris @Developer-shivamMishra l’a pris il y a 20 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
airbnb/javascript#3152 · 4 commentaires ·
-
No error handling around execSync + JSON.parse in whitespace.js (ESLint 9 path)Peut-être pris @dataCenter430 l’a pris il y a 224 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 48/100
airbnb/javascript#3238 · 8 commentaires ·
-
Upgrading eslint-plugin-react-hooksPeut-être pris @weihongyu12 l’a pris il y a 370 jours. Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 38/100
airbnb/javascript#3186 · 3 commentaires · 2 réactions ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
airbnb/javascript#3173 · 9 commentaires · 1 réaction ·
Toutes les issues de airbnb/javascript
Issues similaires
-
[Website] Catalog: unknown sort value and mixed-case technology in the URL break the filtersPeut-être pris @barbierajput378-pixel l’a pris aujourd’hui. Ouvertearea/website framework/jekyll help wanted language/css language/javascript language/markdown
Difficulté 2/5 1-3 heures Accessibilité débutants 80/100
meshery/meshery.io#3088 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
firecrawl/firecrawl-mcp-server#548 ·
Les mainteneurs répondent en général sous 1 jour
-
Area:WebGL p5.js 2.0+
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
processing/p5.js#9302 ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
documentation good first issue hacktoberfest
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
wassim-azi/agy-powerline#47 ·
Les mainteneurs répondent en général sous 1 jour