From dd8c3283bc04b4deb275caa30cf9908e6e21097d Mon Sep 17 00:00:00 2001 From: zepumph Date: Fri, 26 Mar 2021 11:46:19 -0800 Subject: [PATCH] prefer Utils.toFixed when possible, https://github.com/phetsims/chipper/issues/737 --- eslint/rules/bad-sim-text.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/eslint/rules/bad-sim-text.js b/eslint/rules/bad-sim-text.js index 75ead7ee..2be6150f 100644 --- a/eslint/rules/bad-sim-text.js +++ b/eslint/rules/bad-sim-text.js @@ -59,16 +59,15 @@ module.exports = function( context ) { { id: 'setInterval(', regex: /(window\.| )setInterval\(/ - } + }, // DOT/Utils.toFixed or DOT/Utils.toFixedNumber should be used instead of toFixed. // JavaScript's toFixed is notoriously buggy. Behavior differs depending on browser, // because the spec doesn't specify whether to round or floor. - // TODO: comment back in when all lint errors are taken care of, https://github.com/phetsims/chipper/issues/737 - // { - // id: '.toFixed(', // support regex with english names this way - // regex: /(?