Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

224
Views
Why do I need parentheses around arrow function regardless of the ESLint configuration rules?

I set up the .eslintrc.json file in my react project as follow.

{
"env": {
    "browser": true,
    "commonjs": true,
    "es2021": true,
    "node": true,
    "jest": true
  },
  "extends": [
    "airbnb-base",
    "eslint:recommended",
    "plugin:react/recommended"
  ],
  "parserOptions": {
    "ecmaFeatures": {
      "experimentalObjectRestSpread": true,
      "jsx": true
    },
    "sourceType": "module",
    "ecmaVersion": "latest"
  },
  "plugins": [
    "react"
  ],
  "rules": {
    "react/display-name": [
      "off"
    ],
    "no-console": [
      "warn",
      {
        "allow": [
          "clear",
          "infor",
          "error",
          "dir",
          "trace"
        ]
      }
    ],
    "no-useless-return": "error",
    "linebreak-style": [
      "error",
      "unix"
    ],
    "quotes": [
      "error",
      "single"
    ],
    "indent": [
      "error",
      2
    ],
    "semi": [
      "error",
      "always"
    ],
    "arrow-parens": ["error", "as-needed"],
    "comma-dangle": [
      "error",
      "never"
    ]
  }
}

But I run my application and then get below error from eslint.

This stands like a syntax error.

Please help me with how do I have to change my eslint rule or code base.

I was referred from this link.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!