Documentation conflicts with object-property-newline setting?
- Vorherrschende Sprache
- JavaScript
- Sterne
- 148k
- Forks
- 26.6k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
It seems like the documentation consistently promotes having a new line for each item in multiline lists, whether it be in a [function invocation](https://github.com/airbnb/javascript#functions--signature-invocation-indentation) or in [an array](https://github.com/airbnb/javascript#arrays--bracket-newline) (both of which mention bad examples of not having each item on a new line).
And even the [object examples](https://github.com/airbnb/javascript#objects--quoted-props) (although not referring to this specific rule) seem to favor this approach.
With that said, what is the reasoning behind [allowing object properties to all appear on the same line](https://github.com/airbnb/javascript/blob/17e0454672f784772c5f5ab052523a93229d9adf/packages/eslint-config-airbnb-base/rules/style.js#L406)?
It would seem more consistent to remove that option for `object-property-newline`. But at the very least, the reasoning and/or use case should probably be documented.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne mit packages/eslint-config-airbnb-base/rules/style.js bei der object-property-newline-Konfiguration und vergleiche anschließend deren Option mit den verknüpften functions-, arrays- und object-Abschnitten des style guide. Bestimme, ob der style guide die Option erklären sollte oder ob die Konfiguration konsistent gemacht werden sollte, und dokumentiere das gewählte Verhalten und die Begründung.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- eslint, javascript
- Bereich
- documentation, tooling
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100