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:
@@ -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 }],
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user