Closed appsforartists closed 8 years ago
@appsforartists Are there any official docs about this convention? A lot of non-Googler are using this preset too, so would be nice to refer them to something.
@sindresorhus
Most of the changes I'm making are on things where there doesn't seem to be an established internal edict. If I find comments about any of it, of course, I'll post them here.
Maybe document what the preset is not opinionated about so users can set those rules themselves? For example, the curly
rule is something that most users would want to enforce (regardless of its value).
The change itself looks good to me though. @addyosmani ?
Changes here LGTM
Thanks guys. Somebody want to press the Merge button? 😉
@sindresorhus Documenting intentionally unset style choices is an interesting idea, but honestly it's not high on my priority list. Perhaps people who want something more strict than Google should try xo. 😄
People want the Google preset because Google.
I'll document this later.
Thanks.
This is another case where @sindresorhus appears to be more opinionated than Google is. Moreover, there are valid reasons that you may have unused arguments in a function, such as:
To make it clear that the function is compatible with a particular API, like Event Listening:
To prevent future contributors from adding arguments that are incompatible with that signature
Even if the above
event
is unused, its presence reminds developers not to use the first argument position, as this function may be used as an event listener elsewhere.Therefore, I'm disabling the no-unused-vars check on arguments.