gokublack
gokublack

Reputation: 1460

ESLint Rule to enforce not to use parentheses for single argument arrow functions

I want to know whether there is an ESLint Rule to enforce developer not to use parentheses for single argument arrow functions.

// good
const handleKeyValues = prop => {

// warn
const handleKeyValues = (prop) => {

Upvotes: 0

Views: 2839

Answers (1)

Daniel Galarza
Daniel Galarza

Reputation: 318

The arrow-parens rule with "as-needed" value should enforce that.

Upvotes: 1

Related Questions