From 3955c960ba861d26c9fcd2d68e02b89fb9d90f23 Mon Sep 17 00:00:00 2001 From: samreid <reids@colorado.edu> Date: Mon, 30 Dec 2019 09:18:09 -0700 Subject: [PATCH] Rename DOT/Util and SCENERY/Util to Utils, see https://github.com/phetsims/tasks/issues/966 --- eslint/rules/bad-sim-text.js | 6 +++--- eslint/rules/no-math-sign.js | 2 +- js/common/extractDocumentation.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/eslint/rules/bad-sim-text.js b/eslint/rules/bad-sim-text.js index 0bd1503a2..2f010c9e4 100644 --- a/eslint/rules/bad-sim-text.js +++ b/eslint/rules/bad-sim-text.js @@ -22,7 +22,7 @@ module.exports = function( context ) { // babel doesn't support compiling static getters, see https://github.com/phetsims/tasks/issues/983 { id: ' static get ', codeTokens: [ 'static', 'get' ] }, - // should be using dot.Util.roundSymmetric, Math.round does not treat positive and negative numbers + // should be using dot.Utils.roundSymmetric, Math.round does not treat positive and negative numbers // symmetrically see https://github.com/phetsims/dot/issues/35#issuecomment-113587879 { id: 'Math.round(', codeTokens: [ 'Math', '.', 'round', '(' ] }, @@ -53,13 +53,13 @@ module.exports = function( context ) { // regex: /(window\.| )setInterval\(/ // } - // DOT/Util.toFixed or DOT/Util.toFixedNumber should be used instead of toFixed. + // 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: /(?<!Util)\.toFixed\(/ + // regex: /(?<!Utils)\.toFixed\(/ // } ]; diff --git a/eslint/rules/no-math-sign.js b/eslint/rules/no-math-sign.js index b7dfdeb07..d8d7a27c3 100644 --- a/eslint/rules/no-math-sign.js +++ b/eslint/rules/no-math-sign.js @@ -23,7 +23,7 @@ module.exports = function( context ) { context.report( { node: node, loc: node.loc.start, - message: 'Math.sign is not supported on IE, please use DOT/Util.sign' + message: 'Math.sign is not supported on IE, please use DOT/Utils.sign' } ); } } diff --git a/js/common/extractDocumentation.js b/js/common/extractDocumentation.js index 6b8dd0bd5..7cb874c58 100644 --- a/js/common/extractDocumentation.js +++ b/js/common/extractDocumentation.js @@ -559,7 +559,7 @@ } } } - // Variable object initialization: e.g. var Util = { ... }; + // Variable object initialization: e.g. var Utils = { ... }; else if ( topLevelStatement.type === 'VariableDeclaration' && topLevelStatement.declarations[ 0 ].type === 'VariableDeclarator' && topLevelStatement.declarations[ 0 ].init &&