mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-20 03:25:17 +01:00
Bump eslint-plugin-jsdoc from 44.2.5 to 45.0.0 (#25172)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Renaud Chaput <renchap@gmail.com>
This commit is contained in:
parent
c2ea0dc65f
commit
89d6341c80
@ -323,7 +323,7 @@ module.exports = {
|
|||||||
'plugin:import/recommended',
|
'plugin:import/recommended',
|
||||||
'plugin:import/typescript',
|
'plugin:import/typescript',
|
||||||
'plugin:promise/recommended',
|
'plugin:promise/recommended',
|
||||||
'plugin:jsdoc/recommended',
|
'plugin:jsdoc/recommended-typescript',
|
||||||
'plugin:prettier/recommended',
|
'plugin:prettier/recommended',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
@ -14,14 +14,15 @@ export type DecimalUnits = ValueOf<typeof DECIMAL_UNITS>;
|
|||||||
const TEN_THOUSAND = DECIMAL_UNITS.THOUSAND * 10;
|
const TEN_THOUSAND = DECIMAL_UNITS.THOUSAND * 10;
|
||||||
const TEN_MILLIONS = DECIMAL_UNITS.MILLION * 10;
|
const TEN_MILLIONS = DECIMAL_UNITS.MILLION * 10;
|
||||||
|
|
||||||
|
export type ShortNumber = [number, DecimalUnits, 0 | 1]; // Array of: shorten number, unit of shorten number and maximum fraction digits
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {number} sourceNumber Number to convert to short number
|
* @param sourceNumber Number to convert to short number
|
||||||
* @returns {ShortNumber} Calculated short number
|
* @returns Calculated short number
|
||||||
* @example
|
* @example
|
||||||
* shortNumber(5936);
|
* shortNumber(5936);
|
||||||
* // => [5.936, 1000, 1]
|
* // => [5.936, 1000, 1]
|
||||||
*/
|
*/
|
||||||
export type ShortNumber = [number, DecimalUnits, 0 | 1]; // Array of: shorten number, unit of shorten number and maximum fraction digits
|
|
||||||
export function toShortNumber(sourceNumber: number): ShortNumber {
|
export function toShortNumber(sourceNumber: number): ShortNumber {
|
||||||
if (sourceNumber < DECIMAL_UNITS.THOUSAND) {
|
if (sourceNumber < DECIMAL_UNITS.THOUSAND) {
|
||||||
return [sourceNumber, DECIMAL_UNITS.ONE, 0];
|
return [sourceNumber, DECIMAL_UNITS.ONE, 0];
|
||||||
@ -45,9 +46,9 @@ export function toShortNumber(sourceNumber: number): ShortNumber {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {number} sourceNumber Original number that is shortened
|
* @param sourceNumber Original number that is shortened
|
||||||
* @param {number} division The scale in which short number is displayed
|
* @param division The scale in which short number is displayed
|
||||||
* @returns {number} Number that can be used for plurals when short form used
|
* @returns Number that can be used for plurals when short form used
|
||||||
* @example
|
* @example
|
||||||
* pluralReady(1793, DECIMAL_UNITS.THOUSAND)
|
* pluralReady(1793, DECIMAL_UNITS.THOUSAND)
|
||||||
* // => 1790
|
* // => 1790
|
||||||
|
@ -182,7 +182,7 @@
|
|||||||
"eslint-import-resolver-typescript": "^3.5.5",
|
"eslint-import-resolver-typescript": "^3.5.5",
|
||||||
"eslint-plugin-formatjs": "^4.10.1",
|
"eslint-plugin-formatjs": "^4.10.1",
|
||||||
"eslint-plugin-import": "~2.27.5",
|
"eslint-plugin-import": "~2.27.5",
|
||||||
"eslint-plugin-jsdoc": "^44.2.5",
|
"eslint-plugin-jsdoc": "^45.0.0",
|
||||||
"eslint-plugin-jsx-a11y": "~6.7.1",
|
"eslint-plugin-jsx-a11y": "~6.7.1",
|
||||||
"eslint-plugin-prettier": "^4.2.1",
|
"eslint-plugin-prettier": "^4.2.1",
|
||||||
"eslint-plugin-promise": "~6.1.1",
|
"eslint-plugin-promise": "~6.1.1",
|
||||||
|
@ -5070,10 +5070,10 @@ eslint-plugin-import@~2.27.5:
|
|||||||
semver "^6.3.0"
|
semver "^6.3.0"
|
||||||
tsconfig-paths "^3.14.1"
|
tsconfig-paths "^3.14.1"
|
||||||
|
|
||||||
eslint-plugin-jsdoc@^44.2.5:
|
eslint-plugin-jsdoc@^45.0.0:
|
||||||
version "44.2.5"
|
version "45.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-44.2.5.tgz#f3186f57f112a230b3b7af34bf236d207bc8d5d7"
|
resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-45.0.0.tgz#6be84e4842a7138cc571a907ea9c31c42eaac5c0"
|
||||||
integrity sha512-KtuhaYy2GmdY2IQE5t+1lup8O4P05c+V4gKcj45PCxFM0OxmRq2uQlfOS1AgYVgPYIBKGE86DxrbKP24HKpORA==
|
integrity sha512-l2+Jcs/Ps7oFA+SWY+0sweU/e5LgricnEl6EsDlyRTF5y0+NWL1y9Qwz9PHwHAxtdJq6lxPjEQWmYLMkvhzD4g==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@es-joy/jsdoccomment" "~0.39.4"
|
"@es-joy/jsdoccomment" "~0.39.4"
|
||||||
are-docs-informative "^0.0.2"
|
are-docs-informative "^0.0.2"
|
||||||
|
Loading…
Reference in New Issue
Block a user