From 330efdb37f80f1c10df24b8ad15d748c879245e3 Mon Sep 17 00:00:00 2001 From: ChrisHanuta Date: Fri, 16 Aug 2024 12:51:14 +0200 Subject: [PATCH] after lint --- README.md | 1 + eslint.config.mjs | 70 +++++++++++++++++++++++++++-------------------- io-package.json | 36 ++++-------------------- 3 files changed, 47 insertions(+), 60 deletions(-) diff --git a/README.md b/README.md index 71479a8..45e98ba 100644 --- a/README.md +++ b/README.md @@ -363,6 +363,7 @@ Therefore, the description has also been removed. Placeholder for the next version (at the beginning of the line): ### **WORK IN PROGRESS** --> + ### 3.2.5 (2024-08-13) - (PLCHome) Solved the problem that no inverter list but result 2 was returned in NOAH. diff --git a/eslint.config.mjs b/eslint.config.mjs index 0ba85e3..f40144b 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,46 +1,56 @@ -import globals from "globals"; -import path from "node:path"; -import { fileURLToPath } from "node:url"; -import js from "@eslint/js"; -import { FlatCompat } from "@eslint/eslintrc"; +import globals from 'globals'; +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; +import js from '@eslint/js'; +import { FlatCompat } from '@eslint/eslintrc'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, - allConfig: js.configs.all + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all, }); -export default [{ - ignores: ["**/admin", "**/test", "lib/env/tools.js", "**/gulpfile.js", "eslint.config.mjs"], -}, ...compat.extends("eslint:recommended", "plugin:prettier/recommended"), { +export default [ + { + ignores: ['**/admin', '**/test', 'lib/env/tools.js', '**/gulpfile.js', 'eslint.config.mjs'], + }, + ...compat.extends('eslint:recommended', 'plugin:prettier/recommended'), + { languageOptions: { - globals: { - ...globals.browser, - ...globals.node, - ...globals.mocha, - }, + globals: { + ...globals.browser, + ...globals.node, + ...globals.mocha, + }, - ecmaVersion: 2018, - sourceType: "module", + ecmaVersion: 2018, + sourceType: 'module', - parserOptions: { - ecmaFeatures: { - impliedStrict: true, - }, + parserOptions: { + ecmaFeatures: { + impliedStrict: true, }, + }, }, rules: { - "no-use-before-define": ["error", { - functions: false, - }], + 'no-use-before-define': [ + 'error', + { + functions: false, + }, + ], - "no-continue": "off", + 'no-continue': 'off', - "no-param-reassign": ["error", { - props: false, - }], + 'no-param-reassign': [ + 'error', + { + props: false, + }, + ], }, -}]; + }, +]; diff --git a/io-package.json b/io-package.json index f2ca48e..355566f 100644 --- a/io-package.json +++ b/io-package.json @@ -56,20 +56,8 @@ "uk": "ioBroker Growatt адаптер для комунікації з ShineAPI", "zh-cn": "ioBroker Growatt适配器可与ShineAPI通信" }, - "authors": [ - "PLCHome" - ], - "keywords": [ - "growatt", - "shine", - "shinephone", - "shineapi", - "solarenergy", - "home automation", - "solar power", - "solar power plant", - "solaranlage" - ], + "authors": ["PLCHome"], + "keywords": ["growatt", "shine", "shinephone", "shineapi", "solarenergy", "home automation", "solar power", "solar power plant", "solaranlage"], "licenseInformation": { "license": "MIT", "type": "free" @@ -108,10 +96,7 @@ { "condition": { "operand": "and", - "rules": [ - "oldVersion<3.2.2", - "newVersion>=3.2.3" - ] + "rules": ["oldVersion<3.2.2", "newVersion>=3.2.3"] }, "title": { "en": "Incorrect objects were created in connection with Multiple Backflow.", @@ -154,20 +139,11 @@ "uk": "Документація", "zh-cn": "文件" }, - "buttons": [ - "agree", - "cancel" - ] + "buttons": ["agree", "cancel"] } ], - "encryptedNative": [ - "password", - "shareKey" - ], - "protectedNative": [ - "password", - "shareKey" - ], + "encryptedNative": ["password", "shareKey"], + "protectedNative": ["password", "shareKey"], "native": { "keyLogin": false, "user": "",