-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionenhancementThis change enhances an existing feature of ESLintThis change enhances an existing feature of ESLintruleRelates to ESLint's core rulesRelates to ESLint's core rules
Description
Our team would like to adopt the AirBnb best practice for arrow functions parens but it appears the current options of this rule doesn't fit it. Since we want to rely on automated coding style rules only and found out it would be useful for others too, here is the PR that fulfill it.
See https://github.com/airbnb/javascript#arrows--one-arg-parens
Discussion: SimpliField/eslint-config-simplifield#14
- The version of ESLint you are using
2.11.1
https://github.com/SimpliField/eslint-config-simplifield/blob/master/package.json#L20
- The rule you want to change
'arrow-parens'
- The code you want to be flagged as incorrect
a => { a } // (1)
(a) => a // (2)
- What happens when the rule is applied to the code without your change
with 'as-needed' (1) is valid
with 'always' (2) is valid
Metadata
Metadata
Assignees
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionenhancementThis change enhances an existing feature of ESLintThis change enhances an existing feature of ESLintruleRelates to ESLint's core rulesRelates to ESLint's core rules