@jslint-org/jslint 2024.11.24 → 2025.10.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,11 +2,24 @@
2
2
 
3
3
  # Todo
4
4
  - doc - document supported/unsupported es6+ features
5
- - coverage - add macros `/*coverage-disable*/` and `/*coverage-enable*/`.
6
5
  - jslint - add html and css linting back into jslint.
7
6
  - jslint - add new warning requiring paren around plus-separated concatenations.
8
7
  - jslint - try to improve parser to be able to parse jquery.js without stopping.
9
8
 
9
+ # v2025.10.31
10
+ - coverage - Add coverage-directives '/*coverage-disable*/', '/*coverage-enable*/'. '//coverage-ignore-line'.
11
+
12
+ # v2025.3.31
13
+ - ci - Upgrade nodejs used in ci to v22.
14
+ - ubuntu-ci - bugfix - Fix out-of-date apt-list when installing graphicsmagick.
15
+ - jslint - Cleanup ci-shell-function shRollupFetch().
16
+ - jslint - Update ci-shell-function shDirHttplinkValidate() with pragma <\!!--novalidate--\>.
17
+ - ci - Upgrade python used in ci to v3.12.
18
+ - ci - Auto-create asset_image_logo_256.png from asset_image_logo_256.html.
19
+ - ci - Fix shell-function shRollupFetch() from making excessive github-api-request.
20
+ - ci - Fix improperly-cropped jslint-logo, auto-generated by headless-chrome.
21
+ - ci - Fix failed-ci from missing graphicsmagick library in latest Ubuntu image.
22
+
10
23
  # v2024.11.24
11
24
  - jslint - bugfix - Fix optional dynamic-property/function-call not recognized.
12
25
  - quickstart - bugfix - Fix broken quickstart-jslint-in-codemirror demo.
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
- # [<img align="left" height="80" src="asset_image_logo_512.svg"/>](https://github.com/jslint-org/jslint) JSLint, The JavaScript Code Quality and Coverage Tool
1
+ # [<img align="left" height="80" src="asset_image_logo_256.svg"/>](https://github.com/jslint-org/jslint) JSLint, The JavaScript Code Quality and Coverage Tool
2
2
  Douglas Crockford <douglas@crockford.com>
3
3
 
4
4
 
5
5
  # Status
