{"id":13483511,"url":"https://github.com/jslint-org/jslint","last_synced_at":"2025-12-17T00:06:35.583Z","repository":{"id":37001594,"uuid":"1076057","full_name":"jslint-org/jslint","owner":"jslint-org","description":"JSLint, The JavaScript Code Quality and Coverage Tool","archived":false,"fork":false,"pushed_at":"2025-04-02T16:09:39.000Z","size":42186,"stargazers_count":3633,"open_issues_count":6,"forks_count":465,"subscribers_count":152,"default_branch":"beta","last_synced_at":"2025-05-04T08:03:49.331Z","etag":null,"topics":["coverage-report","javascript","jslint","zero-config","zero-dependency"],"latest_commit_sha":null,"homepage":"https://www.jslint.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jslint-org.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2010-11-12T22:50:24.000Z","updated_at":"2025-05-03T17:21:43.000Z","dependencies_parsed_at":"2023-02-16T12:35:28.335Z","dependency_job_id":"b68a198c-881a-4995-82f0-dc26f0ddad87","html_url":"https://github.com/jslint-org/jslint","commit_stats":{"total_commits":904,"total_committers":8,"mean_commits":113.0,"dds":0.3252212389380531,"last_synced_commit":"1d1b998f9a417a2d015943ea5e32d7a194782476"},"previous_names":["douglascrockford/jslint"],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jslint-org%2Fjslint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jslint-org%2Fjslint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jslint-org%2Fjslint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jslint-org%2Fjslint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jslint-org","download_url":"https://codeload.github.com/jslint-org/jslint/tar.gz/refs/heads/beta","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990483,"owners_count":21995775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coverage-report","javascript","jslint","zero-config","zero-dependency"],"created_at":"2024-07-31T17:01:12.194Z","updated_at":"2025-12-17T00:06:35.553Z","avatar_url":"https://github.com/jslint-org.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","javascript"],"sub_categories":[],"readme":"# [\u003cimg align=\"left\" height=\"80\" src=\"asset_image_logo_256.svg\"/\u003e](https://github.com/jslint-org/jslint) JSLint, The JavaScript Code Quality and Coverage Tool\nDouglas Crockford \u003cdouglas@crockford.com\u003e\n\n\n# Status\n| Branch | [master\u003cbr\u003e(v2025.3.31)](https://github.com/jslint-org/jslint/tree/master) | [beta\u003cbr\u003e(Web Demo)](https://github.com/jslint-org/jslint/tree/beta) | [alpha\u003cbr\u003e(Development)](https://github.com/jslint-org/jslint/tree/alpha) |\n|--:|:--:|:--:|:--:|\n| 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) |\n| 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) |\n| Demo | [\u003cimg src=\"asset_image_logo_256.svg\" height=\"32\"\u003e](https://jslint-org.github.io/jslint/branch-master/index.html) | [\u003cimg src=\"asset_image_logo_256.svg\" height=\"32\"\u003e](https://jslint-org.github.io/jslint/branch-beta/index.html) | [\u003cimg src=\"asset_image_logo_256.svg\" height=\"32\"\u003e](https://jslint-org.github.io/jslint/branch-alpha/index.html) |\n| Artifacts | [\u003cimg src=\"asset_image_folder_open_solid.svg\" height=\"30\"\u003e](https://github.com/jslint-org/jslint/tree/gh-pages/branch-master/.artifact) | [\u003cimg src=\"asset_image_folder_open_solid.svg\" height=\"30\"\u003e](https://github.com/jslint-org/jslint/tree/gh-pages/branch-beta/.artifact) | [\u003cimg src=\"asset_image_folder_open_solid.svg\" height=\"30\"\u003e](https://github.com/jslint-org/jslint/tree/gh-pages/branch-alpha/.artifact) |\n\n\n\u003cbr\u003e\u003cbr\u003e\n# Table of Contents\n\n1. [Web Demo](#web-demo)\n\n2. [Web Demo Archived](#web-demo-archived)\n\n3. [Quickstart Install](#quickstart-install)\n    - [To install, just download and save https://www.jslint.com/jslint.mjs to file:](#to-install-just-download-and-save-httpswwwjslintcomjslintmjs-to-file)\n    - [To run `jslint.mjs` in shell:](#to-run-jslintmjs-in-shell)\n    - [To import `jslint.mjs` in ES Module environment:](#to-import-jslintmjs-in-es-module-environment)\n    - [To import `jslint.mjs` in CommonJS environment:](#to-import-jslintmjs-in-commonjs-environment)\n    - [To JSLint entire directory in shell:](#to-jslint-entire-directory-in-shell)\n\n4. [Quickstart JSLint Report](#quickstart-jslint-report)\n    - [To create a JSLint report in shell:](#to-create-a-jslint-report-in-shell)\n    - [To create a JSLint report in javascript:](#to-create-a-jslint-report-in-javascript)\n\n5. [Quickstart V8 Coverage Report](#quickstart-v8-coverage-report)\n    - [To create V8 coverage report from Node.js / Npm program in shell:](#to-create-v8-coverage-report-from-nodejs--npm-program-in-shell)\n    - [To create V8 coverage report from Node.js / Npm program in javascript:](#to-create-v8-coverage-report-from-nodejs--npm-program-in-javascript)\n\n6. [Quickstart JSLint in CodeMirror](#quickstart-jslint-in-codemirror)\n\n7. [Quickstart JSLint in Vim](#quickstart-jslint-in-vim)\n\n8. [Quickstart JSLint in VSCode](#quickstart-jslint-in-vscode)\n\n9. [Documentation](#documentation)\n    - [API Doc](#api-doc)\n    - [Directive `/*jslint*/`](#directive-jslint)\n        - [`/*jslint beta*/`](#jslint-beta)\n        - [`/*jslint bitwise*/`](#jslint-bitwise)\n        - [`/*jslint browser*/`](#jslint-browser)\n        - [`/*jslint convert*/`](#jslint-convert)\n        - [`/*jslint couch*/`](#jslint-couch)\n        - [`/*jslint devel*/`](#jslint-devel)\n        - [`/*jslint eval*/`](#jslint-eval)\n        - [`/*jslint fart*/`](#jslint-fart)\n        - [`/*jslint for*/`](#jslint-for)\n        - [`/*jslint getset*/`](#jslint-getset)\n        - [`/*jslint indent2*/`](#jslint-indent2)\n        - [`/*jslint long*/`](#jslint-long)\n        - [`/*jslint node*/`](#jslint-node)\n        - [`/*jslint nomen*/`](#jslint-nomen)\n        - [`/*jslint single*/`](#jslint-single)\n        - [`/*jslint subscript*/`](#jslint-subscript)\n        - [`/*jslint this*/`](#jslint-this)\n        - [`/*jslint trace*/`](#jslint-trace)\n        - [`/*jslint unordered*/`](#jslint-unordered)\n        - [`/*jslint white*/`](#jslint-white)\n    - [Directive `/*global*/`](#directive-global)\n    - [Directive `/*property*/`](#directive-property)\n    - [Directive `/*jslint-disable*/.../*jslint-enable*/`](#directive-jslint-disablejslint-enable)\n    - [Directive `//jslint-ignore-line`](#directive-jslint-ignore-line)\n\n10. [Package Listing](#package-listing)\n\n11. [Changelog](#changelog)\n\n12. [License](#license)\n\n13. [Devops Instruction](#devops-instruction)\n    - [pull-request merge](#pull-request-merge)\n    - [branch-master commit](#branch-master-commit)\n    - [branch-master publish](#branch-master-publish)\n    - [vscode-jslint publish](#vscode-jslint-publish)\n\n\n\u003cbr\u003e\u003cbr\u003e\n# Web Demo\n- https://www.jslint.com\n\n[![screenshot](https://jslint-org.github.io/jslint/branch-beta/.artifact/screenshot_browser__2fjslint_2fbranch-beta_2findex.html.png)](https://jslint-org.github.io/jslint/index.html)\n\n\n\u003cbr\u003e\u003cbr\u003e\n# Web Demo Archived\n- [Web Demo 2020](https://www.jslint.com/branch-v2020.11.6/index.html)\n- [Web Demo 2014 (ES5 only)](https://www.jslint.com/branch-v2014.7.8/jslint.html)\n- [Web Demo 2013 (ES5, CSS, HTML)](https://www.jslint.com/branch-v2013.3.13/jslint.html)\n\n\n\u003cbr\u003e\u003cbr\u003e\n# Quickstart Install\n\n\n\u003cbr\u003e\u003cbr\u003e\n### To install, just download and save https://www.jslint.com/jslint.mjs to file:\n```shell \u003c!-- shRunWithScreenshotTxt .artifact/screenshot_sh_install_download.svg --\u003e\n#!/bin/sh\n\ncurl -L https://www.jslint.com/jslint.mjs \u003e jslint.mjs\n```\n- shell output\n\n![screenshot](https://jslint-org.github.io/jslint/branch-beta/.artifact/screenshot_sh_install_download.svg)\n\n\n\u003cbr\u003e\u003cbr\u003e\n### To run `jslint.mjs` in shell:\n```shell \u003c!-- shRunWithScreenshotTxt .artifact/screenshot_sh_jslint_file.svg --\u003e\n#!/bin/sh\n\nprintf \"console.log('hello world');\\n\" \u003e hello.js\n\nnode jslint.mjs hello.js\n```\n- shell output\n\n![screenshot](https://jslint-org.github.io/jslint/branch-beta/.artifact/screenshot_sh_jslint_file.svg)\n\n\n\u003cbr\u003e\u003cbr\u003e\n### To import `jslint.mjs` in ES Module environment:\n```shell \u003c!-- shRunWithScreenshotTxt .artifact/screenshot_js_import_esm.svg --\u003e\n#!/bin/sh\n\nnode --input-type=module --eval '\n\n/*jslint devel*/\n\n// Import JSLint in ES Module environment.\n\nimport jslint from \"./jslint.mjs\";\n\nlet globals = [\"caches\", \"indexedDb\"];\nlet options = {browser: true};\nlet result;\nlet source = \"console.log(\\u0027hello world\\u0027);\\n\";\n\n// JSLint \u003csource\u003e and print \u003cformatted_message\u003e.\n\nresult = jslint.jslint(source, options, globals);\nresult.warnings.forEach(function ({\n    formatted_message\n}) {\n    console.error(formatted_message);\n});\n\n'\n```\n- shell output\n\n![screenshot](https://jslint-org.github.io/jslint/branch-beta/.artifact/screenshot_js_import_esm.svg)\n\n\n\u003cbr\u003e\u003cbr\u003e\n### To import `jslint.mjs` in CommonJS environment:\n```shell \u003c!-- shRunWithScreenshotTxt .artifact/screenshot_js_import_cjs.svg --\u003e\n#!/bin/sh\n\nnode --eval '\n\n/*jslint devel*/\n(async function () {\n    let globals = [\"caches\", \"indexedDb\"];\n    let jslint;\n    let options = {browser: true};\n    let result;\n    let source = \"console.log(\\u0027hello world\\u0027);\\n\";\n\n// Import JSLint in CommonJS environment.\n\n    jslint = await import(\"./jslint.mjs\");\n    jslint = jslint.default;\n\n// JSLint \u003csource\u003e and print \u003cformatted_message\u003e.\n\n    result = jslint.jslint(source, options, globals);\n    result.warnings.forEach(function ({\n        formatted_message\n    }) {\n        console.error(formatted_message);\n    });\n}());\n\n'\n```\n- shell output\n\n![screenshot](https://jslint-org.github.io/jslint/branch-beta/.artifact/screenshot_js_import_cjs.svg)\n\n\n\u003cbr\u003e\u003cbr\u003e\n### To JSLint entire directory in shell:\n```shell \u003c!-- shRunWithScreenshotTxt .artifact/screenshot_sh_jslint_dir.svg --\u003e\n#!/bin/sh\n\n# JSLint directory '.'\n\nnode jslint.mjs .\n```\n- shell output\n\n![screenshot](https://jslint-org.github.io/jslint/branch-beta/.artifact/screenshot_sh_jslint_dir.svg)\n\n\n\u003cbr\u003e\u003cbr\u003e\n# Quickstart JSLint Report\n\n\n\u003cbr\u003e\u003cbr\u003e\n### To create a JSLint report in shell:\n```shell \u003c!-- shRunWithScreenshotTxt .artifact/screenshot_sh_jslint_report_file.svg --\u003e\n#!/bin/sh\n\nprintf \"function foo() {console.log('hello world');}\\n\" \u003e hello.js\n\n# Create JSLint report from file 'hello.js' in shell.\n\nnode jslint.mjs \\\n    jslint_report=.artifact/jslint_report_hello.html \\\n    hello.js\n```\n- shell output\n\n![screenshot](https://jslint-org.github.io/jslint/branch-beta/.artifact/screenshot_sh_jslint_report_file.svg)\n\n- screenshot file [.artifact/jslint_report_hello.html](https://jslint-org.github.io/jslint/branch-beta/.artifact/jslint_report_hello.html)\n\n[![screenshot](https://jslint-org.github.io/jslint/branch-beta/.artifact/screenshot_browser__2f.artifact_2fjslint_report_hello.html.png)](https://jslint-org.github.io/jslint/branch-beta/.artifact/jslint_report_hello.html)\n\n\n\u003cbr\u003e\u003cbr\u003e\n### To create a JSLint report in javascript:\n```shell \u003c!-- shRunWithScreenshotTxt .artifact/screenshot_js_jslint_report_file.svg --\u003e\n#!/bin/sh\n\nnode --input-type=module --eval '\n\n/*jslint devel*/\nimport jslint from \"./jslint.mjs\";\nimport fs from \"fs\";\n(async function () {\n    let result;\n    let source = \"function foo() {console.log(\\u0027hello world\\u0027);}\\n\";\n\n// Create JSLint report from \u003csource\u003e in javascript.\n\n    result = jslint.jslint(source);\n    result = jslint.jslint_report(result);\n    result = `\u003cbody class=\"JSLINT_ JSLINT_REPORT_\"\u003e\\n${result}\u003c/body\u003e\\n`;\n\n    await fs.promises.mkdir(\".artifact/\", {recursive: true});\n    await fs.promises.writeFile(\".artifact/jslint_report_hello.html\", result);\n    console.error(\"wrote file .artifact/jslint_report_hello.html\");\n}());\n\n'\n```\n- shell output\n\n![screenshot](https://jslint-org.github.io/jslint/branch-beta/.artifact/screenshot_js_jslint_report_file.svg)\n\n- screenshot file [.artifact/jslint_report_hello.html](https://jslint-org.github.io/jslint/branch-beta/.artifact/jslint_report_hello.html)\n\n[![screenshot](https://jslint-org.github.io/jslint/branch-beta/.artifact/screenshot_browser__2f.artifact_2fjslint_report_hello.html.png)](https://jslint-org.github.io/jslint/branch-beta/.artifact/jslint_report_hello.html)\n\n\n\u003cbr\u003e\u003cbr\u003e\n# Quickstart V8 Coverage Report\n\n\n\u003cbr\u003e\u003cbr\u003e\n### To create V8 coverage report from Node.js / Npm program in shell:\n```shell \u003c!-- shRunWithScreenshotTxt .artifact/screenshot_sh_coverage_report_spawn.svg --\u003e\n#!/bin/sh\n\ngit clone https://github.com/tryghost/node-sqlite3 node-sqlite3-sh \\\n    --branch=v5.0.11 \\\n    --depth=1 \\\n    --single-branch\n\ncd node-sqlite3-sh\nnpm install\n\n# Create V8 coverage report from program `npm run test` in shell.\n\nnode ../jslint.mjs \\\n    v8_coverage_report=../.artifact/coverage_sqlite3_sh/ \\\n        --exclude=tes?/ \\\n        --exclude=tes[!0-9A-Z_a-z-]/ \\\n        --exclude=tes[0-9A-Z_a-z-]/ \\\n        --exclude=tes[^0-9A-Z_a-z-]/ \\\n        --exclude=test/**/*.js \\\n        --exclude=test/suppor*/*elper.js \\\n        --exclude=test/suppor?/?elper.js \\\n        --exclude=test/support/helper.js \\\n        --include=**/*.cjs \\\n        --include=**/*.js \\\n        --include=**/*.mjs \\\n        --include=li*/*.js \\\n        --include=li?/*.js \\\n        --include=lib/ \\\n        --include=lib/**/*.js \\\n        --include=lib/*.js \\\n        --include=lib/sqlite3.js \\\n    npm run test\n```\n- shell output\n\n![screenshot](https://jslint-org.github.io/jslint/branch-beta/.artifact/screenshot_sh_coverage_report_spawn.svg)\n\n- screenshot file [.artifact/coverage_sqlite3_sh/index.html](https://jslint-org.github.io/jslint/branch-beta/.artifact/coverage_sqlite3_sh/index.html)\n\n[![screenshot](https://jslint-org.github.io/jslint/branch-beta/.artifact/screenshot_browser__2f.artifact_2fcoverage_sqlite3_sh_2findex.html.png)](https://jslint-org.github.io/jslint/branch-beta/.artifact/coverage_sqlite3_sh/index.html)\n\n- screenshot file [.artifact/coverage_sqlite3_sh/lib/sqlite3.js.html](https://jslint-org.github.io/jslint/branch-beta/.artifact/coverage_sqlite3_sh/lib/sqlite3.js.html)\n\n[![screenshot](https://jslint-org.github.io/jslint/branch-beta/.artifact/screenshot_browser__2f.artifact_2fcoverage_sqlite3_sh_2flib_2fsqlite3.js.html.png)](https://jslint-org.github.io/jslint/branch-beta/.artifact/coverage_sqlite3_sh/lib/sqlite3.js.html)\n\n\n\u003cbr\u003e\u003cbr\u003e\n### To create V8 coverage report from Node.js / Npm program in javascript:\n```shell \u003c!-- shRunWithScreenshotTxt .artifact/screenshot_js_coverage_report_spawn.svg --\u003e\n#!/bin/sh\n\ngit clone https://github.com/tryghost/node-sqlite3 node-sqlite3-js \\\n    --branch=v5.0.11 \\\n    --depth=1 \\\n    --single-branch\n\ncd node-sqlite3-js\nnpm install\n\nnode --input-type=module --eval '\n\n/*jslint node*/\nimport jslint from \"../jslint.mjs\";\n(async function () {\n\n// Create V8 coverage report from program `npm run test` in javascript.\n\n    await jslint.v8CoverageReportCreate({\n        coverageDir: \"../.artifact/coverage_sqlite3_js/\",\n        processArgv: [\n            \"--exclude=tes?/\",\n            \"--exclude=tes[!0-9A-Z_a-z-]/\",\n            \"--exclude=tes[0-9A-Z_a-z-]/\",\n            \"--exclude=tes[^0-9A-Z_a-z-]/\",\n            \"--exclude=test/**/*.js\",\n            \"--exclude=test/suppor*/*elper.js\",\n            \"--exclude=test/suppor?/?elper.js\",\n            \"--exclude=test/support/helper.js\",\n            \"--include=**/*.cjs\",\n            \"--include=**/*.js\",\n            \"--include=**/*.mjs\",\n            \"--include=li*/*.js\",\n            \"--include=li?/*.js\",\n            \"--include=lib/\",\n            \"--include=lib/**/*.js\",\n            \"--include=lib/*.js\",\n            \"--include=lib/sqlite3.js\",\n            \"npm\", \"run\", \"test\"\n        ]\n    });\n}());\n\n'\n```\n- shell output\n\n![screenshot](https://jslint-org.github.io/jslint/branch-beta/.artifact/screenshot_js_coverage_report_spawn.svg)\n\n- screenshot file [.artifact/coverage_sqlite3_js/index.html](https://jslint-org.github.io/jslint/branch-beta/.artifact/coverage_sqlite3_js/index.html)\n\n[![screenshot](https://jslint-org.github.io/jslint/branch-beta/.artifact/screenshot_browser__2f.artifact_2fcoverage_sqlite3_js_2findex.html.png)](https://jslint-org.github.io/jslint/branch-beta/.artifact/coverage_sqlite3_js/index.html)\n\n- screenshot file [.artifact/coverage_sqlite3_js/lib/sqlite3.js.html](https://jslint-org.github.io/jslint/branch-beta/.artifact/coverage_sqlite3_js/lib/sqlite3.js.html)\n\n[![screenshot](https://jslint-org.github.io/jslint/branch-beta/.artifact/screenshot_browser__2f.artifact_2fcoverage_sqlite3_js_2flib_2fsqlite3.js.html.png)](https://jslint-org.github.io/jslint/branch-beta/.artifact/coverage_sqlite3_js/lib/sqlite3.js.html)\n\n\n\u003cbr\u003e\u003cbr\u003e\n# Quickstart JSLint in CodeMirror\n1. Download and save [`jslint.mjs`](https://www.jslint.com/jslint.mjs), [`jslint_wrapper_codemirror.js`](https://www.jslint.com/jslint_wrapper_codemirror.js) to file.\n\n2. Edit, save, and serve example html-file below:\n```html \u003c!-- jslint_wrapper_codemirror.html --\u003e\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n    \u003cmeta charset=\"utf-8\"\u003e\n    \u003ctitle\u003eCodeMirror: JSLint Demo\u003c/title\u003e\n\n\u003c!-- Assets from codemirror. --\u003e\n\n    \u003clink rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.10/codemirror.css\"\u003e\n    \u003clink rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.10/addon/lint/lint.css\"\u003e\n    \u003cscript defer src=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.10/codemirror.js\"\u003e\u003c/script\u003e\n    \u003cscript defer src=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.10/mode/javascript/javascript.js\"\u003e\u003c/script\u003e\n    \u003cscript defer src=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.10/addon/lint/lint.js\"\u003e\u003c/script\u003e\n\n\u003c!-- Assets from jslint. --\u003e\n\n    \u003cscript type=\"module\" src=\"./jslint.mjs?window_jslint=1\"\u003e\u003c/script\u003e\n    \u003cscript defer src=\"./jslint_wrapper_codemirror.js\"\u003e\u003c/script\u003e\n\u003cstyle\u003e\nbody {\n    background: #bbb;\n    color: #333;\n    font-family: sans-serif;\n    margin: 20px;\n}\n.JSLINT_.JSLINT_REPORT_ {\n    margin-top: 20px;\n}\n#editor1 {\n    height: 300px;\n    width: 100%;\n}\n\u003c/style\u003e\n\u003c/head\u003e\n\n\n\u003cbody\u003e\n    \u003ch1\u003eCodeMirror: JSLint Demo\u003c/h1\u003e\n    \u003ch3\u003e\nThis demo will auto-lint the code below, and auto-generate a report as you type.\n    \u003c/h3\u003e\n\n\u003c!-- Container for codemirror-editor. --\u003e\n\n    \u003ctextarea id=\"editor1\"\u003econsole.log('hello world');\u003c/textarea\u003e\n\n\u003c!-- Container for jslint-report. --\u003e\n\n    \u003cdiv class=\"JSLINT_ JSLINT_REPORT_\"\u003e\u003c/div\u003e\n\n\n\u003cscript type=module\u003e\nwindow.addEventListener(\"load\", function () {\n    let editor = window.CodeMirror.fromTextArea(document.getElementById(\n        \"editor1\"\n    ), {\n        gutters: [\n            \"CodeMirror-lint-markers\"\n        ],\n        indentUnit: 4,\n        lineNumbers: true,\n        lint: {\n            lintOnChange: true, // Enable auto-lint.\n            options: {\n                // browser: true,\n                // node: true\n                globals: [\n                    // \"caches\",\n                    // \"indexedDb\"\n                ]\n            }\n        },\n        mode: \"javascript\"\n    });\n\n// Initialize event-handling before linter is run.\n\n    editor.on(\"lintJslintBefore\", function (/* options */) {\n        // options.browser = true;\n        // options.node = true;\n        // options.globals = [\n        //     \"caches\",\n        //     \"indexedDb\"\n        // ];\n        return;\n    });\n\n// Initialize event-handling after linter is run.\n\n    editor.on(\"lintJslintAfter\", function (options) {\n\n// Generate jslint-report from options.result.\n\n        document.querySelector(\n            \".JSLINT_REPORT_\"\n        ).innerHTML = window.jslint.jslint_report(options.result);\n    });\n\n// Manually trigger linter.\n\n    editor.performLint();\n});\n\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n3. Live example at https://www.jslint.com/jslint_wrapper_codemirror.html\n\n[![screenshot](https://jslint-org.github.io/jslint/branch-beta/.artifact/screenshot_browser__2fjslint_2fbranch-beta_2fjslint_wrapper_codemirror.html.png)](https://jslint-org.github.io/jslint/jslint_wrapper_codemirror.html)\n\n\n\u003cbr\u003e\u003cbr\u003e\n# Quickstart JSLint in Vim\n1. 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/`\n2. Add vim-command `:source ~/.vim/jslint_wrapper_vim.vim` to file `~/.vimrc`\n    - If above files were saved to custom-directory, then use that directory instead, e.g.:\n        - save [`jslint.mjs`](https://www.jslint.com/jslint.mjs), [`jslint_wrapper_vim.vim`](https://www.jslint.com/jslint_wrapper_vim.vim) to directory `~/vimfiles/`\n        - vim-command `:source ~/vimfiles/jslint_wrapper_vim.vim`\n3. Vim can now jslint files (via nodejs):\n    - with vim-command `:SaveAndJslint`\n    - with vim-key-combo `\u003cCtrl-S\u003e \u003cCtrl-J\u003e`\n- screenshot\n\n[![screenshot](asset_image_jslint_wrapper_vim.png)](https://www.jslint.com/jslint_wrapper_vim.vim)\n\n\n\u003cbr\u003e\u003cbr\u003e\n# Quickstart JSLint in VSCode\n1. In VSCode, search and install extension [`vscode-jslint`](https://marketplace.visualstudio.com/items?itemName=jslint.vscode-jslint)\n2. In VSCode, while editing a javascript file:\n    - right-click context-menu and select `[JSLint - Lint File]`\n    - or use key-binding `[Ctrl + Shift + J], [L]`\n    - or use key-binding `[ Cmd + Shift + J], [L]` for Mac\n- screenshot\n\n[![screenshot](https://jslint-org.github.io/jslint/asset_image_jslint_wrapper_vscode.png)](https://marketplace.visualstudio.com/items?itemName=jslint.vscode-jslint)\n\n\n\u003cbr\u003e\u003cbr\u003e\n# Documentation\n\n\n- [jslint.mjs](jslint.mjs) contains the jslint function. It parses and analyzes a source file, returning an object with information about the file. It can also take an object that sets options.\n\n- [index.html](index.html) runs the jslint.mjs function in a web page.\n\nJSLint can be run anywhere that JavaScript (or Java) can run.\n\nThe place to express yourself in programming is in the quality of your ideas and\nthe efficiency of their execution. The role of style in programming is the same\nas in literature: It makes for better reading. A great writer doesn't express\nherself by putting the spaces before her commas instead of after, or by putting\nextra spaces inside her parentheses. A great writer will slavishly conform to\nsome rules of style, and that in no way constrains her power to express herself\ncreatively. See for example William Strunk's The Elements of Style\n[https://www.crockford.com/style.html].\n\nThis applies to programming as well. Conforming to a consistent style improves\nreadability, and frees you to express yourself in ways that matter. JSLint here\nplays the part of a stern but benevolent editor, helping you to get the style\nright so that you can focus your creative energy where it is most needed.\n\n\n\u003cbr\u003e\u003cbr\u003e\n### API Doc\n- https://www.jslint.com/apidoc.html\n\n[![screenshot](https://jslint-org.github.io/jslint/branch-beta/.artifact/screenshot_browser__2f.artifact_2fapidoc.html.png)](https://www.jslint.com/apidoc.html)\n\n\n\u003cbr\u003e\u003cbr\u003e\n### Directive `/*jslint*/`\n\n\u003cbr\u003e\n\n##### `/*jslint beta*/`\n\n```js\n/*jslint beta*/\n// Enable experimental warnings.\n// Warn if global variables are redefined.\n// Warn if const / let statements are not declared at top of function or\n//    script, similar to var statements.\n// Warn if const / let / var statements are not declared in ascii-order.\n// Warn if named-functions are not declared in ascii-order.\n// Warn if cases in switch-statements are not in ascii-order.\n```\n\n\u003cbr\u003e\n\n##### `/*jslint bitwise*/`\n\n```js\n/*jslint bitwise*/\n// Allow bitwise operator.\n\nlet foo = 0 | 1;\n```\n\n\u003cbr\u003e\n\n##### `/*jslint browser*/`\n\n```js\n/*jslint browser*/\n// Assume browser environment.\n\nlocalStorage.getItem(\"foo\");\n```\n\n\u003cbr\u003e\n\n##### `/*jslint convert*/`\n\n```js\n/*jslint convert*/\n// Allow conversion operator.\n\nlet foo = new Date() + \"\";\nlet bar = !!0;\n```\n\n\u003cbr\u003e\n\n##### `/*jslint couch*/`\n\n```js\n/*jslint couch*/\n// Assume CouchDb environment.\n\nregisterType(\"text-json\", \"text/json\");\n```\n\n\u003cbr\u003e\n\n##### `/*jslint devel*/`\n\n```js\n/*jslint devel*/\n// Allow console.log() and friends.\n\nconsole.log(\"hello\");\n```\n\n\u003cbr\u003e\n\n##### `/*jslint eval*/`\n\n```js\n/*jslint eval*/\n// Allow eval().\n\neval(\"1\");\n```\n\n\u003cbr\u003e\n\n##### `/*jslint fart*/`\n\n```js\n/*jslint fart*/\n// Allow complex fat-arrow.\n\nlet foo = async ({bar, baz}) =\u003e {\n    return await bar(baz);\n};\n```\n\n\u003cbr\u003e\n\n##### `/*jslint for*/`\n\n```js\n/*jslint for*/\n// Allow for-loop.\n\nfunction foo() {\n    let ii;\n    for (ii = 0; ii \u003c 10; ii += 1) {\n        foo();\n    }\n}\n```\n\n\u003cbr\u003e\n\n##### `/*jslint getset*/`\n\n```js\n/*jslint getset, this, devel*/\n// Allow get() and set().\n\nlet foo = {\n    bar: 0,\n    get getBar() {\n        return this.bar;\n    },\n    set setBar(value) {\n        this.bar = value;\n    }\n};\nconsole.log(foo.getBar); // 0\nfoo.setBar = 1;\nconsole.log(foo.getBar); // 1\n```\n\n\u003cbr\u003e\n\n##### `/*jslint indent2*/`\n\n```js\n/*jslint indent2*/\n// Use 2-space indent.\n\nfunction foo() {\n  return;\n}\n```\n\n\u003cbr\u003e\n\n##### `/*jslint long*/`\n\n```js\n/*jslint long*/\n// Allow long lines.\n\nlet foo = \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\";\n```\n\n\u003cbr\u003e\n\n##### `/*jslint node*/`\n\n```js\n/*jslint node*/\n// Assume Node.js environment.\n\nrequire(\"fs\");\n```\n\n\u003cbr\u003e\n\n##### `/*jslint nomen*/`\n\n```js\n/*jslint nomen*/\n// Allow weird property name.\n\nlet foo = {};\nfoo._bar = 1;\n```\n\n\u003cbr\u003e\n\n##### `/*jslint single*/`\n\n```js\n/*jslint single*/\n// Allow single-quote strings.\n\nlet foo = '';\n```\n\n\u003cbr\u003e\n\n##### `/*jslint subscript*/`\n\n```js\n/*jslint subscript*/\n// Allow identifiers in subscript-notation.\n\nlet foo = {};\nfoo[\"bar\"] = 1;\n```\n\n\u003cbr\u003e\n\n##### `/*jslint this*/`\n\n```js\n/*jslint this*/\n// Allow 'this'.\n\nfunction foo() {\n    return this;\n}\n```\n\n\u003cbr\u003e\n\n##### `/*jslint trace*/`\n\n```js\n/*jslint trace*/\n// Include jslint stack-trace in warnings.\n\nconsole.log('hello world');\n/*\n1. Undeclared 'console'.\nconsole.log('hello world');\nError\n    at warn_at (...)\n    at warn (...)\n    at lookup (...)\n    at pre_v (...)\n    at jslint.mjs\n2. Use double quotes, not single quotes.\nconsole.log(...);\nError\n    at warn_at (...)\n    at lex_string (...)\n    at lex_token (...)\n    at jslint_phase2_lex (...)\n    at Function.jslint (...)\n    at jslint.mjs\n*/\n```\n\n\u003cbr\u003e\n\n##### `/*jslint unordered*/`\n\n```js\n/*jslint unordered*/\n// Allow unordered cases, params, properties, variables, and exports.\n\nlet foo = {bb: 1, aa: 0};\n\nfunction bar({\n    bb = 1,\n    aa = 0\n}) {\n    return aa + bb;\n}\n\nexport {\n    foo,\n    bar\n};\n```\n\n\u003cbr\u003e\n\n##### `/*jslint white*/`\n\n```js\n/*jslint white*/\n// Allow messy whitespace.\n\nlet foo = 1; let bar = 2;\n```\n\n\n\u003cbr\u003e\u003cbr\u003e\n### Directive `/*global*/`\n\n```js\n/*global foo, bar*/\n// Declare global variables foo, bar.\n\nfoo();\nbar();\n```\n\n\n\u003cbr\u003e\u003cbr\u003e\n### Directive `/*property*/`\n\n```js\n/*property foo, bar*/\n// Restrict property-access to only .foo, .bar.\n\nlet aa = {bar: 1, foo: 2};\n```\n\n\n\u003cbr\u003e\u003cbr\u003e\n### Directive `/*jslint-disable*/.../*jslint-enable*/`\n\n```js\n/*jslint-disable*/\n\nJSLint will ignore and treat this region as blank-lines.\nSyntax error.\n\n/*jslint-enable*/\n```\n\n\n\u003cbr\u003e\u003cbr\u003e\n### Directive `//jslint-ignore-line`\n\n```js\n// JSLint will ignore non-fatal warnings at given line.\n\neval(\"1\"); //jslint-ignore-line\n```\n\n\n\u003cbr\u003e\u003cbr\u003e\n# Package Listing\n![screenshot_package_listing.svg](https://jslint-org.github.io/jslint/branch-beta/.artifact/screenshot_package_listing.svg)\n\n\n\u003cbr\u003e\u003cbr\u003e\n# Changelog\n- [Full CHANGELOG.md](CHANGELOG.md)\n\n![screenshot_changelog.svg](https://jslint-org.github.io/jslint/branch-beta/.artifact/screenshot_changelog.svg)\n\n\n\u003cbr\u003e\u003cbr\u003e\n# License\n- JSLint is under [Unlicense License](LICENSE).\n- CodeMirror editor is under [MIT License](https://github.com/codemirror/codemirror5/blob/d0e3b2e727c41aa4fd89fbad0adfb3815339174c/LICENSE).\n- Function `v8CoverageListMerge` is derived from [MIT Licensed v8-coverage](https://github.com/demurgos/v8-coverage/blob/73446087dc38f61b09832c9867122a23f8577099/ts/LICENSE.md).\n\n\n\u003cbr\u003e\u003cbr\u003e\n# Devops Instruction\n\n\n\u003cbr\u003e\u003cbr\u003e\n### pull-request merge\n- 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\n- `shGitPullrequest beta beta`\n    - verify ci-success for origin-branch-alpha\n    - https://github.com/kaizhu256/jslint/actions\n- `git push upstream alpha -f`\n    - verify ci-success for upstream-branch-alpha\n    - https://github.com/jslint-org/jslint/actions\n- goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:branch-p2024.11.24\n- click `Create pull request`\n- input `Add your description here...` with:\n```\nFixes #xxx.\n- \u003cprimary-commit-message\u003e\n\nThis PR will ...\n\nThis PR will additionally:\n- \u003csecondary-commit-message\u003e\n...\n\n\u003cscreenshot\u003e\n```\n- verify `commit into jslint-org:beta`\n- click `Create pull request`\n    - verify ci-success for pull-request\n    - https://github.com/jslint-org/jslint/actions/workflows/on_pull_request.yml\n- wait awhile before continuing ...\n- click `Rebase and merge`\n    - verify ci-success for upstream-branch-beta\n    - https://github.com/jslint-org/jslint/actions\n- `shGitPullrequestCleanup`\n    - verify ci-success for origin-branch-alpha\n    - https://github.com/kaizhu256/jslint/actions\n- `git push upstream alpha -f`\n    - verify ci-success for upstream-branch-alpha\n    - https://github.com/jslint-org/jslint/actions\n- click `Delete branch`\n\n\n\u003cbr\u003e\u003cbr\u003e\n### branch-master commit\n- `shGitPullrequest master beta`\n    - verify ci-success for origin-branch-alpha\n    - https://github.com/kaizhu256/jslint/actions\n- `git push upstream alpha -f`\n    - verify ci-success for upstream-branch-alpha\n    - https://github.com/jslint-org/jslint/actions\n- goto https://github.com/jslint-org/jslint/compare/beta...kaizhu256:jslint:branch-v2025.3.31\n- click `Create pull request`\n- input `Add a title` with: `# v20yy.mm.dd`\n- input `Add a description` with:\n```\n- \u003cprimary-commit-message\u003e\n- \u003csecondary-commit-message\u003e\n```\n- verify `commit into jslint-org:beta`\n- click `Create pull request`\n    - verify ci-success for pull-request\n    - https://github.com/jslint-org/jslint/actions/workflows/on_pull_request.yml\n- wait awhile before continuing ...\n- click `Rebase and merge`\n    - verify ci-success for upstream-branch-beta\n    - https://github.com/jslint-org/jslint/actions\n- `shGitPullrequestCleanup`\n    - verify ci-success for origin-branch-alpha\n    - https://github.com/kaizhu256/jslint/actions\n- `git push upstream alpha -f`\n    - verify ci-success for upstream-branch-alpha\n    - https://github.com/jslint-org/jslint/actions\n- click `Delete branch`\n- `git push origin beta:master`\n    - verify ci-success for origin-branch-master\n    - https://github.com/kaizhu256/jslint/actions\n- `git push upstream beta:master`\n    - verify ci-success for upstream-branch-master\n    - https://github.com/jslint-org/jslint/actions\n\n\n\u003cbr\u003e\u003cbr\u003e\n### branch-master publish\n- `git push upstream beta:master`\n    - verify ci-success for upstream-branch-master\n    - https://github.com/jslint-org/jslint/actions\n- goto https://github.com/jslint-org/jslint/releases/new\n- input `Choose a tag` with: `v20yy.mm.dd`\n- click `Create new tag: v20yy.mm.dd on publish`\n    - verify correct-year `20yy`\n- select `Target: master`\n- select `Previous tag:auto`\n- input `Release title` with: `v20yy.mm.dd - \u003cprimary-commit-message\u003e`\n- input `Describe this release` with:\n```\n- \u003cprimary-commit-message\u003e\n- \u003csecondary-commit-message\u003e\n```\n- click `Generate release notes`\n- click `Set as the latest release`\n- click `Preview` and review\n- click `Publish release`\n    - verify ci-success for upstream-branch-publish\n    - https://github.com/jslint-org/jslint/actions\n    - verify email-notification `Successfully published @jslint-org/jslint@20yy.mm.dd`\n\n\n\u003cbr\u003e\u003cbr\u003e\n### vscode-jslint publish\n- goto https://github.com/jslint-org/jslint/tree/gh-pages/branch-beta/.artifact/jslint_wrapper_vscode\n- click `vscode-jslint-20yy.mm.dd.vsix`\n- click `Raw` to download\n- goto https://marketplace.visualstudio.com/manage/publishers/jslint\n- right-click `Update`\n- upload downloaded file `vscode-jslint-20yy.mm.dd.vsix`\n- click 'Upload'\n- verify email-notification `[Succeeded] Extension publish on Visual Studio Marketplace - vscode-jslint`\n\n\n\u003c!--\nCoverage-hack\nnode --eval '\n0\n'\n--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjslint-org%2Fjslint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjslint-org%2Fjslint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjslint-org%2Fjslint/lists"}