Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit11dc0a6

Browse files
jugglinmikerwaldron
authored andcommitted
[[FIX]] Allow optional chaining call as satement
Take care to only disable warning W030 for the "function call" form ofthe optional chaining feature; the warning is still relevant forproperty access.
1 parent7c890aa commit11dc0a6

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

‎src/jshint.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3075,6 +3075,7 @@ var JSHINT = (function() {
30753075
that.left=left;
30763076
advance();
30773077
that.right=state.tokens.curr.led(context,left);
3078+
that.exps=true;
30783079
}else{
30793080
state.syntax["."].led.call(that,context,left);
30803081
}

‎tests/unit/parser.js‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10547,10 +10547,6 @@ exports.optionalChaining = function (test) {
1054710547
);
1054810548

1054910549
TestRun(test,"arguments")
10550-
.addError(1,10,"Expected an assignment or function call and instead saw an expression.")
10551-
.addError(2,14,"Expected an assignment or function call and instead saw an expression.")
10552-
.addError(3,20,"Expected an assignment or function call and instead saw an expression.")
10553-
.addError(4,15,"Expected an assignment or function call and instead saw an expression.")
1055410550
.test([
1055510551
"true.x?.();",
1055610552
"true.x?.(true);",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp