Skip to content

Commit

Permalink
Remove extra eslintrc and fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
kewisch committed Aug 8, 2024
1 parent 238c003 commit 00de663
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 517 deletions.
27 changes: 20 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,32 @@

module.exports = {
"env": {
"es2022": true,
"webextensions": true
es2022: true,
webextensions: true
},
"globals": {
messenger: true
},
"root": true,
"plugins": ["mozilla"],
"extends": ["plugin:mozilla/recommended"],
"extends": ["plugin:mozilla/recommended"],

rules: {
"rules": {
// experiment files are not ES modules, so we can't use static import
"mozilla/use-static-import": "off",

// We are still experimenting, console messages are ok for now
"no-console": "off"
"no-console": "off",

// Some other rules that don't seem to be in the recommended set
"no-trailing-spaces": "error",
"eol-last": "error",
"quote-props": ["error", "consistent-as-needed", { keywords: true }],
"quotes": ["error", "double", { avoidEscape: true }],
"padded-blocks": ["error", "never"],
},

overrides: [
"overrides": [
{
files: [".eslintrc.js"],
env: {
Expand All @@ -26,10 +36,13 @@ module.exports = {
},
},
{
files: ["*/experiments/*/parent/*.js"],
files: ["*/experiments/*/parent/*.js", "*/experiments/*/child/*.js"],
globals: {
global: true,
Services: true,
},
rules: {
"no-unused-vars": ["error", { argsIgnorePattern: "^_|context" }]
}
}
]
Expand Down
3 changes: 1 addition & 2 deletions NotificationBox/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ messenger.NotificationBox.onButtonClicked.addListener((windowId, notificationId,
if (["btn-keep"].includes(buttonId)) {
console.log("Box will not close, as long as one listener returns {close:false}.");
return { close: false };
}
}
return { close: true };

});

// Defining another onButtonClicked listener
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/* global ExtensionCommon, Services */

// Tested in Thunderbird 128. Does not work for older versions of Thunderbird.
Expand Down
Loading

0 comments on commit 00de663

Please sign in to comment.