Documentation conflicts with object-property-newline setting?
- Dominant language
- JavaScript
- Stars
- 148k
- Forks
- 26.6k
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with packages/eslint-config-airbnb-base/rules/style.js at the object-property-newline configuration, then compare its option with the linked functions, arrays, and object sections of the style guide. Determine whether the guide should explain the option or whether the configuration should be made consistent, and document the chosen behavior and rationale.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, javascript
- Domain
- documentation, tooling
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100