Clarification for Inline Comments
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 30/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript
調査の方向性
まず、スタイルガイドの既存の「Comments」セクションと、7件のコメントからなるスレッドを読みます。そのスレッドによってインラインコメントと長い行に関する指針が定められているかを確認します。完了とは、例を含む maintainer 承認済みのルールを文書化すること、または判断がまだ必要であると特定することを意味します。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- JavaScript
- スター
- 148k
- フォーク
- 26.6k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
airbnb/javascript のほかの issue
-
Severity: Unhandled promise rejection in `whitespace-async.js` when ESLint async path is used対応中かも @bodapatisaikrishna が 24 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
airbnb/javascript#3237 · コメント 6 件 ·
-
Inconsistent semicolon usage in examples (Arrays vs Functions)対応中かも @Developer-shivamMishra が 15 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
airbnb/javascript#3152 · コメント 4 件 ·
-
No error handling around execSync + JSON.parse in whitespace.js (ESLint 9 path)対応中かも @dataCenter430 が 220 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
airbnb/javascript#3238 · コメント 8 件 ·
-
Upgrading eslint-plugin-react-hooks対応中かも @weihongyu12 が 365 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
airbnb/javascript#3186 · コメント 3 件 · リアクション 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
airbnb/javascript#3173 · コメント 9 件 · リアクション 1 件 ·
airbnb/javascript の issue をすべて見る
似ている issue
-
area/frontend good first issue kind/cooldown
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
kestra-io/kestra#20702 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Form-data fields are not parsed when importing a cURL request対応中かも @aayushbaluni が今日担当しました。 オープンbug status-new
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
メンテナーはふだん 1 日以内に返信
-
bug MVP
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
saayam-for-all/webapp#1911 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
vshulcz/deja-vu#4937 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[Focus] Accessibility (a11y) [Package] Grid [Type] Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信