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

134
Views
Solucione el error de ESLint en torno a las variables de campo de clase en JavaScript

Recibo un error eslint en esta declaración ES6 de una variable de clase. ¿Alguien puede sugerir una mejor sintaxis o qué regla eslint necesito agregar o cambiar?

error: ESLint: Parsing error: Unexpected token =

 export default class ErrorBoundary extends React.Component { state = { hasError: false, error: null }; }; ...

Aquí está mi .eslintrc.json

 { "parserOptions": { "ecmaVersion": 2020, "sourceType": "module", "ecmaFeatures": { "jsx": true } }, "plugins": ["react-hooks"], "rules": { "semi": [2, "always"], "react-hooks/rules-of-hooks": "error", "react-hooks/exhaustive-deps": "error" } }

Nota: pregunté esto anteriormente y olvidé mencionar que el problema no es sobre la función de flecha, sino sobre la declaración de estado. La solución sugerida no resuelve este problema.

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!