Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

136
Vistas
Specifying Environments in ESLint Configurations

From ESLint docs:

An environment provides predefined global variables. The available environments are:

  • es6 - enable all ECMAScript 6 features except for modules (this automatically sets the ecmaVersion parser option to 6).
  • es2017 - adds all ECMAScript 2017 globals and automatically sets the ecmaVersion parser option to 8.
  • es2020 - adds all ECMAScript 2020 globals and automatically sets the ecmaVersion parser option to 11.
  • es2021 - adds all ECMAScript 2021 globals and automatically sets the ecmaVersion parser option to 12.

For es2017, es2020, es2021 it says that they "add" new globals, but it does not say if they include globals from previous versions.

When configuring ESLint, should I include all of them or only the last one would be enough.

"parserOptions": {
  "ecmaVersion": "latest"
},
"env": {
  "es2021": true
},
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

It adds all of the previous globals, you can check it out in their playground here.

BigInt was added in ECMAScript 2020, but if you tick ECMAScript 2021 in the playground the linter still recognizes the global.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda