Skip to content

Commit

Permalink
Add refs.* to valid event handler callees warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisermann committed Jun 6, 2018
1 parent 7032ec7 commit 19d541a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/validate/html/validateEventHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function validateEventHandlerCallee(
return;
}

const validCallees = ['this.*', 'event.*', 'options.*', 'console.*'].concat(
const validCallees = ['this.*', 'refs.*', 'event.*', 'options.*', 'console.*'].concat(
Array.from(validBuiltins),
Array.from(validator.methods.keys())
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[{
"code": "invalid-callee",
"message": "'foo' is an invalid callee (should be one of this.*, event.*, options.*, console.*, set, fire, destroy or bar). 'foo' exists on 'helpers', did you put it in the wrong place?",
"message": "'foo' is an invalid callee (should be one of this.*, refs.*, event.*, options.*, console.*, set, fire, destroy or bar). 'foo' exists on 'helpers', did you put it in the wrong place?",
"pos": 18,
"start": {
"line": 1,
Expand Down
2 changes: 1 addition & 1 deletion test/validator/samples/method-nonexistent/warnings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[{
"code": "invalid-callee",
"message": "'foo' is an invalid callee (should be one of this.*, event.*, options.*, console.*, set, fire, destroy or bar)",
"message": "'foo' is an invalid callee (should be one of this.*, refs.*, event.*, options.*, console.*, set, fire, destroy or bar)",
"pos": 18,
"start": {
"line": 1,
Expand Down
2 changes: 1 addition & 1 deletion test/validator/samples/window-event-invalid/warnings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[{
"code": "invalid-callee",
"message": "'resize' is an invalid callee (should be one of this.*, event.*, options.*, console.*, set, fire or destroy)",
"message": "'resize' is an invalid callee (should be one of this.*, refs.*, event.*, options.*, console.*, set, fire or destroy)",
"start": {
"line": 1,
"column": 26,
Expand Down

0 comments on commit 19d541a

Please sign in to comment.