diff options
author | 2023-07-26 06:29:03 -0600 | |
---|---|---|
committer | 2023-07-26 17:59:03 +0530 | |
commit | 9b8f01716774a960073e944823ab727cc867a8f6 (patch) | |
tree | 732b83770baa78f5cf12776aaa33ce65bebfa418 /recipes/rainloop | |
parent | Add Excalidraw recipe (#393) (diff) | |
download | ferdium-recipes-9b8f01716774a960073e944823ab727cc867a8f6.tar.gz ferdium-recipes-9b8f01716774a960073e944823ab727cc867a8f6.tar.zst ferdium-recipes-9b8f01716774a960073e944823ab727cc867a8f6.zip |
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 <vraravam@users.noreply.github.com>
Diffstat (limited to 'recipes/rainloop')
-rw-r--r-- | recipes/rainloop/package.json | 2 | ||||
-rw-r--r-- | recipes/rainloop/webview.js | 14 |
2 files changed, 13 insertions, 3 deletions
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 @@ | |||
1 | { | 1 | { |
2 | "id": "rainloop", | 2 | "id": "rainloop", |
3 | "name": "RainLoop", | 3 | "name": "RainLoop", |
4 | "version": "1.2.0", | 4 | "version": "1.3.0", |
5 | "repository": "https://github.com/promarcel/franz-recipe-rainloop", | 5 | "repository": "https://github.com/promarcel/franz-recipe-rainloop", |
6 | "license": "MIT", | 6 | "license": "MIT", |
7 | "config": { | 7 | "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 @@ | |||
1 | function _interopRequireDefault(obj) { | ||
2 | return obj && obj.__esModule ? obj : { default: obj }; | ||
3 | } | ||
4 | |||
5 | const _path = _interopRequireDefault(require('path')); | ||
6 | |||
1 | module.exports = Ferdium => { | 7 | module.exports = Ferdium => { |
2 | const getMessages = () => { | 8 | const getMessages = () => { |
3 | let messages = 0; | 9 | let messages = 0; |
4 | 10 | ||
5 | // Let's only loop through user folders, as all system folders are duplicated there | 11 | // Let's only loop through user folders, as all system folders are duplicated there |
6 | for (const obj of document.querySelectorAll('.b-folders-user .ui-droppable')) { | 12 | for (const obj of document.querySelectorAll( |
13 | '.b-folders-user .ui-droppable', | ||
14 | )) { | ||
7 | const countEl = obj.querySelector('.count'); | 15 | const countEl = obj.querySelector('.count'); |
8 | const countText = countEl ? countEl.innerHTML : ''; | 16 | const countText = countEl ? countEl.innerHTML : ''; |
9 | 17 | ||
10 | if (countText != '') { | 18 | if (countText !== '') { |
11 | if (obj.classList.contains('system')) { | 19 | if (obj.classList.contains('system')) { |
12 | // Only count the Inbox system folder and ignore Archive, Trash, Drafts, Spam, Sent | 20 | // Only count the Inbox system folder and ignore Archive, Trash, Drafts, Spam, Sent |
13 | if (obj.classList.contains('i-am-inbox')) { | 21 | if (obj.classList.contains('i-am-inbox')) { |
@@ -23,4 +31,6 @@ module.exports = Ferdium => { | |||
23 | }; | 31 | }; |
24 | 32 | ||
25 | Ferdium.loop(getMessages); | 33 | Ferdium.loop(getMessages); |
34 | |||
35 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
26 | }; | 36 | }; |