diff options
author | 2023-07-26 06:29:03 -0600 | |
---|---|---|
committer | 2023-07-26 17:59:03 +0530 | |
commit | 9b8f01716774a960073e944823ab727cc867a8f6 (patch) | |
tree | 732b83770baa78f5cf12776aaa33ce65bebfa418 /recipes/superhuman | |
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/superhuman')
-rw-r--r-- | recipes/superhuman/index.js | 13 | ||||
-rw-r--r-- | recipes/superhuman/package.json | 2 | ||||
-rw-r--r-- | recipes/superhuman/webview.js | 10 |
3 files changed, 17 insertions, 8 deletions
diff --git a/recipes/superhuman/index.js b/recipes/superhuman/index.js index 3cae124..c2d4bee 100644 --- a/recipes/superhuman/index.js +++ b/recipes/superhuman/index.js | |||
@@ -1,6 +1,7 @@ | |||
1 | module.exports = Ferdium => class SuperHuman extends Ferdium { | 1 | module.exports = Ferdium => |
2 | overrideUserAgent() { | 2 | class SuperHuman extends Ferdium { |
3 | // TODO: Rather than hardcoding like this, the user should set it for their individual installation of Ferdium | 3 | overrideUserAgent() { |
4 | return 'Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10136'; | 4 | // TODO: Rather than hardcoding like this, the user should set it for their individual installation of Ferdium |
5 | } | 5 | return 'Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10136'; |
6 | }; | 6 | } |
7 | }; | ||
diff --git a/recipes/superhuman/package.json b/recipes/superhuman/package.json index e4ea8ab..37283d8 100644 --- a/recipes/superhuman/package.json +++ b/recipes/superhuman/package.json | |||
@@ -1,7 +1,7 @@ | |||
1 | { | 1 | { |
2 | "id": "superhuman", | 2 | "id": "superhuman", |
3 | "name": "Superhuman", | 3 | "name": "Superhuman", |
4 | "version": "1.2.0", | 4 | "version": "1.3.0", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "repository": "https://github.com/CrystalLarsh/franz-superhuman-recipe", | 6 | "repository": "https://github.com/CrystalLarsh/franz-superhuman-recipe", |
7 | "config": { | 7 | "config": { |
diff --git a/recipes/superhuman/webview.js b/recipes/superhuman/webview.js index 0652545..6778fcd 100644 --- a/recipes/superhuman/webview.js +++ b/recipes/superhuman/webview.js | |||
@@ -1,8 +1,16 @@ | |||
1 | module.exports = (Ferdium) => { | 1 | function _interopRequireDefault(obj) { |
2 | return obj && obj.__esModule ? obj : { default: obj }; | ||
3 | } | ||
4 | |||
5 | const _path = _interopRequireDefault(require('path')); | ||
6 | |||
7 | module.exports = Ferdium => { | ||
2 | const getMessages = () => { | 8 | const getMessages = () => { |
3 | const mentions = document.querySelectorAll('.chat-line .mentioned').length; | 9 | const mentions = document.querySelectorAll('.chat-line .mentioned').length; |
4 | Ferdium.setBadge(mentions, 0); | 10 | Ferdium.setBadge(mentions, 0); |
5 | }; | 11 | }; |
6 | 12 | ||
7 | Ferdium.loop(getMessages); | 13 | Ferdium.loop(getMessages); |
14 | |||
15 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
8 | }; | 16 | }; |