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 zepumph committed Oct 22, 2024
1 parent d1b70b5 commit 6b51e38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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

0 comments on commit 6b51e38

Please sign in to comment.