mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-06 15:42:32 -06:00
WebUI: replace rounding function from MooTools
The `round()` returning floating point number is not a good idea. This is due to floating point representation is imprecise and sometimes it cannot faithfully represent a number, for example `0.09 + 0.01 !== 0.1 `. Therefore, it should be avoided and/or utilize other function to achieve the goal. Also, improve `window.qBittorrent.Misc.toFixedPointString()` and add test cases. PR #22281.
This commit is contained in:
@@ -6,8 +6,9 @@
|
||||
"url": "https://github.com/qbittorrent/qBittorrent.git"
|
||||
},
|
||||
"scripts": {
|
||||
"format": "js-beautify -r *.mjs private/*.html private/scripts/*.js private/views/*.html public/*.html public/scripts/*.js && prettier --write **.css",
|
||||
"lint": "eslint --cache *.mjs private/*.html private/scripts/*.js private/views/*.html public/*.html public/scripts/*.js && stylelint --cache **/*.css && html-validate private public"
|
||||
"format": "js-beautify -r *.mjs private/*.html private/scripts/*.js private/views/*.html public/*.html public/scripts/*.js test/*/*.js && prettier --write **.css",
|
||||
"lint": "eslint --cache *.mjs private/*.html private/scripts/*.js private/views/*.html public/*.html public/scripts/*.js test/*/*.js && stylelint --cache **/*.css && html-validate private public",
|
||||
"test": "vitest run --dom"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@stylistic/eslint-plugin": "*",
|
||||
@@ -15,11 +16,13 @@
|
||||
"eslint-plugin-html": "*",
|
||||
"eslint-plugin-prefer-arrow-functions": "*",
|
||||
"eslint-plugin-regexp": "*",
|
||||
"happy-dom": "*",
|
||||
"html-validate": "*",
|
||||
"js-beautify": "*",
|
||||
"prettier": "*",
|
||||
"stylelint": "*",
|
||||
"stylelint-config-standard": "*",
|
||||
"stylelint-order": "*"
|
||||
"stylelint-order": "*",
|
||||
"vitest": "*"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user