@jslint-org/jslint 2023.1.29 → 2023.4.29
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 +15 -0
- package/README.md +1 -1
- package/asset_image_jslint_wrapper_vscode.png +0 -0
- package/jslint.mjs +24 -17
- package/jslint_wrapper_vscode.js +23 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,21 @@
|
|
|
9
9
|
- jslint - try to improve parser to be able to parse jquery.js without stopping.
|
|
10
10
|
- jslint - unify analysis of variable-assignment/function-parameters into one function
|
|
11
11
|
|
|
12
|
+
# v2023.4.29
|
|
13
|
+
- vscode - Add manual lint-on-save command to vscode-jslint extension.
|
|
14
|
+
- ci - add custom-shell-ci hooks to script jslint_ci.sh:
|
|
15
|
+
shCiArtifactUploadCustom()
|
|
16
|
+
shCiBaseCustom()
|
|
17
|
+
shCiBaseCustom2()
|
|
18
|
+
shCiLintCustom()
|
|
19
|
+
shCiLintCustom2()
|
|
20
|
+
shCiNpmPublishCustom()
|
|
21
|
+
shCiPreCustom()
|
|
22
|
+
shCiPreCustom2()
|
|
23
|
+
- ci - housekeeping of ci-file jslint_ci.sh
|
|
24
|
+
- ci - update shell-function shGitCommitPushOrSquash() to be able to save to specified filename
|
|
25
|
+
- ci - remove little-used shell-function shCiBranchPromote()
|
|
26
|
+
|
|
12
27
|
# v2023.1.29
|
|
13
28
|
- ci - in windows-ci-env, alias node=node.exe instead of using winpty for pipes
|
|
14
29
|
- ci - bugfix - fix ci-shell-function shGithubFileUpload unable to upload new asset
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ Douglas Crockford <douglas@crockford.com>
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
# Status
|
|
6
|
-
| Branch | [master<br>(v2023.
|
|
6
|
+
| Branch | [master<br>(v2023.4.29)](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) |
|
|
Binary file
|
package/jslint.mjs
CHANGED
|
@@ -165,7 +165,7 @@ let jslint_charset_ascii = (
|
|
|
165
165
|
+ "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
|
|
166
166
|
+ "`abcdefghijklmnopqrstuvwxyz{|}~\u007f"
|
|
167
167
|
);
|
|
168
|
-
let jslint_edition = "v2023.
|
|
168
|
+
let jslint_edition = "v2023.4.29";
|
|
169
169
|
let jslint_export; // The jslint object to be exported.
|
|
170
170
|
let jslint_fudge = 1; // Fudge starting line and starting
|
|
171
171
|
// ... column to 1.
|
|
@@ -11231,35 +11231,41 @@ function sentinel() {}
|
|
|
11231
11231
|
if ((
|
|
11232
11232
|
/^coverage-\d+?-\d+?-\d+?\.json$/
|
|
11233
11233
|
).test(file)) {
|
|
11234
|
-
|
|
11234
|
+
consoleError("rm file " + coverageDir + file);
|
|
11235
11235
|
await moduleFs.promises.unlink(coverageDir + file);
|
|
11236
11236
|
}
|
|
11237
11237
|
}));
|
|
11238
11238
|
exitCode = await new Promise(function (resolve) {
|
|
11239
|
-
moduleChildProcess.spawn(
|
|
11240
|
-
|
|
11239
|
+
moduleChildProcess.spawn(
|
|
11240
|
+
(
|
|
11241
|
+
processArgv[0] === "npm"
|
|
11241
11242
|
|
|
11242
11243
|
// If win32 environment, then replace program npm with npm.cmd.
|
|
11243
11244
|
// Coverage-hack - Ugly-hack to get test-coverage under both win32 and linux.
|
|
11244
11245
|
|
|
11245
|
-
|
|
11246
|
-
|
|
11247
|
-
|
|
11248
|
-
|
|
11249
|
-
|
|
11250
|
-
|
|
11251
|
-
|
|
11252
|
-
|
|
11253
|
-
|
|
11254
|
-
|
|
11255
|
-
|
|
11256
|
-
|
|
11257
|
-
|
|
11246
|
+
? process.platform.replace("win32", "npm.cmd").replace(
|
|
11247
|
+
process.platform,
|
|
11248
|
+
"npm"
|
|
11249
|
+
)
|
|
11250
|
+
: processArgv[0]
|
|
11251
|
+
),
|
|
11252
|
+
processArgv.slice(1),
|
|
11253
|
+
{
|
|
11254
|
+
env: Object.assign({}, process.env, {
|
|
11255
|
+
NODE_V8_COVERAGE: coverageDir
|
|
11256
|
+
}),
|
|
11257
|
+
stdio: ["ignore", 1, 2]
|
|
11258
|
+
}
|
|
11259
|
+
).on("exit", resolve);
|
|
11258
11260
|
});
|
|
11261
|
+
consoleError(
|
|
11262
|
+
`v8CoverageReportCreate - program exited with exitCode=${exitCode}`
|
|
11263
|
+
);
|
|
11259
11264
|
}
|
|
11260
11265
|
|
|
11261
11266
|
// 2. Merge JSON v8-coverage-files in <coverageDir>.
|
|
11262
11267
|
|
|
11268
|
+
consoleError("v8CoverageReportCreate - merging coverage files...");
|
|
11263
11269
|
v8CoverageObj = await moduleFs.promises.readdir(coverageDir);
|
|
11264
11270
|
v8CoverageObj = v8CoverageObj.filter(function (file) {
|
|
11265
11271
|
return (
|
|
@@ -11331,6 +11337,7 @@ function sentinel() {}
|
|
|
11331
11337
|
|
|
11332
11338
|
// 3. Create html-coverage-reports in <coverageDir>.
|
|
11333
11339
|
|
|
11340
|
+
consoleError("v8CoverageReportCreate - creating html-coverage-report...");
|
|
11334
11341
|
fileDict = Object.create(null);
|
|
11335
11342
|
await Promise.all(v8CoverageObj.result.map(async function ({
|
|
11336
11343
|
functions,
|
package/jslint_wrapper_vscode.js
CHANGED
|
@@ -30,11 +30,12 @@
|
|
|
30
30
|
/*property
|
|
31
31
|
Diagnostic, DiagnosticSeverity, ProgressLocation, Warning, Window, activate,
|
|
32
32
|
cancellable, character, clear, column, commands, createDiagnosticCollection,
|
|
33
|
-
document, end, endsWith, exports, getText, increment, insert,
|
|
34
|
-
jslint, languages, line, lineAt, location, map, message, module,
|
|
35
|
-
range, rangeIncludingLineBreak, readFileSync,
|
|
36
|
-
replace, report, runInNewContext, selection, set,
|
|
37
|
-
subscriptions, title, uri, warnings, window, withProgress
|
|
33
|
+
document, end, endsWith, exports, fsPath, getText, increment, insert,
|
|
34
|
+
isEmpty, jslint, languages, line, lineAt, location, map, message, module,
|
|
35
|
+
promises, push, range, rangeIncludingLineBreak, readFileSync,
|
|
36
|
+
registerTextEditorCommand, replace, report, runInNewContext, selection, set,
|
|
37
|
+
slice, start, subscriptions, title, uri, warnings, window, withProgress,
|
|
38
|
+
writeFile
|
|
38
39
|
*/
|
|
39
40
|
|
|
40
41
|
"use strict";
|
|
@@ -182,6 +183,20 @@ function activate({
|
|
|
182
183
|
});
|
|
183
184
|
}
|
|
184
185
|
|
|
186
|
+
// PR-429 - Add manual lint-on-save command.
|
|
187
|
+
|
|
188
|
+
async function jslintLintAndSave({
|
|
189
|
+
document
|
|
190
|
+
}) {
|
|
191
|
+
jslintLint({
|
|
192
|
+
document
|
|
193
|
+
});
|
|
194
|
+
await require("fs").promises.writeFile(
|
|
195
|
+
document.uri.fsPath,
|
|
196
|
+
document.getText()
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
|
|
185
200
|
// Initialize vscode and jslint.
|
|
186
201
|
|
|
187
202
|
vscode = require("vscode");
|
|
@@ -222,6 +237,9 @@ function activate({
|
|
|
222
237
|
subscriptions.push(vscode.commands.registerTextEditorCommand((
|
|
223
238
|
"jslint.lint"
|
|
224
239
|
), jslintLint));
|
|
240
|
+
subscriptions.push(vscode.commands.registerTextEditorCommand((
|
|
241
|
+
"jslint.lintAndSave"
|
|
242
|
+
), jslintLintAndSave));
|
|
225
243
|
}
|
|
226
244
|
|
|
227
245
|
exports.activate = activate;
|
package/package.json
CHANGED