Skip to content

Commit

Permalink
Add Scratch.translate.setup lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Nov 15, 2023
1 parent ff52617 commit f88e0a8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions extensions/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ module.exports = {
{
selector: 'Program > :not(ExpressionStatement[expression.type=CallExpression][expression.callee.type=/FunctionExpression/])',
message: 'All extension code must be within (function (Scratch) { ... })(Scratch);'
},
{
selector: 'CallExpression[callee.object.object.name=Scratch][callee.object.property.name=translate][callee.property.name=setup]',
message: 'Do not call Scratch.translate.setup() yourself. Just use Scratch.translate() and let the build script handle it.'
}
]
}
Expand Down

0 comments on commit f88e0a8

Please sign in to comment.