From 5909f8ceeb406a118c3d76075e1aab26723def69 Mon Sep 17 00:00:00 2001 From: zepumph Date: Fri, 26 Feb 2021 08:36:48 -0900 Subject: [PATCH] lint rule: prefer Pointer.isTouchLike to instanceof Touch, https://github.com/phetsims/scenery/issues/1156 --- eslint/rules/bad-sim-text.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eslint/rules/bad-sim-text.js b/eslint/rules/bad-sim-text.js index 67afe3a39..235cbb33d 100644 --- a/eslint/rules/bad-sim-text.js +++ b/eslint/rules/bad-sim-text.js @@ -44,6 +44,9 @@ module.exports = function( context ) { // Should import dotRandom instead of using the namespace 'phet.dot.dotRandom', + // Prefer using Pointer.isTouchLike() to support Pen, https://github.com/phetsims/scenery/issues/1156 + ' instanceof Touch ', + // Should have a period before "<", see https://github.com/phetsims/chipper/issues/1005 { id: 'Type', regex: /{[^\n ]*\b[A-z]+<[A-z]+>/ }