Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 95a6036

Browse files
committed
v2.13.5
1 parent d9583d5 commit 95a6036

File tree

5 files changed

+36
-7
lines changed

5 files changed

+36
-7
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
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+
18
<a name="2.13.4"></a>
29
## [2.13.4](https://github.com/jshint/jshint/compare/2.13.3...v2.13.4) (2022-01-24)
310

dist/jshint-rhino.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env rhino
22
var window = {};
3-
/*! 2.13.4 */
3+
/*! 2.13.5 */
44
var JSHINT;
55
if (typeof window === 'undefined') window = {};
66
(function () {
@@ -27220,8 +27220,9 @@ var JSHINT = (function() {
2722027220
if (t.reach) {
2722127221
return;
2722227222
}
27223+
2722327224
if (t.id !== "(endline)") {
27224-
if (t.id === "function") {
27225+
if (isFunction(t, i)) {
2722527226
if (state.option.latedef === true) {
2722627227
warning("W026", t);
2722727228
}
@@ -27232,6 +27233,16 @@ var JSHINT = (function() {
2723227233
break;
2723327234
}
2723427235
}
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+
}
2723527246
}
2723627247

2723727248
/**

dist/jshint.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! 2.13.4 */
1+
/*! 2.13.5 */
22
var JSHINT;
33
if (typeof window === 'undefined') window = {};
44
(function () {
@@ -27218,8 +27218,9 @@ var JSHINT = (function() {
2721827218
if (t.reach) {
2721927219
return;
2722027220
}
27221+
2722127222
if (t.id !== "(endline)") {
27222-
if (t.id === "function") {
27223+
if (isFunction(t, i)) {
2722327224
if (state.option.latedef === true) {
2722427225
warning("W026", t);
2722527226
}
@@ -27230,6 +27231,16 @@ var JSHINT = (function() {
2723027231
break;
2723127232
}
2723227233
}
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+
}
2723327244
}
2723427245

2723527246
/**

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jshint",
3-
"version": "2.13.4",
3+
"version": "2.13.5",
44
"homepage": "http://jshint.com/",
55
"description": "Static analysis tool for JavaScript",
66
"author": {

0 commit comments

Comments
 (0)