6
- | Branch | [master<br>(v2024.11.24)](https://github.com/jslint-org/jslint/tree/master) | [beta<br>(Web Demo)](https://github.com/jslint-org/jslint/tree/beta) | [alpha<br>(Development)](https://github.com/jslint-org/jslint/tree/alpha) |
6
+ | Branch | [master<br>(v2025.10.31)](https://github.com/jslint-org/jslint/tree/master) | [beta<br>(Web Demo)](https://github.com/jslint-org/jslint/tree/beta) | [alpha<br>(Development)](https://github.com/jslint-org/jslint/tree/alpha) |
7
7
  |--:|:--:|:--:|:--:|
8
8
  | CI | [![ci](https://github.com/jslint-org/jslint/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/jslint-org/jslint/actions?query=branch%3Amaster) | [![ci](https://github.com/jslint-org/jslint/actions/workflows/ci.yml/badge.svg?branch=beta)](https://github.com/jslint-org/jslint/actions?query=branch%3Abeta) | [![ci](https://github.com/jslint-org/jslint/actions/workflows/ci.yml/badge.svg?branch=alpha)](https://github.com/jslint-org/jslint/actions?query=branch%3Aalpha) |
9
9
  | Coverage | [![coverage](https://jslint-org.github.io/jslint/branch-master/.artifact/coverage/coverage_badge.svg)](https://jslint-org.github.io/jslint/branch-master/.artifact/coverage/index.html) | [![coverage](https://jslint-org.github.io/jslint/branch-beta/.artifact/coverage/coverage_badge.svg)](https://jslint-org.github.io/jslint/branch-beta/.artifact/coverage/index.html) | [![coverage](https://jslint-org.github.io/jslint/branch-alpha/.artifact/coverage/coverage_badge.svg)](https://jslint-org.github.io/jslint/branch-alpha/.artifact/coverage/index.html) |
10
- | Demo | [<img src="asset_image_logo_512.svg" height="32">](https://jslint-org.github.io/jslint/branch-master/index.html) | [<img src="asset_image_logo_512.svg" height="32">](https://jslint-org.github.io/jslint/branch-beta/index.html) | [<img src="asset_image_logo_512.svg" height="32">](https://jslint-org.github.io/jslint/branch-alpha/index.html) |
10
+ | Demo | [<img src="asset_image_logo_256.svg" height="32">](https://jslint-org.github.io/jslint/branch-master/index.html) | [<img src="asset_image_logo_256.svg" height="32">](https://jslint-org.github.io/jslint/branch-beta/index.html) | [<img src="asset_image_logo_256.svg" height="32">](https://jslint-org.github.io/jslint/branch-alpha/index.html) |
11
11
  | Artifacts | [<img src="asset_image_folder_open_solid.svg" height="30">](https://github.com/jslint-org/jslint/tree/gh-pages/branch-master/.artifact) | [<img src="asset_image_folder_open_solid.svg" height="30">](https://github.com/jslint-org/jslint/tree/gh-pages/branch-beta/.artifact) | [<img src="asset_image_folder_open_solid.svg" height="30">](https://github.com/jslint-org/jslint/tree/gh-pages/branch-alpha/.artifact) |
12
12
 
13
13
 
@@ -66,6 +66,8 @@ Douglas Crockford <douglas@crockford.com>
66
66
  - [Directive `/*property*/`](#directive-property)
67
67
  - [Directive `/*jslint-disable*/.../*jslint-enable*/`](#directive-jslint-disablejslint-enable)
68
68
  - [Directive `//jslint-ignore-line`](#directive-jslint-ignore-line)
69
+ - [Directive `/*coverage-disable*/.../*coverage-enable*/`](#directive-coverage-disablecoverage-enable)
70
+ - [Directive `//coverage-ignore-line`](#directive-coverage-ignore-line)
69
71
 
70
72
  10. [Package Listing](#package-listing)
71
73
 
@@ -891,6 +893,34 @@ eval("1"); //jslint-ignore-line
891
893
  ```
892
894
 
893
895
 
896
+ <br><br>
897
+ ### Directive `/*coverage-disable*/.../*coverage-enable*/`
898
+
899
+ ```js
900
+ /*coverage-disable*/
901
+
902
+ // JSLint will ignore code-coverage in this region.
903
+
904
+ if (false) {
905
+ console.log("hello world");
906
+ }
907
+
908
+ /*coverage-enable*/
909
+ ```
910
+
911
+
912
+ <br><br>
913
+ ### Directive `//coverage-ignore-line`
914
+
915
+ ```js
916
+ // JSLint will ignore code-coverage at given line.
917
+
918
+ if (false) {
919
+ console.log("hello world"); //coverage-ignore-line
920
+ }
921
+ ```
922
+
923
+
894
924
  <br><br>
895
925
  # Package Listing
896
926
  ![screenshot_package_listing.svg](https://jslint-org.github.io/jslint/branch-beta/.artifact/screenshot_package_listing.svg)
@@ -923,7 +953,7 @@ eval("1"); //jslint-ignore-line
923
953
  - `git push upstream alpha -f`
924
954
  - verify ci-success for upstream-branch-alpha
925
955
  - https://github.com/jslint-org/jslint/actions
926
- - goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:branch-p2024.11.24
956
+ - goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:branch-p2025.10.28
927
957
  - click `Create pull request`
928
958
  - input `Add your description here...` with:
929
959
  ```
@@ -963,7 +993,7 @@ This PR will additionally:
963
993
  - `git push upstream alpha -f`
964
994
  - verify ci-success for upstream-branch-alpha
965
995
  - https://github.com/jslint-org/jslint/actions
966
- - goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:branch-v2024.11.24
996
+ - goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:branch-v2025.10.31
967
997
  - click `Create pull request`
968
998
  - input `Add a title` with: `# v20yy.mm.dd`
969
999
  - input `Add a description` with:
@@ -3,13 +3,17 @@
3
3
  <head>
4
4
  <title>logo</title>
5
5
  <style>
6
- /* sh jslint_ci.sh shBrowserScreenshot asset_image_logo_512.html --window-size=512x512 */
6
+ /* sh jslint_ci.sh shBrowserScreenshot asset_image_logo_256.html --window-size=256x256 */
7
7
  /* csslint box-model:false */
8
8
  /* csslint ignore:start */
9
9
  *,
10
10
  *:after,
11
11
  *:before {
12
+ background: rgba(0, 0, 0, 0);
13
+ border: 0;
12
14
  box-sizing: border-box;
15
+ margin: 0;
16
+ padding: 0;
13
17
  }
14
18
  @font-face {
15
19
  font-family: Daley;
@@ -155,45 +159,35 @@ pyNj+JctcQLXenBOCms46aMkenIx45WpXqxxVJQLz/vgpmAVa0fmDv6Pue9xVTBPfVxCUGfj\
155
159
  ") format("woff2");
156
160
  }
157
161
  /* csslint ignore:end */
158
- body,
159
- div {
160
- margin: 0;
161
- }
162
162
  .container1 {
163
163
  background: antiquewhite;
164
- border: 24px solid darkslategray;
165
- border-radius: 96px;
164
+ border: 16px solid darkslategray;
165
+ border-radius: 48px;
166
166
  color: darkslategray;
167
167
  font-family: Daley;
168
- height: 512px;
169
- margin: 0;
168
+ height: 256px;
170
169
  position: relative;
171
- width: 512px;
170
+ width: 256px;
172
171
  zoom: 100%;
173
- /*
174
- background: transparent;
175
- border: 24px solid black;
176
- color: black;
177
- */
178
172
  }
179
173
  .text1 {
180
- font-size: 256px;
181
- left: 44px;
174
+ font-size: 112px;
175
+ left: 36px;
182
176
  position: absolute;
183
- top: 32px;
177
+ top: 12px;
184
178
  }
185
179
  .text2 {
186
180
  bottom: 8px;
187
- font-size: 192px;
188
- left: 44px;
181
+ font-size: 96px;
182
+ left: 18px;
189
183
  position: absolute;
190
184
  }
191
185
  </style>
192
186
  </head>
193
187
  <body>
194
188
  <div class="container1">
195
- <div class="text1">JS</div>
196
- <div class="text2">Lint</div>
189
+ <div class="text1">JS</div>
190
+ <div class="text2">Lint</div>
197
191
  </div>
198
192
  </body>
199
193
  </html>
Binary file
@@ -0,0 +1,35 @@
1
+ <?xml version="1.0" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
+ <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
+ width="256.000000pt" height="256.000000pt" viewBox="0 0 256.000000 256.000000"
6
+ preserveAspectRatio="xMidYMid meet">
7
+
8
+ <rect height="256" fill="antiquewhite" rx="48" ry="48" width="256"></rect>
9
+ <g transform="translate(0.000000,256.000000) scale(0.100000,-0.100000)"
10
+ fill="darkslategray" stroke="none">
11
+ <path d="M374 2545 c-175 -38 -317 -179 -359 -356 -12 -54 -15 -190 -15 -909
12
+ 0 -918 0 -911 56 -1022 61 -120 207 -226 340 -248 78 -13 1690 -13 1768 0 191
13
+ 31 355 196 385 390 7 41 11 369 11 890 0 908 0 906 -61 1021 -38 70 -128 158
14
+ -201 195 -105 53 -115 54 -1023 53 -659 0 -853 -3 -901 -14z m1821 -166 c68
15
+ -25 147 -99 178 -166 l22 -48 0 -885 0 -885 -22 -47 c-26 -57 -95 -128 -155
16
+ -160 l-43 -23 -895 0 -895 0 -43 23 c-60 32 -129 103 -155 160 l-22 47 0 885
17
+ 0 885 22 48 c30 65 110 141 175 166 52 19 75 20 915 20 849 1 863 1 918 -20z"/>
18
+ <path d="M990 1815 l0 -375 -95 0 -95 0 0 140 0 140 -95 0 -95 0 0 -116 0
19
+ -116 67 -69 66 -69 146 0 147 0 67 68 67 68 0 352 0 352 -90 0 -90 0 0 -375z"/>
20
+ <path d="M1427 2122 l-67 -68 0 -94 0 -95 140 -140 140 -140 0 -72 0 -73 -45
21
+ 0 c-34 0 -68 12 -135 45 -49 25 -92 45 -95 45 -3 0 -5 -10 -5 -23 0 -15 24
22
+ -46 68 -90 l68 -67 100 0 100 0 67 68 67 68 0 94 0 95 -140 140 -140 140 0 72
23
+ 0 73 45 0 c34 0 68 -12 135 -45 49 -25 92 -45 95 -45 3 0 5 10 5 23 0 15 -24
24
+ 46 -68 90 l-68 67 -100 0 -100 0 -67 -68z"/>
25
+ <path d="M420 760 l0 -360 200 0 200 0 0 40 0 40 -120 0 -120 0 0 320 0 320
26
+ -80 0 -80 0 0 -360z"/>
27
+ <path d="M980 1080 l0 -40 80 0 80 0 0 40 0 40 -80 0 -80 0 0 -40z"/>
28
+ <path d="M1940 1040 l0 -80 -40 0 -40 0 0 -40 0 -40 40 0 40 0 0 -182 0 -182
29
+ 57 -58 57 -58 63 0 63 0 0 40 0 40 -40 0 -40 0 0 200 0 200 40 0 40 0 0 40 0
30
+ 40 -40 0 -40 0 0 80 0 80 -80 0 -80 0 0 -80z"/>
31
+ <path d="M980 680 l0 -280 80 0 80 0 0 280 0 280 -80 0 -80 0 0 -280z"/>
32
+ <path d="M1300 680 l0 -280 80 0 80 0 0 240 0 240 80 0 80 0 0 -240 0 -240 80
33
+ 0 80 0 0 223 0 223 -58 57 -58 57 -182 0 -182 0 0 -280z"/>
34
+ </g>
35
+ </svg>
package/jslint.mjs CHANGED
@@ -106,9 +106,9 @@
106
106
  formatted_message, free, freeze, from, froms, fsWriteFileWithParents,
107
107
  fud_stmt, functionName, function_list, function_stack, functions, get,
108
108
  getset, github_repo, globExclude, global, global_dict, global_list,
109
- holeList, htmlEscape, id, identifier, import, import_list, import_meta_url,
110
- inc, includeList, indent2, index, indexOf, init, initial, isArray,
111
- isBlockCoverage, isHole, isNaN, is_equal, is_weird, join, jslint,
109
+ holeList, htmlEscape, id, identifier, ignoreLine, import, import_list,
110
+ import_meta_url, inc, includeList, indent2, index, indexOf, init, initial,
111
+ isArray, isBlockCoverage, isHole, isNaN, is_equal, is_weird, join, jslint,
112
112
  jslint_apidoc, jslint_assert, jslint_charset_ascii, jslint_cli,
113
113
  jslint_edition, jslint_phase1_split, jslint_phase2_lex, jslint_phase3_parse,
114
114
  jslint_phase4_walk, jslint_phase5_whitage, jslint_report, json,
@@ -163,7 +163,7 @@ let jslint_charset_ascii = (
163
163
  + "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
164
164
  + "`abcdefghijklmnopqrstuvwxyz{|}~\u007f"
165
165
  );
166
- let jslint_edition = "v2024.11.24";
166
+ let jslint_edition = "v2025.10.31";
167
167
  let jslint_export; // The jslint object to be exported.
168
168
  let jslint_fudge = 1; // Fudge starting line and starting
169
169
  // ... column to 1.
@@ -10882,12 +10882,15 @@ body {
10882
10882
  background: #9d9;
10883
10883
  }
10884
10884
  .coverage .count {
10885
- color: #666;
10885
+ color: #333;
10886
10886
  }
10887
10887
  .coverage .coverageIgnore {
10888
10888
  background: #ccc;
10889
10889
  }
10890
10890
  .coverage .coverageLow,
10891
+ .coverage .ignore {
10892
+ background: #ccc;
10893
+ }
10891
10894
  .coverage .uncovered {
10892
10895
  background: #ebb;
10893
10896
  }
@@ -10911,6 +10914,10 @@ body {
10911
10914
  .coverage tr:hover td {
10912
10915
  background: #7d7;
10913
10916
  }
10917
+ .coverage pre:hover span.ignore,
10918
+ .coverage tr:hover td.coverageIgnore {
10919
+ background: #ccc;
10920
+ }
10914
10921
  .coverage pre:hover span.uncovered,
10915
10922
  .coverage tr:hover td.coverageLow {
10916
10923
  background: #f99;
@@ -11112,6 +11119,7 @@ body {
11112
11119
  lineList.forEach(function ({
11113
11120
  count,
11114
11121
  holeList,
11122
+ ignoreLine,
11115
11123
  line,
11116
11124
  startOffset
11117
11125
  }, ii) {
@@ -11159,7 +11167,11 @@ body {
11159
11167
  // true.
11160
11168
 
11161
11169
  if (isHole) {
11162
- lineHtml += " class=\"uncovered\"";
11170
+ lineHtml += (
11171
+ ignoreLine
11172
+ ? " class=\"ignore\""
11173
+ : " class=\"uncovered\""
11174
+ );
11163
11175
  }
11164
11176
  lineHtml += ">";
11165
11177
  chunk = "";
@@ -11179,7 +11191,9 @@ body {
11179
11191
  </span>
11180
11192
  <span class="count
11181
11193
  ${(
11182
- count <= 0
11194
+ (count <= 0 && ignoreLine)
11195
+ ? "ignore"
11196
+ : count <= 0
11183
11197
  ? "uncovered"
11184
11198
  : ""
11185
11199
  )}"
@@ -11416,6 +11430,7 @@ function sentinel() {}
11416
11430
  functions,
11417
11431
  url: pathname
11418
11432
  }) {
11433
+ let ignoreBlock = false;
11419
11434
  let lineList;
11420
11435
  let linesCovered;
11421
11436
  let linesTotal;
@@ -11425,14 +11440,23 @@ function sentinel() {}
11425
11440
  source.replace((
11426
11441
  /^.*$/gm
11427
11442
  ), function (line, startOffset) {
11443
+ if (line === "/*coverage-disable*/") {
11444
+ ignoreBlock = true;
11445
+ }
11428
11446
  lineList[lineList.length - 1].endOffset = startOffset - 1;
11429
11447
  lineList.push({
11430
11448
  count: -1,
11431
11449
  endOffset: 0,
11432
11450
  holeList: [],
11451
+ ignoreLine: (
11452
+ ignoreBlock || line.endsWith("//coverage-ignore-line")
11453
+ ),
11433
11454
  line,
11434
11455
  startOffset
11435
11456
  });
11457
+ if (line === "/*coverage-enable*/") {
11458
+ ignoreBlock = false;
11459
+ }
11436
11460
  return "";
11437
11461
  });
11438
11462
  lineList.shift();
@@ -11485,11 +11509,13 @@ function sentinel() {}
11485
11509
  });
11486
11510
  });
11487
11511
  linesTotal = lineList.length;
11488
- linesCovered = lineList.filter(function ({
11489
- count
11512
+ linesCovered = 0;
11513
+ lineList.forEach(function ({
11514
+ count,
11515
+ ignoreLine
11490
11516
  }) {
11491
- return count > 0;
11492
- }).length;
11517
+ linesCovered += count > 0 || ignoreLine;
11518
+ });
11493
11519
  await moduleFs.promises.mkdir((
11494
11520
  modulePath.dirname(coverageDir + pathname)
11495
11521
  ), {
package/package.json CHANGED
@@ -35,5 +35,5 @@
35
35
  "shCiArtifactUpload": 1,
36
36
  "shCiPublishNpm": 1,
37
37
  "type": "module",
38
- "version": "2024.11.24"
38
+ "version": "2025.10.31"
39
39
  }
Binary file
@@ -1,39 +0,0 @@
1
- <?xml version="1.0" standalone="no"?>
2
- <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
3
- "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
4
- <svg version="1.0" xmlns="http://www.w3.org/2000/svg"
5
- width="512.000000pt" height="512.000000pt" viewBox="0 0 512.000000 512.000000"
6
- preserveAspectRatio="xMidYMid meet">
7
-
8
- <rect height="512" fill="antiquewhite" rx="96" ry="96" width="512"></rect>
9
- <g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"
10
- fill="darkslategray" stroke="none">
11
- <path d="M795 5104 c-196 -35 -360 -119 -503 -258 -127 -123 -213 -271 -264
12
- -456 l-23 -85 0 -1745 0 -1745 22 -84 c95 -353 348 -606 703 -703 l85 -23
13
- 1745 0 1745 0 85 23 c352 96 608 352 702 702 l23 85 0 1745 c0 1938 5 1781
14
- -66 1959 -103 259 -338 475 -609 560 -133 41 -133 41 -1889 40 -1406 -1 -1689
15
- -3 -1756 -15z m3513 -240 c44 -9 117 -35 172 -61 80 -39 108 -59 186 -137 78
16
- -78 98 -106 137 -186 83 -172 78 -37 75 -1955 -4 -1903 3 -1728 -78 -1891 -68
17
- -140 -220 -281 -365 -341 -131 -55 -66 -53 -1875 -53 -1809 0 -1744 -2 -1875
18
- 53 -145 60 -297 201 -365 341 -81 163 -74 -12 -78 1891 -3 1919 -8 1785 75
19
- 1955 39 80 60 109 137 186 78 78 106 98 186 137 167 81 33 75 1913 76 1483 1
20
- 1687 -1 1755 -15z"/>
21
- <path d="M1748 3498 l-3 -853 -212 -3 -213 -2 0 320 0 320 -215 0 -215 0 0
22
- -273 0 -272 153 -153 152 -152 340 0 340 0 148 148 147 147 0 813 0 812 -210
23
- 0 -210 0 -2 -852z"/>
24
- <path d="M2752 4197 l-152 -152 0 -220 0 -220 320 -320 320 -320 0 -162 0
25
- -163 -100 0 -100 0 -210 105 c-115 58 -214 105 -220 105 -6 0 -10 -26 -10 -58
26
- l0 -57 153 -153 152 -152 230 0 230 0 153 153 152 152 0 220 0 220 -320 320
27
- -320 320 0 162 0 163 105 0 105 0 210 -105 c115 -58 212 -105 215 -105 3 0 5
28
- 26 5 58 l0 57 -153 153 -152 152 -230 0 -230 0 -153 -153z"/>
29
- <path d="M840 1360 l0 -720 400 0 400 0 0 80 0 80 -240 0 -240 0 0 640 0 640
30
- -160 0 -160 0 0 -720z"/>
31
- <path d="M1960 2000 l0 -80 160 0 160 0 0 80 0 80 -160 0 -160 0 0 -80z"/>
32
- <path d="M3880 1920 l0 -160 -80 0 -80 0 0 -80 0 -80 80 0 80 0 0 -368 0 -367
33
- 113 -113 112 -112 128 0 127 0 0 80 0 80 -80 0 -80 0 0 400 0 400 80 0 80 0 0
34
- 80 0 80 -80 0 -80 0 0 160 0 160 -160 0 -160 0 0 -160z"/>
35
- <path d="M1960 1200 l0 -560 160 0 160 0 0 560 0 560 -160 0 -160 0 0 -560z"/>
36
- <path d="M2600 1200 l0 -560 160 0 160 0 0 480 0 480 160 0 160 0 0 -480 0
37
- -480 160 0 160 0 0 448 0 447 -113 113 -112 112 -368 0 -367 0 0 -560z"/>
38
- </g>
39
- </svg>