Add prefer-arrow-callback to ES6 Rules.

This prefers arrow functions as described in https://github.com/airbnb/javascript#8.1
This commit is contained in:
Simon Olofsson
2016-01-13 17:32:30 +01:00
parent 44be6af748
commit 54b4dea0f9

View File

@@ -42,6 +42,8 @@ module.exports = {
// require method and property shorthand syntax for object literals
// https://github.com/eslint/eslint/blob/master/docs/rules/object-shorthand.md
'object-shorthand': [2, 'always'],
// suggest using arrow functions as callbacks
'prefer-arrow-callback': 2,
// suggest using of const declaration for variables that are never modified after declared
'prefer-const': 2,
// suggest using the spread operator instead of .apply()