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/wechat/package.json | 2 +- recipes/wechat/webview.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'recipes/wechat') diff --git a/recipes/wechat/package.json b/recipes/wechat/package.json index cdc76b9..7e7aed9 100644 --- a/recipes/wechat/package.json +++ b/recipes/wechat/package.json @@ -1,7 +1,7 @@ { "id": "wechat", "name": "WeChat", - "version": "1.2.0", + "version": "1.3.0", "license": "MIT", "repository": "https://github.com/koma-private/recipe-wechat", "config": { diff --git a/recipes/wechat/webview.js b/recipes/wechat/webview.js index 033faae..e11bf0b 100644 --- a/recipes/wechat/webview.js +++ b/recipes/wechat/webview.js @@ -1,16 +1,16 @@ -const _path = _interopRequireDefault(require('path')); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +const _path = _interopRequireDefault(require('path')); + module.exports = Ferdium => { const getMessages = () => { let directCount = 0; let indirectCount = 0; - const chat_item = document.querySelectorAll('div.chat_item'); + const chatItem = document.querySelectorAll('div.chat_item'); - Array.prototype.forEach.call(chat_item, item => { + Array.prototype.forEach.call(chatItem, item => { let count = 0; const reddot = item.querySelector('i.web_wechat_reddot_middle'); const avatarImage = item.querySelector('img.img'); @@ -21,7 +21,7 @@ module.exports = Ferdium => { if ( avatarImage && - avatarImage.getAttribute('src').search('webwxgeticon') != -1 + avatarImage.getAttribute('src').search('webwxgeticon') !== -1 ) { directCount += count; } else { -- cgit v1.2.3-54-g00ecf