Only JavaScript is modified here. The corresponding PHP function is unchanged to preserve consistency with other PHP functions. Corresponding pull request in jquery.uls: https://github.com/wikimedia/jquery.uls/pull/370 Downstream bug: https://phabricator.wikimedia.org/T265158
Had to update eslint to ^7.9.0 since we are using new rules: * no-loss-of-precision * no-unreachable-loop Bug: T266462
Additional changes in this PR include, * Added composer.json * Refactored the folder structure. * Added editorconfig. * Added PHPCS and formatted existing code. * Changes to use a single license - GPL-2.0-or-later * ESLint related fixes Bug: T218639