Documentation conflicts with object-property-newline setting?
- Lingua principale
- JavaScript
- Stelle
- 148k
- Fork
- 26.6k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia da packages/eslint-config-airbnb-base/rules/style.js, alla configurazione object-property-newline, quindi confronta la relativa opzione con le sezioni collegate functions, arrays e object della guida di stile. Determina se la guida di stile debba spiegare l'opzione oppure se la configurazione debba essere resa coerente, quindi documenta il comportamento scelto e la relativa motivazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- eslint, javascript
- Ambito
- documentation, tooling
- Tipo di issue
- Documentazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100