Use fat arrow functions const foo = () => { ... }; for callbacks

and any other function that is passed around and it's not a top level function
This commit is contained in:
Juanjo Diaz
2018-07-09 22:47:29 +02:00
parent 0e4808bf6f
commit 651c23ece3
28 changed files with 177 additions and 191 deletions
+5
View File
@@ -13,5 +13,10 @@
"no-var": "error",
"no-useless-constructor": "error",
"object-shorthand": ["error", "methods", { "avoidQuotes": true }],
"prefer-arrow-callback": "error",
"arrow-body-style": ["error", "as-needed", { "requireReturnForObjectLiteral": false } ],
"arrow-parens": ["error", "as-needed", { "requireForBlockBody": true }],
"arrow-spacing": ["error"],
"no-confusing-arrow": ["error", { "allowParens": true }],
}
}