From 1e6e531b35ab3759da04ed5e42f04a2180b0e589 Mon Sep 17 00:00:00 2001 From: zepumph Date: Fri, 4 Mar 2022 12:44:09 -0700 Subject: [PATCH] update options and import support, https://github.com/phetsims/ratio-and-proportion/issues/432 --- eslint/rules/bad-sim-text.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/eslint/rules/bad-sim-text.js b/eslint/rules/bad-sim-text.js index f0d0d2168..c94bd001f 100644 --- a/eslint/rules/bad-sim-text.js +++ b/eslint/rules/bad-sim-text.js @@ -71,10 +71,17 @@ module.exports = function( context ) { // Decided on during developer meeting, in regards to https://github.com/phetsims/scenery/issues/1324, use `{ Type }` // import syntax from SCENERY/imports.js { - id: 'import from scenery not from imports.js', + id: 'should import from SCENERY/imports.js instead of directly', regex: /import.*from.*\/scenery\/(?!js\/imports.js)/ }, + // Decided on during developer meeting, in regards to https://github.com/phetsims/scenery/issues/1324, use `{ Type }` + // import syntax from KITE/imports.js + { + id: 'should import from KITE/imports.js instead of directly', + regex: /import.*from.*\/kite\/(?!js\/imports.js)/ + }, + // 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.