diff options
author | 2023-07-26 06:29:03 -0600 | |
---|---|---|
committer | 2023-07-26 17:59:03 +0530 | |
commit | 9b8f01716774a960073e944823ab727cc867a8f6 (patch) | |
tree | 732b83770baa78f5cf12776aaa33ce65bebfa418 /recipes/tchap | |
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/tchap')
-rw-r--r-- | recipes/tchap/index.js | 2 | ||||
-rw-r--r-- | recipes/tchap/package.json | 4 | ||||
-rw-r--r-- | recipes/tchap/webview.js | 12 |
3 files changed, 13 insertions, 5 deletions
diff --git a/recipes/tchap/index.js b/recipes/tchap/index.js index 8244b1b..dd41f72 100644 --- a/recipes/tchap/index.js +++ b/recipes/tchap/index.js | |||
@@ -1 +1 @@ | |||
module.exports = Ferdium => Ferdium; \ No newline at end of file | module.exports = Ferdium => Ferdium; | ||
diff --git a/recipes/tchap/package.json b/recipes/tchap/package.json index a9425fc..cff6893 100644 --- a/recipes/tchap/package.json +++ b/recipes/tchap/package.json | |||
@@ -1,10 +1,10 @@ | |||
1 | { | 1 | { |
2 | "id": "tchap", | 2 | "id": "tchap", |
3 | "name": "Tchap", | 3 | "name": "Tchap", |
4 | "version": "1.0.0", | 4 | "version": "1.1.0", |
5 | "license": "MIT", | 5 | "license": "MIT", |
6 | "repository": "https://github.com/Sykursen/recipe-tchap/", | 6 | "repository": "https://github.com/Sykursen/recipe-tchap/", |
7 | "config": { | 7 | "config": { |
8 | "serviceURL": "https://www.tchap.gouv.fr/" | 8 | "serviceURL": "https://www.tchap.gouv.fr/" |
9 | } | 9 | } |
10 | } \ No newline at end of file | 10 | } |
diff --git a/recipes/tchap/webview.js b/recipes/tchap/webview.js index bc24fe6..cd5b4a5 100644 --- a/recipes/tchap/webview.js +++ b/recipes/tchap/webview.js | |||
@@ -1,8 +1,16 @@ | |||
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 count = document.querySelector('.mx_RoomSubList_badge').innerHTML | 9 | const count = document.querySelector('.mx_RoomSubList_badge').innerHTML; |
4 | Ferdium.setBadge(count); | 10 | Ferdium.setBadge(count); |
5 | }; | 11 | }; |
6 | 12 | ||
7 | Ferdium.loop(getMessages); | 13 | Ferdium.loop(getMessages); |
8 | }; \ No newline at end of file | 14 | |
15 | Ferdium.injectCSS(_path.default.join(__dirname, 'service.css')); | ||
16 | }; | ||