Skip to content

Commit

Permalink
(simatec) Fix eslint check
Browse files Browse the repository at this point in the history
  • Loading branch information
simatec committed Dec 9, 2024
1 parent 24deb26 commit 53bf62a
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default [
//'no-useless-escape': 'off',
//'jsdoc/require-param': 'off',
//'@typescript-eslint/no-require-imports': 'off',
'jsdoc/no-types': 'off',
//'jsdoc/no-types': 'off',
//'jsdoc/tag-lines': 'off',
},
},
Expand Down
2 changes: 1 addition & 1 deletion lib/elevationDown.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const CheckInSummerNotDown = require('./isSummerTime.js').CheckInSummerNotDown;
const GetXmasLevel = require('./isSummerTime.js').GetXmasLevel; // Check is XMas

/**
* @param {Date | undefined} [d]
* @param [d]
*/
function getDate(d) {
d = d || new Date();
Expand Down
10 changes: 5 additions & 5 deletions lib/isSummerTime.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict';

/**
* @param {{ log: { debug: (arg0: string) => void; error: (arg0: string) => void; }; }} adapter
* @param {string} StartDate
* @param {string} EndDate
* @param adapter
* @param StartDate
* @param EndDate
*/
async function IsSummerTime(adapter, StartDate, EndDate) {
return new Promise(async (resolve) => {
Expand Down Expand Up @@ -79,8 +79,8 @@ async function CheckInSummerNotDown(adapter, shutter) {
}

/**
* @param {{ log: any; config?: any; }} adapter
* @param {{ shutterName: string; useXmasLevel: any; XmasLevel: string; }} shutter
* @param adapter
* @param shutter
*/
async function GetXmasLevel(adapter, shutter) {
return new Promise(async (resolve) => {
Expand Down
8 changes: 4 additions & 4 deletions lib/setShutter.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ async function setShutterState(adapter, shutterSettings, currentShutterSettings,
}

/**
* @param {{ setStateAsync: (arg0: string, arg1: { val: any; ack: boolean; }) => any; log: { warn: (arg0: string) => void; }; }} adapter
* @param {any} shutterSettings
* @param {{ currentHeight: string; currentAction: any; name: any; }} currentShutterSettings
* @param {string} nameDevice
* @param adapter
* @param shutterSettings
* @param currentShutterSettings
* @param nameDevice
*/
async function setShutterInfo(adapter, shutterSettings, currentShutterSettings, nameDevice) {
return new Promise(async (resolve) => {
Expand Down
2 changes: 1 addition & 1 deletion lib/shutterBrightnessSensor.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async function sleep(ms) {
}

/**
* @param {Date | undefined} [d]
* @param [d]
*/
function getDate(d) {
d = d || new Date();
Expand Down
2 changes: 1 addition & 1 deletion lib/shutterDownChildren.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function sleep(ms) {
}

/**
* @param {Date | undefined} [d]
* @param [d]
*/
function getDate(d) {
d = d || new Date();
Expand Down
2 changes: 1 addition & 1 deletion lib/shutterDownLiving.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function sleep(ms) {
}

/**
* @param {Date | undefined} [d]
* @param [d]
*/
function getDate(d) {
d = d || new Date();
Expand Down
2 changes: 1 addition & 1 deletion lib/shutterDownSleep.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function sleep(ms) {
}

/**
* @param {Date | undefined} [d]
* @param [d]
*/
function getDate(d) {
d = d || new Date();
Expand Down
2 changes: 1 addition & 1 deletion lib/shutterGoldenHour.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function sleep(ms) {
}

/**
* @param {Date | undefined} [d]
* @param [d]
*/
function getDate(d) {
d = d || new Date();
Expand Down
2 changes: 1 addition & 1 deletion lib/shutterSunriseSunset.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function sleep(ms) {
}

/**
* @param {Date | undefined} [d]
* @param [d]
*/
function getDate(d) {
d = d || new Date();
Expand Down
30 changes: 15 additions & 15 deletions lib/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ const axios = require('axios');
/**
* Tests whether the given variable is a real object and not an Array
*
* @param {any} it The variable to test
* @returns {it is Record<string, any>}
* @param it The variable to test
* @returns
*/
function isObject(it) {
// This is necessary because:
Expand All @@ -17,8 +17,8 @@ function isObject(it) {
/**
* Tests whether the given variable is really an Array
*
* @param {any} it The variable to test
* @returns {it is any[]}
* @param it The variable to test
* @returns
*/
function isArray(it) {
if (typeof Array.isArray === 'function') return Array.isArray(it);
Expand All @@ -28,10 +28,10 @@ function isArray(it) {
/**
* Translates text to the target language. Automatically chooses the right translation API.
*
* @param {string} text The text to translate
* @param {string} targetLang The target languate
* @param {string} [yandexApiKey] The yandex API key. You can create one for free at https://translate.yandex.com/developers
* @returns {Promise<string>}
* @param text The text to translate
* @param targetLang The target languate
* @param [yandexApiKey] The yandex API key. You can create one for free at https://translate.yandex.com/developers
* @returns
*/
async function translateText(text, targetLang, yandexApiKey) {
if (targetLang === 'en') {
Expand All @@ -47,10 +47,10 @@ async function translateText(text, targetLang, yandexApiKey) {
/**
* Translates text with Yandex API
*
* @param {string} text The text to translate
* @param {string} targetLang The target languate
* @param {string} [apiKey] The yandex API key. You can create one for free at https://translate.yandex.com/developers
* @returns {Promise<string>}
* @param text The text to translate
* @param targetLang The target languate
* @param [apiKey] The yandex API key. You can create one for free at https://translate.yandex.com/developers
* @returns
*/
async function translateYandex(text, targetLang, apiKey) {
if (targetLang === 'zh-cn') {
Expand All @@ -72,9 +72,9 @@ async function translateYandex(text, targetLang, apiKey) {
/**
* Translates text with Google API
*
* @param {string} text The text to translate
* @param {string} targetLang The target languate
* @returns {Promise<string>}
* @param text The text to translate
* @param targetLang The target languate
* @returns
*/
async function translateGoogle(text, targetLang) {
try {
Expand Down
12 changes: 6 additions & 6 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1720,8 +1720,8 @@ async function detectedOldShutter(result) {
// +++++++++++++++++++ Is Later function ++++++++++++++++++++++

/**
* @param {string} timeVal
* @param {string} timeLimit
* @param timeVal
* @param timeLimit
*/
function IsLater(timeVal, timeLimit) {
let ret = false;
Expand Down Expand Up @@ -1756,8 +1756,8 @@ function IsLater(timeVal, timeLimit) {
// +++++++++++++++++ Is Earlier function +++++++++++++++++++++

/**
* @param {string } timeVal
* @param {string } [timeLimit]
* @param timeVal
* @param [timeLimit]
*/
function IsEarlier(timeVal, timeLimit) {
let ret = false;
Expand Down Expand Up @@ -1791,8 +1791,8 @@ function IsEarlier(timeVal, timeLimit) {

// ++++++++++++++++++++++++++ is Equal function ++++++++++++++++++++++
/**
* @param {string} timeVal
* @param {string} timeLimit
* @param timeVal
* @param timeLimit
*/
function IsEqual(timeVal, timeLimit) {
let ret = false;
Expand Down

0 comments on commit 53bf62a

Please sign in to comment.