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
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 answers
Answer question

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 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!