mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-05-14 10:58:34 +00:00
Refactor: Wakatime card: Use @typedef to resolve eslint errors (#3033)
This commit is contained in:
committed by
GitHub
parent
6d086b4c40
commit
dc5d23e187
@@ -36,11 +36,15 @@ const noCodingActivityNode = ({ color, text }) => {
|
||||
`;
|
||||
};
|
||||
|
||||
/**
|
||||
* @typedef {import('../fetchers/types').WakaTimeLang} WakaTimeLang
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create compact WakaTime layout.
|
||||
*
|
||||
* @param {Object} args The function arguments.
|
||||
* @param {import("../fetchers/types").WakaTimeLang} args.lang The languages array.
|
||||
* @param {WakaTimeLang} args.lang The languages array.
|
||||
* @param {number} args.x The x position of the language node.
|
||||
* @param {number} args.y The y position of the language node.
|
||||
* @returns {string} The compact layout language SVG node.
|
||||
@@ -62,7 +66,7 @@ const createCompactLangNode = ({ lang, x, y }) => {
|
||||
* Create WakaTime language text node item.
|
||||
*
|
||||
* @param {Object} args The function arguments.
|
||||
* @param {import("../fetchers/types").WakaTimeLang[]} args.langs The language objects.
|
||||
* @param {WakaTimeLang[]} args.langs The language objects.
|
||||
* @param {number} args.y The y position of the language node.
|
||||
* @returns {string[]} The language text node items.
|
||||
*/
|
||||
@@ -140,7 +144,7 @@ const createTextNode = ({
|
||||
* Recalculating percentages so that, compact layout's progress bar does not break when
|
||||
* hiding languages.
|
||||
*
|
||||
* @param {import("../fetchers/types").WakaTimeLang[]} languages The languages array.
|
||||
* @param {WakaTimeLang[]} languages The languages array.
|
||||
* @returns {void} The recalculated languages array.
|
||||
*/
|
||||
const recalculatePercentages = (languages) => {
|
||||
|
||||
Reference in New Issue
Block a user