diff --git a/eslint b/eslint new file mode 100644 index 0000000..e69de29 diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..b62f0ac --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,67 @@ +module.exports = { + "parserOptions": { + "ecmaVersion": 2018 + }, + "env": { + "browser": true, + "es6": true, + "node": true, + "webextensions": true + }, + "globals": { + "Utils": true, + "CustomizableUI": true, + "CustomizableWidgets": true, + "SessionStore": true, + "Services": true, + "Components": true, + "XPCOMUtils": true, + "OS": true, + "ADDON_UNINSTALL": true, + "ADDON_DISABLE": true, + "CONTAINER_ORDER_STORAGE_KEY": true, + "proxifiedContainers": true, + "MozillaVPN": true, + "MozillaVPN_Background": true + }, + "plugins": [ + "promise", + "no-unsanitized" + ], + "extends": [ + "eslint:recommended" + ], + "root": true, + "rules": { + "linebreak-style": ["off"], // Disable linebreak-style rule + "promise/always-return": "off", + "promise/avoid-new": "off", + "promise/catch-or-return": "error", + "promise/no-callback-in-promise": "warn", + "promise/no-native": "off", + "promise/no-nesting": "warn", + "promise/no-promise-in-callback": "warn", + "promise/no-return-wrap": "error", + "promise/param-names": "error", + + "no-unsanitized/method": ["error"], + "no-unsanitized/property": [ + "error", + { + "escape": { + "taggedTemplates": ["Utils.escaped"] + } + } + ], + + "eqeqeq": "error", + "indent": ["error", 2], + "no-throw-literal": "error", + "no-warning-comments": "warn", + "no-var": "error", + "prefer-const": "error", + "quotes": ["error", "double"], + "radix": "error", + "semi": ["error", "always"] + } +}; diff --git a/src/css/popup.css b/src/css/popup.css index 1f9a2a5..66bd7f5 100644 --- a/src/css/popup.css +++ b/src/css/popup.css @@ -1530,6 +1530,7 @@ input[type=text] { .container-panel { min-block-size: 500px; } + .sort-container-panel, .delete-container-panel, .clear-container-storage-panel { diff --git a/src/js/popup.js b/src/js/popup.js index 1b66053..260b06d 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -2416,7 +2416,7 @@ Logic.registerPanel(P_CONTAINER_SORT, { // This method is called when the object is registered. initialize() { Utils.addEnterHandler(document.querySelector("#sort-container-cancel-link"), () => { - Logic.showPreviousPanel(); + Logic.showPreviousPanel(); }); Utils.addEnterHandler(document.querySelector("#close-container-sort-panel"), () => { Logic.showPreviousPanel(); diff --git a/testpilot-containers@8.2.0 b/testpilot-containers@8.2.0 new file mode 100644 index 0000000..e69de29