chore: migrate eslint config file to flat config

Change-Id: I777bc7dc2165e527005007416bf66d7f7b17b339
diff --git a/.eslintrc.json b/.eslintrc.json
deleted file mode 100644
index 6d1c0a4..0000000
--- a/.eslintrc.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
-    "env": {
-        "browser": true,
-        "webextensions": true,
-        "es2021": true
-    },
-    "extends": "eslint:recommended",
-    "overrides": [
-      {
-        "files": [
-          "**/*.test.js",
-          "**/*.test.mjs"
-        ],
-        "env": {
-          "jest": true
-        }
-      }
-    ],
-    "parserOptions": {
-        "ecmaVersion": "latest",
-        "sourceType": "module"
-    },
-    "rules": {
-    },
-    "ignorePatterns": [
-      "webpack.config.js"
-    ],
-    "globals": {
-      "PRODUCTION": "readonly"
-    }
-}
diff --git a/eslint.config.js b/eslint.config.js
new file mode 100644
index 0000000..9f57963
--- /dev/null
+++ b/eslint.config.js
@@ -0,0 +1,24 @@
+const js = require('@eslint/js');
+const globals = require('globals');
+
+module.exports = [
+  js.configs.recommended,
+  {
+    languageOptions: {
+      ecmaVersion: 'latest',
+      sourceType: 'module',
+      globals: {
+        PRODUCTION: 'readonly',
+        ...globals.browser,
+        ...globals.webextensions,
+      },
+    },
+    ignores: ['webpack.config.js'],
+  },
+  {
+    files: ['**/*.test.js', '**/*.test.mjs'],
+    globals: {
+      ...globals.jest,
+    },
+  },
+];