File tree Expand file tree Collapse file tree 5 files changed +36
-7
lines changed Expand file tree Collapse file tree 5 files changed +36
-7
lines changed Original file line number Diff line number Diff line change
1
+ <a name =" 2.13.5 " ></a >
2
+ ## [ 2.13.5] ( https://github.com/jshint/jshint/compare/2.13.4...v2.13.5 ) (2022-07-08)
3
+
4
+ ### Bug Fixes
5
+
6
+ * Tolerate late definition of async function (#3618 ) ([ 5c256a2] ( https://github.com/jshint/jshint/commit/5c256a2 ) )
7
+
1
8
<a name =" 2.13.4 " ></a >
2
9
## [ 2.13.4] ( https://github.com/jshint/jshint/compare/2.13.3...v2.13.4 ) (2022-01-24)
3
10
Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env rhino
2
2
var window = {};
3
- /*! 2.13.4 */
3
+ /*! 2.13.5 */
4
4
var JSHINT;
5
5
if (typeof window === 'undefined') window = {};
6
6
(function () {
@@ -27220,8 +27220,9 @@ var JSHINT = (function() {
27220
27220
if (t.reach) {
27221
27221
return;
27222
27222
}
27223
+
27223
27224
if (t.id !== "(endline)") {
27224
- if (t.id === "function" ) {
27225
+ if (isFunction(t, i) ) {
27225
27226
if (state.option.latedef === true) {
27226
27227
warning("W026", t);
27227
27228
}
@@ -27232,6 +27233,16 @@ var JSHINT = (function() {
27232
27233
break;
27233
27234
}
27234
27235
}
27236
+
27237
+ function isFunction(t, i) {
27238
+ if (t.id === "function") {
27239
+ return true;
27240
+ }
27241
+ if (t.id === "async") {
27242
+ t = peek(i);
27243
+ return t.id === "function";
27244
+ }
27245
+ }
27235
27246
}
27236
27247
27237
27248
/**
Original file line number Diff line number Diff line change 1
- /*! 2.13.4 */
1
+ /*! 2.13.5 */
2
2
var JSHINT;
3
3
if (typeof window === 'undefined') window = {};
4
4
(function () {
@@ -27218,8 +27218,9 @@ var JSHINT = (function() {
27218
27218
if (t.reach) {
27219
27219
return;
27220
27220
}
27221
+
27221
27222
if (t.id !== "(endline)") {
27222
- if (t.id === "function" ) {
27223
+ if (isFunction(t, i) ) {
27223
27224
if (state.option.latedef === true) {
27224
27225
warning("W026", t);
27225
27226
}
@@ -27230,6 +27231,16 @@ var JSHINT = (function() {
27230
27231
break;
27231
27232
}
27232
27233
}
27234
+
27235
+ function isFunction(t, i) {
27236
+ if (t.id === "function") {
27237
+ return true;
27238
+ }
27239
+ if (t.id === "async") {
27240
+ t = peek(i);
27241
+ return t.id === "function";
27242
+ }
27243
+ }
27233
27244
}
27234
27245
27235
27246
/**
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " jshint" ,
3
- "version" : " 2.13.4 " ,
3
+ "version" : " 2.13.5 " ,
4
4
"homepage" : " http://jshint.com/" ,
5
5
"description" : " Static analysis tool for JavaScript" ,
6
6
"author" : {
You can’t perform that action at this time.
0 commit comments