From 9b8f01716774a960073e944823ab727cc867a8f6 Mon Sep 17 00:00:00 2001 From: MCMXC <16797721+mcmxcdev@users.noreply.github.com> Date: Wed, 26 Jul 2023 06:29:03 -0600 Subject: chore: improve lint setup (#397) - update eslint config to closely mirror the ones from ferdium-app - add .eslintignore - opt in to eslint `reportUnusedDisableDirectives` config option - remove `trailingComma: all` from `prettier` config which is default in `prettier` v3 - autofix or disable a lot of lint issues throughout codebase - add `volta` configuration to `package.json` to autoload correct `node` and `pnpm` versions - upgrade all `eslint` and `prettier` related dependencies to latest - update lint:fix npm script - reformat touched files with prettier - bumped up minor version for all recipes that have changes - introduced injection of 'service.css' where it was missing in many recipes --------- Co-authored-by: Vijay A --- recipes/rainloop/package.json | 2 +- recipes/rainloop/webview.js | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'recipes/rainloop') diff --git a/recipes/rainloop/package.json b/recipes/rainloop/package.json index 3c9ce18..3d3b2c4 100644 --- a/recipes/rainloop/package.json +++ b/recipes/rainloop/package.json @@ -1,7 +1,7 @@ { "id": "rainloop", "name": "RainLoop", - "version": "1.2.0", + "version": "1.3.0", "repository": "https://github.com/promarcel/franz-recipe-rainloop", "license": "MIT", "config": { diff --git a/recipes/rainloop/webview.js b/recipes/rainloop/webview.js index 6b0c3d6..0421d54 100644 --- a/recipes/rainloop/webview.js +++ b/recipes/rainloop/webview.js @@ -1,13 +1,21 @@ +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} + +const _path = _interopRequireDefault(require('path')); + module.exports = Ferdium => { const getMessages = () => { let messages = 0; // Let's only loop through user folders, as all system folders are duplicated there - for (const obj of document.querySelectorAll('.b-folders-user .ui-droppable')) { + for (const obj of document.querySelectorAll( + '.b-folders-user .ui-droppable', + )) { const countEl = obj.querySelector('.count'); const countText = countEl ? countEl.innerHTML : ''; - if (countText != '') { + if (countText !== '') { if (obj.classList.contains('system')) { // Only count the Inbox system folder and ignore Archive, Trash, Drafts, Spam, Sent if (obj.classList.contains('i-am-inbox')) { @@ -23,4 +31,6 @@ module.exports = Ferdium => { }; Ferdium.loop(getMessages); + + Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); }; -- cgit v1.2.3-70-g09d2