Skip to content

Commit

Permalink
enable jsdoc/check-param-names
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-atr committed Dec 27, 2022
1 parent 9c6899a commit 4908c90
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 11 deletions.
5 changes: 2 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,9 @@ module.exports = {
'jsdoc/check-alignment': 0,
'jsdoc/require-returns': 0,
'jsdoc/require-property-description': 0,
'jsdoc/check-param-names': 0,
'jsdoc/no-undefined-types': 0,
'jsdoc/require-returns-check': 0,
// jsdoc problematics
'jsdoc/valid-types': 0,
'jsdoc/no-undefined-types': 0,
},
overrides: [
{
Expand Down
7 changes: 4 additions & 3 deletions src/helpers/noop-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ export const noopObject = () => ({});
export const noopPromiseReject = () => Promise.reject(); // eslint-disable-line compat/compat

/**
* Returns Promise object that is resolved value of response body
* @param {string} [url=''] value of response url to set on response object
* @param {string} [response='default'] value of response type to set on response object
* Returns Promise object that is resolved with specified props
* @param {string} [responseBody='{}']
* @param {string} [responseUrl='']
* @param {string} [responseType='default']
*/
export const noopPromiseResolve = (responseBody = '{}', responseUrl = '', responseType = 'default') => {
if (typeof Response === 'undefined') {
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/parse-rule.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* Iterate over iterable argument and evaluate current state with transitions
* @param {string} init first transition name
* @param {Array|Collection|string} iterable
* @param {Object} transitions transtion functions
* @param {string} init first transition name
* @param {any} args arguments which should be passed to transition functions
*/
function iterateWithTransitions(iterable, transitions, init, args) {
Expand Down
6 changes: 5 additions & 1 deletion src/helpers/prevent-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ export const isValidCallback = (callback) => {
* Checks whether 'callback' and 'delay' are matching
* by given parameters 'matchCallback' and 'matchDelay'.
* Used for prevent-setTimeout and prevent-setInterval.
* @param {Object} { callback, delay, matchCallback, matchDelay }
* @param {Object} preventData
* @param {Function} preventData.callback
* @param {any} preventData.delay
* @param {string} preventData.matchCallback
* @param {string} preventData.matchDelay
* @returns {boolean}
*/
export const isPreventionNeeded = ({
Expand Down
1 change: 0 additions & 1 deletion src/helpers/storage-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { logMessage } from './log-message';
* @param {Storage} storage storage instance to set item into
* @param {string} key
* @param {string} value
* @param {boolean} shouldLog determines if helper should log on a failed set attempt
*/
export const setStorageItem = (source, storage, key, value) => {
// setItem() may throw an exception if the storage is full.
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/throttle.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Returns a wrapper, passing the call to 'method' at maximum once per 'delay' milliseconds.
* Those calls that fall into the "cooldown" period, are ignored
* @param {Function} method
* @param {Function} cb
* @param {Number} delay - milliseconds
*/
export const throttle = (cb, delay) => {
Expand Down
2 changes: 1 addition & 1 deletion src/redirects/google-analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function GoogleAnalytics(source) {

/**
* checks data object and delays callback
* @param {Object|Array} data gtag payload
* @param {Object|Array} dataObj gtag payload
* @param {string} funcName callback prop name
*/
const handleCallback = (dataObj, funcName) => {
Expand Down
2 changes: 2 additions & 0 deletions src/redirects/metrika-yandex-tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export function metrikaYandexTag(source) {

/**
* https://yandex.ru/support/metrica/objects/get-client-id.html
* @param {string} id
* @param {Function} cb
*/
const getClientID = (id, cb) => {
Expand All @@ -65,6 +66,7 @@ export function metrikaYandexTag(source) {

/**
* https://yandex.ru/support/metrica/objects/reachgoal.html
* @param {string} id
* @param {string} target
* @param {Object} params
* @param {Function} callback
Expand Down

0 comments on commit 4908c90

Please sign in to comment.