From 65243e2c068edaf7a9168074e3c91b5c6efc59a1 Mon Sep 17 00:00:00 2001 From: Stephen Thompson Date: Wed, 23 Apr 2025 15:09:26 -0400 Subject: [PATCH] eslint ecmaVersion to 2021 CONTRIBUTING.md specifies the minimum supported Firefox version as 91.1.0. Based on the caniuse.com data for ECMAScript features listed at https://gist.github.com/Julien-Marcou/156b19aea4704e1d2f48adafc6e2acbf, I determined the following minimum Firefox versions that support each ECMAScript version: - ECMAScript 2018 (current setting) = Firefox 78 - ECMAScript 2019 = Firefox 64 - ECMAScript 2020 = Firefox 80 - ECMAScript 2021 = Firefox 79 - ECMAScript 2022 = Firefox 92 - ECMAScript 2023 = Firefox 104 - ECMAScript 2024 = Firefox 119+ (not exactly sure) This project is using v7 of eslint which depends on v7 of espree for JavaScript parsing. espree v7 has a maximum ECMAScript support version of ECMAScript 2021. Based on these findings, increasing the configured `parser.ecmaVersion` from `2018` to `2021` will allow using all JavaScript syntax supported in Firefox 91.1.0+ without raising eslint errors. --- .eslintrc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 1197c64..6ffd653 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,6 +1,6 @@ module.exports = { "parserOptions": { - "ecmaVersion": 2018 + "ecmaVersion": 2021 }, "env": { "browser": true,