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

661
Views
eslint: error Error de análisis: la palabra clave 'const' está reservada

Recibo este error de ESLint:

 error Parsing error: The keyword 'const' is reserved

de este código:

 const express = require('express'); const app = express(); const _ = require('underscore');

Intenté eliminar node_modules y reinstalar todos los paquetes npm (como se sugiere aquí ), pero fue en vano.

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

ESLint tiene como valor predeterminado la verificación de sintaxis de ES5.
Querrá anular a la última versión compatible de JavaScript.

Intente agregar un archivo .eslintrc.json a su proyecto. Dentro de eso:

 { "parserOptions": { "ecmaVersion": 2017 }, "env": { "es6": true } }

Espero que esto ayude.

EDITAR: También encontré este ejemplo .eslintrc.json que podría ayudar.

over 4 years ago · Santiago Trujillo Report

0

también puede agregar esto en línea en lugar de la configuración, solo agréguelo al mismo archivo antes de agregar sus propias cosas deshabilitadas

 /* eslint-env es6 */ /* eslint-disable no-console */

mi caso fue deshabilitar un archivo y eslint-disable no funcionaba solo para mí

 /* eslint-env es6 */ /* eslint-disable */
over 4 years ago · Santiago Trujillo Report

0

Usé .eslintrc.js y agregué el siguiente código.

 module.exports = { "parserOptions": { "ecmaVersion": 6 } };
over 4 years ago · Santiago Trujillo Report
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!