diff options
author | 2023-07-26 06:29:03 -0600 | |
---|---|---|
committer | 2023-07-26 17:59:03 +0530 | |
commit | 9b8f01716774a960073e944823ab727cc867a8f6 (patch) | |
tree | 732b83770baa78f5cf12776aaa33ce65bebfa418 /recipes/toggl/webview-unsafe.js | |
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/toggl/webview-unsafe.js')
-rw-r--r-- | recipes/toggl/webview-unsafe.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/recipes/toggl/webview-unsafe.js b/recipes/toggl/webview-unsafe.js index f657e0c..3e39e3e 100644 --- a/recipes/toggl/webview-unsafe.js +++ b/recipes/toggl/webview-unsafe.js | |||
@@ -1,6 +1,8 @@ | |||
1 | // only try to update badge once Ferdium API has finished loading | 1 | // only try to update badge once Ferdium API has finished loading |
2 | if (window.ferdium != undefined && window.ferdium.setBadge != undefined) { | 2 | if (window.ferdium !== undefined && window.ferdium.setBadge !== undefined) { |
3 | var timerRunning = (window.toggl != undefined) && !!(window.toggl.store.getState().view.timer.timeEntry.start); | 3 | const timerRunning = |
4 | window.toggl !== undefined && | ||
5 | !!window.toggl.store.getState().view.timer.timeEntry.start; | ||
4 | 6 | ||
5 | // Treat running timer as a "non-direct" notification (default blue dot instead of urgent red "1") | 7 | // Treat running timer as a "non-direct" notification (default blue dot instead of urgent red "1") |
6 | window.ferdium.setBadge(0, timerRunning ? 1 : 0); | 8 | window.ferdium.setBadge(0, timerRunning ? 1 : 0); |