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/nextcloud-cospend/package.json | 2 +- recipes/nextcloud-cospend/webview.js | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'recipes/nextcloud-cospend') diff --git a/recipes/nextcloud-cospend/package.json b/recipes/nextcloud-cospend/package.json index 7367589..36d971e 100644 --- a/recipes/nextcloud-cospend/package.json +++ b/recipes/nextcloud-cospend/package.json @@ -1,7 +1,7 @@ { "id": "nextcloud-cospend", "name": "Nextcloud Cospend", - "version": "1.2.1", + "version": "1.3.0", "license": "MIT", "repository": "https://github.com/csolisr/ferdium-recipes/tree/master/recipes/nextcloud-cospend/", "config": { diff --git a/recipes/nextcloud-cospend/webview.js b/recipes/nextcloud-cospend/webview.js index b3836a7..5832e75 100644 --- a/recipes/nextcloud-cospend/webview.js +++ b/recipes/nextcloud-cospend/webview.js @@ -1,18 +1,24 @@ -const _path = _interopRequireDefault(require('path')); +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; +} -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const _path = _interopRequireDefault(require('path')); module.exports = Ferdium => { const getMessages = () => { const directSelector = document.querySelectorAll( '.app-navigation-entry-utils-counter.highlighted', ); - const direct = directSelector ? Ferdium.safeParseInt(directSelector.length) : 0; + const direct = directSelector + ? Ferdium.safeParseInt(directSelector.length) + : 0; const indirectSelector = document.querySelectorAll( '.app-navigation-entry-utils-counter:not(.highlighted)', ); - const indirect = indirectSelector ? Ferdium.safeParseInt(indirectSelector.length) : 0; + const indirect = indirectSelector + ? Ferdium.safeParseInt(indirectSelector.length) + : 0; Ferdium.setBadge(direct, indirect); }; -- cgit v1.2.3-54-g00ecf