Douglas Crockford douglas@crockford.com
| Branch | [master
(v2026.4.30)](https://github.com/jslint-org/jslint/tree/master) | [beta
(Web Demo)](https://github.com/jslint-org/jslint/tree/beta) | [alpha
(Development)](https://github.com/jslint-org/jslint/tree/alpha) |
|--:|:--:|:--:|:--:|
| CI | |
|
|
| Coverage |
|
|
|
| Demo |
|
|
|
| Artifacts |
|
|
|
/*jslint*//*jslint beta*//*jslint bitwise*//*jslint browser*//*jslint convert*//*jslint couch*//*jslint devel*//*jslint eval*//*jslint fart*//*jslint for*//*jslint getset*//*jslint indent2*//*jslint long*//*jslint node*//*jslint nomen*//*jslint single*//*jslint subscript*//*jslint this*//*jslint trace*//*jslint unordered*//*jslint white*//*global*//*property*//*jslint-disable*/.../*jslint-enable*///jslint-ignore-line/*coverage-disable*/.../*coverage-enable*///coverage-ignore-line#!/bin/sh
curl -L https://www.jslint.com/jslint.mjs > jslint.mjs
jslint.mjs in shell:#!/bin/sh
printf "console.log('hello world');\n" > hello.js
node jslint.mjs hello.js
jslint.mjs in ES Module environment:#!/bin/sh
node --input-type=module --eval '
/*jslint devel*/
// Import JSLint in ES Module environment.
import jslint from "./jslint.mjs";
let globals = ["caches", "indexedDb"];
let options = {browser: true};
let result;
let source = "console.log(\u0027hello world\u0027);\n";
// JSLint
and print <formatted_message>.
result = jslint.jslint(source, options, globals);
result.warnings.forEach(function ({
formatted_message
}) {
console.error(formatted_message);
});
'
jslint.mjs in CommonJS environment:#!/bin/sh
node --eval '
/*jslint devel*/
(async function () {
let globals = ["caches", "indexedDb"];
let jslint;
let options = {browser: true};
let result;
let source = "console.log(\u0027hello world\u0027);\n";
// Import JSLint in CommonJS environment.
jslint = await import("./jslint.mjs");
jslint = jslint.default;
// JSLint
and print <formatted_message>.
result = jslint.jslint(source, options, globals);
result.warnings.forEach(function ({
formatted_message
}) {
console.error(formatted_message);
});
}());
'
#!/bin/sh
# JSLint directory '.'
node jslint.mjs .
#!/bin/sh
printf "function foo() {console.log('hello world');}\n" > hello.js
# Create JSLint report from file 'hello.js' in shell.
node jslint.mjs \
jslint_report=.artifact/jslint_report_hello.html \
hello.js
#!/bin/sh
node --input-type=module --eval '
/*jslint devel*/
import jslint from "./jslint.mjs";
import fs from "fs";
(async function () {
let result;
let source = "function foo() {console.log(\u0027hello world\u0027);}\n";
// Create JSLint report from
in javascript.
result = jslint.jslint(source);
result = jslint.jslint_report(result);
result = `<body class="JSLINT_ JSLINT_REPORT_">\n${result}</body>\n`;
await fs.promises.mkdir(".artifact/", {recursive: true});
await fs.promises.writeFile(".artifact/jslint_report_hello.html", result);
console.error("wrote file .artifact/jslint_report_hello.html");
}());
'
#!/bin/sh
git clone https://github.com/tryghost/node-sqlite3 node-sqlite3-sh \
--branch=v5.0.11 \
--depth=1 \
--single-branch
cd node-sqlite3-sh
npm install
# Create V8 coverage report from program `npm run test` in shell.
node ../jslint.mjs \
v8_coverage_report=../.artifact/coverage_sqlite3_sh/ \
--exclude=tes?/ \
--exclude=tes[!0-9A-Z_a-z-]/ \
--exclude=tes[0-9A-Z_a-z-]/ \
--exclude=tes[^0-9A-Z_a-z-]/ \
--exclude=test/**/*.js \
--exclude=test/suppor*/*elper.js \
--exclude=test/suppor?/?elper.js \
--exclude=test/support/helper.js \
--include=**/*.cjs \
--include=**/*.js \
--include=**/*.mjs \
--include=li*/*.js \
--include=li?/*.js \
--include=lib/ \
--include=lib/**/*.js \
--include=lib/*.js \
--include=lib/sqlite3.js \
npm run test
```shell
git clone https://github.com/tryghost/node-sqlite3 node-sqlite3-js \ --branch=v5.0.11 \ --depth=1 \ --single-branch
cd node-sqlite3-js npm install
node --input-type=module --eval '
/jslint node/ import jslint from "../jslint.mjs"; (async function () {
// Create V8 coverage report from program npm run test in javascript.
await jslint.v8CoverageReportCreate({
coverageDir: "../.artifact/coverage_sqlite3_js/",
processArgv: [
"--exclude=tes?/",
"--exclude=tes[!0-9A-Z_a-z-]/",
"--exclude=tes[0-9A-Z_a-z-]/",
"--exclude=tes[^0-9A-Z_a-z-]/",
"--exclude=test/**/*.js",
"--exclude=test/suppor*/*elper.js",
"--exclude=test/suppor?/?elper.js",
"--exclude=te
$ claude mcp add jslint \
-- python -m otcore.mcp_server <graph>