Skip to content

Commit

Permalink
chore: remove all jsdoc eslint warnnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dukeluo committed Feb 10, 2024
1 parent 58c6d58 commit cb6754a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion lib/utils/filename.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const getFolderPath = (p) => posix.join(posix.dirname(p), posix.sep);
/**
* @returns {string} base name
* @param {string} filename filename without path
* @param {boolean} [ignoreMiddleExtensions=false] flag to ignore middle extensions
* @param {boolean} [ignoreMiddleExtensions] flag to ignore middle extensions
*/
export const getBasename = (filename, ignoreMiddleExtensions = false) =>
filename.substring(
Expand Down
1 change: 0 additions & 1 deletion lib/utils/rule.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { isEmpty, isNil } from './utility.js';

/**
* Takes in a rule and transforms it if it contains prefined match syntax
*
* @typedef {string} filenamePattern original filename pattern
* @typedef {string} namingPattern original naming pattern
* @typedef {[filenamePattern, namingPattern]} rule
Expand Down
9 changes: 0 additions & 9 deletions lib/utils/utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { TEMPLATE_VARIABLE_REGEXP } from '../constants/regex.js';

/**
* Checks if the given argument is an object
*
* @param {any} x - The argument to check
* @returns {boolean} - True if the argument is an object, false otherwise
*/
Expand All @@ -16,7 +15,6 @@ export const isObject = (x) =>

/**
* Checks if the given argument is an array
*
* @param {any} x - The argument to check
* @returns {boolean} - True if the argument is an array, false otherwise
*/
Expand All @@ -27,15 +25,13 @@ const isArray = (x) =>

/**
* Checks if a value is undefined or null
*
* @param {any} x - The value to check
* @returns {boolean} - Returns true if the value is undefined or null, false otherwise
*/
export const isNil = (x) => x === undefined || x === null;

/**
* Checks if a value is an empty value
*
* @param {any} x - The value to check
* @returns {boolean} - Returns true if the value is an empty value, false otherwise
*/
Expand All @@ -46,15 +42,13 @@ export const isEmpty = (x) =>

/**
* Negates a boolean value
*
* @param {boolean} x - The boolean value to negate
* @returns {boolean} The negated boolean value
*/
const not = (x) => !x;

/**
* Callback for file path
*
* @callback callback
* @param {unknown} p
*/
Expand All @@ -69,22 +63,19 @@ export const pipe =

/**
* Checks if a value isn't an empty value
*
* @param {any} x - The value to check
* @returns {boolean} - Returns true if the value isn't an empty value, false otherwise
*/
export const isNotEmpty = pipe(isEmpty, not);

/**
* Template function with the specified template
*
* @callback templateFunction
* @param {...string} data - param array
* @returns {string} - String with replaced template variables
*/
/**
* Get template function for a template string
*
* @param {string} tpl - The template string to be replaced
* @returns {templateFunction} - A function that takes in data and replaces the template variables with the corresponding values from the data object
*/
Expand Down
1 change: 0 additions & 1 deletion lib/utils/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { isObject } from './utility.js';

/**
* Validator
*
* @callback validator
* @param {string} p pattern string
*/
Expand Down

0 comments on commit cb6754a

Please sign in to comment.