Skip to content

Commit

Permalink
Rename DOT/Util and SCENERY/Util to Utils, see phetsims/tasks#966
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid authored and jonathanolson committed Dec 31, 2019
1 parent 595cb80 commit 3955c96
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions eslint/rules/bad-sim-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', '(' ] },

Expand Down Expand Up @@ -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\(/
// }
];

Expand Down
2 changes: 1 addition & 1 deletion eslint/rules/no-math-sign.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
} );
}
}
Expand Down
2 changes: 1 addition & 1 deletion js/common/extractDocumentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down

0 comments on commit 3955c96

Please sign in to comment.