0
How do I make an error pro Eslint when someone in the project uses functions within a class that need bind instead of an Arrow Function
0
How do I make an error pro Eslint when someone in the project uses functions within a class that need bind instead of an Arrow Function
0
You can use this Eslint plugin to do this: https://www.npmjs.com/package/eslint-plugin-prefer-arrow
Example:
"plugins": [
"prefer-arrow"
],
"rules": [
"prefer-arrow/prefer-arrow-functions": [
"error",
{
"disallowPrototype": true,
"singleReturnOnly": false,
"classPropertiesAllowed": false
}
]
]
Browser other questions tagged javascript react eslint arrow-functions
You are not signed in. Login or sign up in order to post.