@jslint-org/jslint 2023.8.20 → 2024.3.26
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 +17 -0
- package/README.md +81 -64
- package/jslint.mjs +13 -7
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,23 @@
|
|
|
7
7
|
- jslint - add new warning requiring paren around plus-separated concatenations.
|
|
8
8
|
- jslint - try to improve parser to be able to parse jquery.js without stopping.
|
|
9
9
|
|
|
10
|
+
# v2024.3.26
|
|
11
|
+
- ci - Add shell-functions shGitPullrequestCleanup(), shGitPullrequest() to automatically cleanup or create-and-push github-pull-commit to origin/alpha.
|
|
12
|
+
- jslint - Allow destructuring-assignment after function-definition.
|
|
13
|
+
- ci - Replace npm-package used to auto-build vscode-plugin, vsce to @vscode/vsce.
|
|
14
|
+
- test - Update test-function jstestDescribe() to wait awhile for imports to initialize before running tests.
|
|
15
|
+
- ci - Fix tmpdir in shell-function shBrowserScreenshot().
|
|
16
|
+
- vim - Allow installing vim-plugin to any directory, instead of hardcoded to ~/.vim/.
|
|
17
|
+
- ci - Update github-ci for actions/cache, actions/setup-python from nodejs v16 to nodejs v20.
|
|
18
|
+
- ci - Update shell-function shRollupFetch() to fix blank date-committed.
|
|
19
|
+
- ci - bugfix - Fix google-chrome unable to create screenshot because user-data-dir is /dev/null.
|
|
20
|
+
|
|
21
|
+
# v2023.10.24
|
|
22
|
+
- jslint - bugfix - Update file jslint_wrapper_vim.vim to fix broken vim-link when linting shell-files.
|
|
23
|
+
- ci - add custom-shell-ci hooks to script jslint_ci.sh:
|
|
24
|
+
shCiPublishNpmCustom()
|
|
25
|
+
shCiPublishPypiCustom()
|
|
26
|
+
|
|
10
27
|
# v2023.8.20
|
|
11
28
|
- ci - Remove ci for nodejs-v19, and add ci for nodejs-v20.
|
|
12
29
|
- ci - Remove broken-links to unlicense.org, failing http-link-check.
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ Douglas Crockford <douglas@crockford.com>
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
# Status
|
|
6
|
-
| Branch | [master<br>(
|
|
6
|
+
| Branch | [master<br>(v2024.3.26)](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 | [](https://github.com/jslint-org/jslint/actions?query=branch%3Amaster) | [](https://github.com/jslint-org/jslint/actions?query=branch%3Abeta) | [](https://github.com/jslint-org/jslint/actions?query=branch%3Aalpha) |
|
|
9
9
|
| Coverage | [](https://jslint-org.github.io/jslint/branch-master/.artifact/coverage/index.html) | [](https://jslint-org.github.io/jslint/branch-beta/.artifact/coverage/index.html) | [](https://jslint-org.github.io/jslint/branch-alpha/.artifact/coverage/index.html) |
|
|
@@ -74,9 +74,9 @@ Douglas Crockford <douglas@crockford.com>
|
|
|
74
74
|
12. [License](#license)
|
|
75
75
|
|
|
76
76
|
13. [Devops Instruction](#devops-instruction)
|
|
77
|
+
- [pull-request merge](#pull-request-merge)
|
|
77
78
|
- [branch-master commit](#branch-master-commit)
|
|
78
79
|
- [branch-master publish](#branch-master-publish)
|
|
79
|
-
- [pull-request merge](#pull-request-merge)
|
|
80
80
|
- [vscode-jslint publish](#vscode-jslint-publish)
|
|
81
81
|
|
|
82
82
|
|
|
@@ -506,6 +506,9 @@ window.addEventListener("load", function () {
|
|
|
506
506
|
# Quickstart JSLint in Vim
|
|
507
507
|
1. Download and save [`jslint.mjs`](https://www.jslint.com/jslint.mjs), [`jslint_wrapper_vim.vim`](https://www.jslint.com/jslint_wrapper_vim.vim) to directory `~/.vim/`
|
|
508
508
|
2. Add vim-command `:source ~/.vim/jslint_wrapper_vim.vim` to file `~/.vimrc`
|
|
509
|
+
- If above files were saved to custom-directory, then use that directory instead, e.g.:
|
|
510
|
+
- save [`jslint.mjs`](https://www.jslint.com/jslint.mjs), [`jslint_wrapper_vim.vim`](https://www.jslint.com/jslint_wrapper_vim.vim) to directory `~/vimfiles/`
|
|
511
|
+
- vim-command `:source ~/vimfiles/jslint_wrapper_vim.vim`
|
|
509
512
|
3. Vim can now jslint files (via nodejs):
|
|
510
513
|
- with vim-command `:SaveAndJslint`
|
|
511
514
|
- with vim-key-combo `<Ctrl-S> <Ctrl-J>`
|
|
@@ -912,95 +915,109 @@ eval("1"); //jslint-ignore-line
|
|
|
912
915
|
|
|
913
916
|
|
|
914
917
|
<br><br>
|
|
915
|
-
###
|
|
916
|
-
-
|
|
917
|
-
|
|
918
|
-
-
|
|
918
|
+
### pull-request merge
|
|
919
|
+
- find highest issue-number at https://github.com/jslint-org/jslint/issues/, https://github.com/jslint-org/jslint/pulls/, and add +1 to it for PR-xxx
|
|
920
|
+
- $ `shGitPullrequest beta beta`
|
|
921
|
+
- verify ci-success for origin-branch-alpha
|
|
922
|
+
- https://github.com/kaizhu256/jslint/actions/workflows/ci.yml
|
|
919
923
|
- $ `git push upstream alpha -f`
|
|
920
|
-
- verify ci-success for upstream-branch-alpha
|
|
924
|
+
- verify ci-success for upstream-branch-alpha
|
|
921
925
|
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml
|
|
922
|
-
- goto https://github.com/
|
|
923
|
-
- click `
|
|
924
|
-
-
|
|
925
|
-
|
|
926
|
+
- goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:branch-p2024.3.21
|
|
927
|
+
- click `Create pull request`
|
|
928
|
+
- input `Add your description here...` with:
|
|
929
|
+
```
|
|
930
|
+
Fixes #xxx.
|
|
931
|
+
- <primary-commit-message>
|
|
932
|
+
|
|
933
|
+
This PR will ...
|
|
934
|
+
|
|
935
|
+
this PR will additionally:
|
|
936
|
+
- <secondary-commit-message>
|
|
937
|
+
...
|
|
938
|
+
|
|
939
|
+
<screenshot>
|
|
940
|
+
```
|
|
926
941
|
- verify `commit into jslint-org:beta`
|
|
927
942
|
- click `Create pull request`
|
|
928
|
-
- verify ci-success for pull-request
|
|
943
|
+
- verify ci-success for pull-request
|
|
929
944
|
- https://github.com/jslint-org/jslint/actions/workflows/on_pull_request.yml
|
|
945
|
+
- wait awhile before continuing ...
|
|
930
946
|
- click `Rebase and merge`
|
|
931
|
-
- verify ci-success for upstream-branch-beta
|
|
947
|
+
- verify ci-success for upstream-branch-beta
|
|
932
948
|
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
git diff alpha..upstream/beta
|
|
936
|
-
# verify no diff between alpha..upstream/beta
|
|
937
|
-
git reset upstream/beta
|
|
938
|
-
git push origin alpha -f
|
|
939
|
-
git push origin alpha:beta
|
|
940
|
-
shMyciUpdate
|
|
941
|
-
git push upstream alpha -f
|
|
942
|
-
```
|
|
943
|
-
- verify ci-success for origin-branch-alpha
|
|
949
|
+
- $ `shGitPullrequestCleanup`
|
|
950
|
+
- verify ci-success for origin-branch-alpha
|
|
944
951
|
- https://github.com/kaizhu256/jslint/actions/workflows/ci.yml
|
|
945
|
-
-
|
|
952
|
+
- $ `git push upstream alpha -f`
|
|
953
|
+
- verify ci-success for upstream-branch-alpha
|
|
946
954
|
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml
|
|
947
955
|
- click `Delete branch`
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
956
|
+
|
|
957
|
+
|
|
958
|
+
<br><br>
|
|
959
|
+
### branch-master commit
|
|
960
|
+
- $ `shGitPullrequest master beta`
|
|
961
|
+
- verify ci-success for origin-branch-alpha
|
|
962
|
+
- https://github.com/kaizhu256/jslint/actions/workflows/ci.yml
|
|
963
|
+
- $ `git push upstream alpha -f`
|
|
964
|
+
- verify ci-success for upstream-branch-alpha
|
|
965
|
+
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml
|
|
966
|
+
- goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:branch-v2024.3.26
|
|
967
|
+
- click `Create pull request`
|
|
968
|
+
- input `Add a title` with: `# v20yy.mm.dd`
|
|
969
|
+
- input `Add a description` with:
|
|
951
970
|
```
|
|
952
|
-
-
|
|
971
|
+
- <primary-commit-message>
|
|
972
|
+
- <secondary-commit-message>
|
|
973
|
+
```
|
|
974
|
+
- verify `commit into jslint-org:beta`
|
|
975
|
+
- click `Create pull request`
|
|
976
|
+
- verify ci-success for pull-request
|
|
977
|
+
- https://github.com/jslint-org/jslint/actions/workflows/on_pull_request.yml
|
|
978
|
+
- wait awhile before continuing ...
|
|
979
|
+
- click `Rebase and merge`
|
|
980
|
+
- verify ci-success for upstream-branch-beta
|
|
981
|
+
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml
|
|
982
|
+
- $ `shGitPullrequestCleanup`
|
|
983
|
+
- verify ci-success for origin-branch-alpha
|
|
984
|
+
- https://github.com/kaizhu256/jslint/actions/workflows/ci.yml
|
|
985
|
+
- $ `git push upstream alpha -f`
|
|
986
|
+
- verify ci-success for upstream-branch-alpha
|
|
987
|
+
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml
|
|
988
|
+
- click `Delete branch`
|
|
989
|
+
- $ `git push origin beta:master`
|
|
990
|
+
- verify ci-success for origin-branch-master
|
|
953
991
|
- https://github.com/kaizhu256/jslint/actions/workflows/ci.yml
|
|
954
|
-
-
|
|
992
|
+
- $ `git push upstream beta:master`
|
|
993
|
+
- verify ci-success for upstream-branch-master
|
|
955
994
|
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml
|
|
956
995
|
|
|
957
996
|
|
|
958
997
|
<br><br>
|
|
959
998
|
### branch-master publish
|
|
960
999
|
- $ `git push upstream beta:master`
|
|
961
|
-
- verify ci-success for upstream-branch-master
|
|
1000
|
+
- verify ci-success for upstream-branch-master
|
|
962
1001
|
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml
|
|
963
1002
|
- goto https://github.com/jslint-org/jslint/releases/new
|
|
964
|
-
- input tag `v20yy.mm.dd`
|
|
1003
|
+
- input `Choose a tag` with: `v20yy.mm.dd`
|
|
965
1004
|
- click `Create new tag: v20yy.mm.dd on publish`
|
|
966
1005
|
- verify correct-year `20yy`
|
|
967
|
-
-
|
|
968
|
-
-
|
|
969
|
-
-
|
|
1006
|
+
- select `Target: master`
|
|
1007
|
+
- select `Previous tag:auto`
|
|
1008
|
+
- input `Release title` with: `v20yy.mm.dd - <primary-commit-message>`
|
|
1009
|
+
- input `Describe this release` with:
|
|
1010
|
+
```
|
|
1011
|
+
- <primary-commit-message>
|
|
1012
|
+
- <secondary-commit-message>
|
|
1013
|
+
```
|
|
970
1014
|
- click `Generate release notes`
|
|
971
1015
|
- click `Set as the latest release`
|
|
972
1016
|
- click `Preview` and review
|
|
973
1017
|
- click `Publish release`
|
|
974
|
-
- verify ci-success for upstream-branch-publish
|
|
1018
|
+
- verify ci-success for upstream-branch-publish
|
|
975
1019
|
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml
|
|
976
|
-
- verify email-notification `Successfully published @jslint-org/jslint@20yy.mm.dd`
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
<br><br>
|
|
980
|
-
### pull-request merge
|
|
981
|
-
- find highest issue-number at https://github.com/jslint-org/jslint/issues/, and add +1 to it for PR-xxx
|
|
982
|
-
- verify `commit into jslint-org:beta`
|
|
983
|
-
- click `Create pull request`
|
|
984
|
-
- verify ci-success for pull-request
|
|
985
|
-
- https://github.com/jslint-org/jslint/actions/workflows/on_pull_request.yml
|
|
986
|
-
- click `Rebase and merge`
|
|
987
|
-
- verify ci-success for upstream-branch-beta
|
|
988
|
-
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml
|
|
989
|
-
```shell
|
|
990
|
-
git fetch upstream beta
|
|
991
|
-
git diff alpha..upstream/beta
|
|
992
|
-
# verify no diff between alpha..upstream/beta
|
|
993
|
-
git reset upstream/beta
|
|
994
|
-
git push origin alpha -f
|
|
995
|
-
git push origin alpha:beta
|
|
996
|
-
shMyciUpdate
|
|
997
|
-
git push upstream alpha -f
|
|
998
|
-
```
|
|
999
|
-
- verify ci-success for origin-branch-alpha
|
|
1000
|
-
- https://github.com/kaizhu256/jslint/actions/workflows/ci.yml
|
|
1001
|
-
- verify ci-success for upstream-branch-alpha
|
|
1002
|
-
- https://github.com/jslint-org/jslint/actions/workflows/ci.yml
|
|
1003
|
-
- click `Delete branch`
|
|
1020
|
+
- verify email-notification `Successfully published @jslint-org/jslint@20yy.mm.dd`
|
|
1004
1021
|
|
|
1005
1022
|
|
|
1006
1023
|
<br><br>
|
package/jslint.mjs
CHANGED
|
@@ -163,7 +163,7 @@ let jslint_charset_ascii = (
|
|
|
163
163
|
+ "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
|
|
164
164
|
+ "`abcdefghijklmnopqrstuvwxyz{|}~\u007f"
|
|
165
165
|
);
|
|
166
|
-
let jslint_edition = "
|
|
166
|
+
let jslint_edition = "v2024.3.26";
|
|
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.
|
|
@@ -279,7 +279,7 @@ async function assertErrorThrownAsync(asyncFunc, regexp) {
|
|
|
279
279
|
}
|
|
280
280
|
assertOrThrow(err, "No error thrown.");
|
|
281
281
|
assertOrThrow(
|
|
282
|
-
regexp
|
|
282
|
+
!regexp || new RegExp(regexp).test(err.message),
|
|
283
283
|
err
|
|
284
284
|
);
|
|
285
285
|
}
|
|
@@ -5487,13 +5487,15 @@ function jslint_phase3_parse(state) {
|
|
|
5487
5487
|
if (
|
|
5488
5488
|
token_nxt.id === "."
|
|
5489
5489
|
|| token_nxt.id === "?."
|
|
5490
|
-
|
|
5490
|
+
|
|
5491
|
+
// PR-459 - Allow destructuring-assignment after function-definition.
|
|
5492
|
+
|
|
5493
|
+
// || token_nxt.id === "["
|
|
5491
5494
|
) {
|
|
5492
5495
|
|
|
5493
5496
|
// test_cause:
|
|
5494
5497
|
// ["function aa(){}\n.aa", "prefix_function", "unexpected_a", ".", 1]
|
|
5495
5498
|
// ["function aa(){}\n?.aa", "prefix_function", "unexpected_a", "?.", 1]
|
|
5496
|
-
// ["function aa(){}\n[]", "prefix_function", "unexpected_a", "[", 1]
|
|
5497
5499
|
|
|
5498
5500
|
warn("unexpected_a");
|
|
5499
5501
|
}
|
|
@@ -9952,6 +9954,12 @@ async function jstestDescribe(description, testFunction) {
|
|
|
9952
9954
|
process.on("exit", jstestOnExit);
|
|
9953
9955
|
}
|
|
9954
9956
|
|
|
9957
|
+
// PR-457 - Wait awhile for imports to initialize.
|
|
9958
|
+
|
|
9959
|
+
await new Promise(function (resolve) {
|
|
9960
|
+
setTimeout(resolve);
|
|
9961
|
+
});
|
|
9962
|
+
|
|
9955
9963
|
// Init jstestItList.
|
|
9956
9964
|
|
|
9957
9965
|
jstestItList = [];
|
|
@@ -10005,9 +10013,7 @@ function jstestIt(description, testFunction, mode) {
|
|
|
10005
10013
|
} catch (errCaught) {
|
|
10006
10014
|
err = errCaught;
|
|
10007
10015
|
}
|
|
10008
|
-
resolve([
|
|
10009
|
-
err, description, mode
|
|
10010
|
-
]);
|
|
10016
|
+
resolve([err, description, mode]);
|
|
10011
10017
|
}));
|
|
10012
10018
|
}
|
|
10013
10019
|
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bin": {
|
|
3
|
-
"jslint": "
|
|
3
|
+
"jslint": "jslint.mjs"
|
|
4
4
|
},
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/jslint-org/jslint/issues"
|
|
7
7
|
},
|
|
8
|
-
"counter":
|
|
8
|
+
"counter": 0,
|
|
9
9
|
"description": "JSLint, The JavaScript Code Quality and Coverage Tool",
|
|
10
10
|
"exports": {
|
|
11
11
|
"default": "./jslint_wrapper_cjs.cjs",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"name": "@jslint-org/jslint",
|
|
27
27
|
"repository": {
|
|
28
28
|
"type": "git",
|
|
29
|
-
"url": "https://github.com/jslint-org/jslint.git"
|
|
29
|
+
"url": "git+https://github.com/jslint-org/jslint.git"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
32
|
"test": "node jslint.mjs v8_coverage_report=.artifact/coverage node test.mjs",
|
|
33
33
|
"test2": "sh jslint_ci.sh shCiBase"
|
|
34
34
|
},
|
|
35
35
|
"shCiArtifactUpload": 1,
|
|
36
|
-
"
|
|
36
|
+
"shCiPublishNpm": 1,
|
|
37
37
|
"type": "module",
|
|
38
|
-
"version": "
|
|
38
|
+
"version": "2024.3.26"
|
|
39
39
|
}
|