Skip to content

Commit

Permalink
lint rule: prefer Pointer.isTouchLike to instanceof Touch, phetsims/s…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Feb 26, 2021
1 parent 24c2f7a commit 5909f8c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions eslint/rules/bad-sim-text.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<Parameter>', regex: /{[^\n ]*\b[A-z]+<[A-z]+>/ }

Expand Down

0 comments on commit 5909f8c

Please sign in to comment.