Skip to content

Commit 8e47e39

Browse files
committed
Merge pull request #677 from simono/patch-3
[eslint config] [minor] Add `prefer-arrow-callback` to ES6 rules (to match the guide)
2 parents 44be6af + 54b4dea commit 8e47e39

File tree

1 file changed

+2
-0
lines changed
  • packages/eslint-config-airbnb/rules

1 file changed

+2
-0
lines changed

packages/eslint-config-airbnb/rules/es6.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ module.exports = {
4242
// require method and property shorthand syntax for object literals
4343
// https://github.com/eslint/eslint/blob/master/docs/rules/object-shorthand.md
4444
'object-shorthand': [2, 'always'],
45+
// suggest using arrow functions as callbacks
46+
'prefer-arrow-callback': 2,
4547
// suggest using of const declaration for variables that are never modified after declared
4648
'prefer-const': 2,
4749
// suggest using the spread operator instead of .apply()

0 commit comments

Comments
 (0)