The JavaScript Code Quality Tool

Related tags

QA Tools JSLint
Overview
JSLint, The JavaScript Code Quality Tool

Douglas Crockford
[email protected]

2019-03-15

jslint.js 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.

index.html runs the jslint.js function in a web page. The page also depends
browser.js and report.js and jslint.css.

jslint.css provides styling for index.html.

browser.js runs the web user interface.

report.js generates the results reports in HTML.

help.html describes JSLint's usage. Please read it.

function.html describes the jslint function and the results it produces.

JSLint can be run anywhere that JavaScript (or Java) can run.

The place to express yourself in programming is in the quality of your ideas and
the efficiency of their execution. The role of style in programming is the same
as in literature: It makes for better reading. A great writer doesn't express
herself by putting the spaces before her commas instead of after, or by putting
extra spaces inside her parentheses. A great writer will slavishly conform to
some rules of style, and that in no way constrains her power to express herself
creatively. See for example William Strunk's The Elements of Style
[http://www.crockford.com/style.html].

This applies to programming as well. Conforming to a consistent style improves
readability, and frees you to express yourself in ways that matter. JSLint here
plays the part of a stern but benevolent editor, helping you to get the style
right so that you can focus your creative energy where it is most needed.
Comments
  • Add support for multi line strings

    Add support for multi line strings

    JSlint stops when it finds a multiline string literal.

    e.g.

    var hello = "hello
    world";

    This will result in the message:

    "Bad escapement. Unclosed string. Stopping, unable to continue."

    opened by fjakobs 18
  • documentation: jslint directive: adsafe

    documentation: jslint directive: adsafe

    It looks like, at some point, the jslint directive was changed so that the adsafe option is no longer a boolean. However the documentation has not been updated to match. So /*jslint adsafe: false */ currently causes ADsafety to be checked.

    opened by adscriven 17
  • Does not accept import() in function scope

    Does not accept import() in function scope

    /*jslint node */
    (function () {
        return import("./foo.js").then(console.log);
    }());
    

    fails JSLint with

    Undeclared 'import'.

    There does not appear to be a workaround.

    opened by diachedelic 12
  • using node:true continues not accepting __dirname

    using node:true continues not accepting __dirname

    Using node: true continues not accepting __dirname while Disallow dangling _ in identifiers is checked

    /*jslint devel: true, node: true, nomen: true, maxerr: 50, indent: 4 */
    
    console.log(__dirname);
    

    Error: Problem at line 1 character 13: Unexpected dangling '_' in '__dirname'. console.log(__dirname);

    source: jslint.com live editor

    opened by zanona 11
  • Disable

    Disable "Unexpected '\'."

    JsLint's apparent distaste of the backslash in strings is making it impossible to lint code like this: https://github.com/busterjs/buster-terminal/blob/master/lib/buster-terminal.js#L32, which prints colorized output to the terminal via ANSI escape sequences. It would be nice to be able to disable that check for legitimate uses of the escape character.

    opened by cjohansen 10
  • var in for stops parsing.

    var in for stops parsing.

    when linting thing like this:

    /*jslint white: true, maxerr: 100 */
    function f() {
     for (var i = 0; i < 2; i++) {
      return i;
     }
    }
    
    kah dkjash kajshdk jahkd as d
    and other non-senses
    

    jslint will stop on for loop:

    Problem at line 2 character 2: Missing 'use strict' statement.
    
     for (var i = 0; i < 2; i++) {
    
    Problem at line 2 character 7: Move 'var' declarations to the top of the function.
    
     for (var i = 0; i < 2; i++) {
    
    Problem at line 2 character 7: Stopping. (22% scanned).
    

    No, option combination prevents it from stopping stopping, or not emiting this varning.

    opened by baryluk 10
  • function is not defined

    function is not defined

    JSLint has an issue with locally scoped functions being defined after use.

    I find doing so improves readability a lot, as it shoves the utility functions down so the main logic is upfront.

    Example, the primary thing for this code to do is create a div with "Hello World":

    (function () {
        createDiv("Hello World");
    
        function createDiv(text) {
            var elem = document.createElement('div');
            elem.appendChild(document.createTextNode(text));
            document.body.appendChild(elem);
        }
    }());
    

    It reads a lot better with the function defined after, but JSLint incorrectly assumes it is a global.

    I understand that you may feel like this is a scope issue like var being defined upfront, but when there are a lot of internal functions (for example drawComplicatedShape), there is a large reduction in readability when utility functions such as these come first.

    The temptation would be to expose these on the object even though they are not used outside the object just to better organize the file. This prevents things like Google compiler from optimizing them like it would if they were locally scoped.

    It would be nice at least, even if you disagree with the practice, the message be correct and not say it is a global, but give a warning and let that warning be able to be switched off.

    opened by krisselden 10
  • function hoisting not allowed

    function hoisting not allowed

    Dear Mr. Crockford, I'm aware that there is already an issue concerning this topic (it's #33 ) but it's 9 years old and in the meantime the language and JSLint have evolved.

    Specifically, JSLint requires all the functions to be declared before their usage, which leads to two consequences in the coding style:

    • the first wun is that the code must be read in a bottom-up manner, instead of a more natural top-down.

    • the second wun is that JSLint does not allow two functions to reference each other (using only function declarations - which is the style you're using in "how javascript works"), unless breaking the "equality" between the two functions (i.e., passing the second function as a parameter of the first wun).

    function foo() {
       console.log("foo");
       setTimeout(bar, 1000);
    }
    
    function bar() {
       console.log("bar");
       setTimeout(foo, 1000);
    }
    
    
    foo();
    

    So, only for the function declarations, can you reconsider to relax this constraint?

    Anyway, many thanks for your software!

    Cheers

    opened by bunglegrind 9
  • Feature request: warn about confusing finally

    Feature request: warn about confusing finally

    Example code adapted from eslint's no-unsafe-finally. People might think this function would return 1, especially if the catch block becomes rather long.

    (function () {
        "use strict";
        try {
            return 1;
        } catch (ignore) {
            return 2;
        } finally {
            return 3;
        }
    }());
    
    opened by mk-pmb 9
  • Unexpected '.' when using .call()

    Unexpected '.' when using .call()

    /*jslint browser: true */
    
    var admin = {};
    (function (jQuery) {
        "use strict";
    }).call(admin, window.jQuery);
    

    Using the stripped sample above, the following warning is generated

    Problem at line 6 character 3: Unexpected '.'.

    I am using the pattern described in My Favorite JavaScript Design Pattern and The Anatomy of a JavaScript Design Pattern and use .call(context, arg1) to apply the encapsulated function to my single global object and pass in other global objects as parameters.

    Unfortunately, this syntax is needed to evaluate the function before using .call and needs the wrapping parenthesis. At this time I am unsure of how to edit this design pattern that will pass validation.

    opened by gibwar 9
  • node.js and CommonJS module support

    node.js and CommonJS module support

    Thanks for writing this useful utility. Currently the jslint.js file needs to be modified to use it with CommonJS module based systems, like node.js. Would it be possible to have a few lines added to export the JSLint function?

    Several of us are using this in node.js instead of the browser. It would be great to use a git submodule to directly use your official version of jslint.js in these projects. Unfortunately we need to modify the official version before using it in node.js because files only share symbols that have been exported and the official version of jslint.js doesn't export any symbols. While we could use a makefile to append the needed code, many of these projects don't need makefiles for anything else.

    If you're willing to add a tiny bit of code to support this use case, adding the following three lines to the end of jslint.js should be sufficient:

    /*properties JSLINT: function */ if (exports !== undefined) { exports.JSLINT = JSLINT; }

    opened by kms15 9
  • Feature request: Spread syntax support in object literals

    Feature request: Spread syntax support in object literals

    Is your feature request related to a problem? Please describe. It looks like the spread syntax in object literals is not supported in JSLint, possibly because when "how javascript works" was written wasn't still part of the ECMAScript standard.

    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax

    example:

    import parseq from "./parseq.js";
    
    export default Object.freeze({
        ...parseq
    });
    

    Describe the solution you'd like Are there any possibilities to support spread syntax? Or there are good reasons to avoid it?

    opened by bunglegrind 3
  • Feature request: Using `target=

    Feature request: Using `target="_blank" on all external links`

    Is your feature request related to a problem? Please describe.

    It's very frustrating to have the code you linted and started to fix vanish in thin air when you click a link because it doesn't open in a new tab.

    Describe the solution you'd like

    My suggestion is using target="_blank" on all external links on JSLint or at least just on the linting page. See When to use target=”_blank” for a more in depth guide and reasoning.

    Describe alternatives you've considered

    An alternative would be just Ctrl/Cmd clicking every line, but that is tedious. One other option is adding a unsaved changes dialog:

    window.addEventListener("beforeunload", function (e) {
        var confirmationMessage = 'It looks like you have been editing something. '
                                + 'If you leave before saving, your changes will be lost.';
    
        (e || window.event).returnValue = confirmationMessage; //Gecko + IE
        return confirmationMessage; //Gecko + Webkit, Safari, Chrome etc.
    });
    

    code for unsaved warning

    opened by UnrealApex 0
  • Feature request: intent to add new warning - `Wrap a regexp in parens, with a line break after the left paren.`

    Feature request: intent to add new warning - `Wrap a regexp in parens, with a line break after the left paren.`

    Please check these things before submitting your issue:

    • [x ] I searched for duplicate or closed feature request here

    Is your feature request related to a problem? Please describe.

    because its so common for lines containing regular-expressions mixed with other code to eventually exceed 80 characters (due to regexp feature-creep), the entire line should've had only the regexp reserved for it in the first place.

    Describe the solution you'd like

    intend to add jslint-warning discourage mixing regexp with other code on same line in a future jslint-release.

    Describe alternatives you've considered

    N/A.

    Additional context

    N/A.

    opened by kaizhu256 0
  • 100% code-coverage by removing deadcode

    100% code-coverage by removing deadcode

    in commit a422783e,

    the following snippets appear to be deadcode. they will be replaced with internal-assertions just in case they're actually reachable. if anyone can figure out some weird javascript-code that can reach the branches below, please let me know, so i can add extra coverage tests!

    diff --git a/jslint.js b/jslint.js
    index 141f38f..65c6d7e 100755
    --- a/jslint.js
    +++ b/jslint.js
    @@ -2062,9 +2062,10 @@ function are_similar(a, b) {
    
     // cause: "0&&0"
    
    -    if (a === b) {
    -        return true;
    -    }
    +    assert_or_throw(a !== b, "Expected a !== b.");
    +//  if (a === b) {
    +//      return true;
    +//  }
         if (Array.isArray(a)) {
             return (
                 Array.isArray(b)
    @@ -2077,9 +2078,10 @@ function are_similar(a, b) {
                 })
             );
         }
    -    if (Array.isArray(b)) {
    -        return false;
    -    }
    +    assert_or_throw(!Array.isArray(b), "Expected !Array.isArray(b).");
    +//  if (Array.isArray(b)) {
    +//      return false;
    +//  }
         if (a.id === "(number)" && b.id === "(number)") {
             return a.value === b.value;
         }
    @@ -2102,16 +2104,25 @@ function are_similar(a, b) {
             return false;
         }
         if (a.arity === b.arity && a.id === b.id) {
    +
    +// cause: "aa.bb&&aa.bb"
    +
             if (a.id === ".") {
                 return (
                     are_similar(a.expression, b.expression)
                     && are_similar(a.name, b.name)
                 );
             }
    +
    +// cause: "+0&&+0"
    +
             if (a.arity === "unary") {
                 return are_similar(a.expression, b.expression);
             }
             if (a.arity === "binary") {
    +
    +// cause: "aa[0]&&aa[0]"
    +
                 return (
                     a.id !== "("
                     && are_similar(a.expression[0], b.expression[0])
    @@ -2128,9 +2139,13 @@ function are_similar(a, b) {
                     && are_similar(a.expression[2], b.expression[2])
                 );
             }
    -        if (a.arity === "function" && a.arity === "regexp") {
    -            return false;
    -        }
    +        assert_or_throw(
    +            a.arity !== "function" && a.arity !== "regexp",
    +            "Expected a.arity !== \"function\" && a.arity !== \"regexp\"."
    +        );
    +//      if (a.arity === "function" && a.arity === "regexp") {
    +//          return false;
    +//      }
    
     // cause: "undefined&&undefined"
    
    opened by kaizhu256 1
  • Styles and responsivity

    Styles and responsivity

    Hi @douglascrockford, i tried to make the lint and help pages more responsive, and a little lighter. Tell me if you think it could be good, but should be done differently :)

    opened by arnaudlevy 2
Releases(v2022.11.20)
  • v2022.11.20(Nov 21, 2022)

    What's Changed

    • ci - update ci from node-v16 to node-v18
    • cli - remove deprecated cli-option --mode-vim-plugin
    • node - after node-v14 is deprecated, remove shell-code export "NODE_OPTIONS=--unhandled-rejections=strict".
    • editor - update codemirror-editor to v5.65.10
    • remove obsolete help.html
    • v2022.11.20 - ci - update ci from node-v16 to node-v18 by @kaizhu256 in https://github.com/jslint-org/jslint/pull/416

    Full Changelog: https://github.com/jslint-org/jslint/compare/v2022.9.20...v2022.11.20

    Source code(tar.gz)
    Source code(zip)
  • v2022.9.20(Sep 21, 2022)

    What's Changed

      • directive - add new directive fart to allow complex fat-arrow by @kaizhu256 in https://github.com/jslint-org/jslint/pull/414
    • v2022.9.20 by @kaizhu256 in https://github.com/jslint-org/jslint/pull/415

    Full Changelog: https://github.com/jslint-org/jslint/compare/v2022.7.20...v2022.9.20

    Source code(tar.gz)
    Source code(zip)
  • v2022.7.20(Jul 21, 2022)

    What's Changed

      • doc - document jslint directives by @kaizhu256 in https://github.com/jslint-org/jslint/pull/407
      • bugfix - warnings that should be ignored sometimes suppress legitimate warnings by @kaizhu256 in https://github.com/jslint-org/jslint/pull/409
    • v2022.7.20 by @kaizhu256 in https://github.com/jslint-org/jslint/pull/411

    Full Changelog: https://github.com/jslint-org/jslint/compare/v2022.6.21...v2022.7.20

    Source code(tar.gz)
    Source code(zip)
  • v2022.6.21(Jun 22, 2022)

    What's Changed

    • directive - add new directive subscript for linting of scripts targeting Google Closure Compiler by @kaizhu256 in https://github.com/jslint-org/jslint/pull/404
      • warning - relax warning about missing catch in try...finally statement
      • jslint - allow aliases evil, nomen for jslint-directives eval, name, respectively for backwards-compat
      • bugfix - fix broken codemirror example
    • bugfix - fix jslint not-recognizing option-chaining when comparing operands of binary operator by @kaizhu256 in https://github.com/jslint-org/jslint/pull/403
    • bugfix - fix expression after "await" mis-identified as statement by @kaizhu256 in https://github.com/jslint-org/jslint/pull/405
      • allow array-literals to directly call [...].flat() and [...].flatMap()
    • v2022.6.21 by @kaizhu256 in https://github.com/jslint-org/jslint/pull/406

    Full Changelog: https://github.com/jslint-org/jslint/compare/v2022.5.20...v2022.6.21

    Source code(tar.gz)
    Source code(zip)
  • v2022.5.20(May 21, 2022)

    What's Changed

    • coverage-report - disable default-coverage of directory node_modules, but allow override with cli-option --include-node-modules=1
    • coverage-report - add function globExclude() to revamp coverage-report to exclude files using glob-pattern-matching
    • add codemirror-example-file jslint_wrapper_codemirror.html
    • update codemirror-editor to v5.65.3
    • wrapper - add jslint-addon for codemirror
    • allow jslint.mjs to auto-export itself to globalThis when given search-param ?window_jslint=1
    • wrapper - add jslint-extension for vscode
    • bugfix - fix jslint falsely believing megastring literals 0 and 1 are similar
    • bugfix - fix function jstestOnExit() from exiting prematurely and suppressing additional error-messages

    Full Changelog: https://github.com/jslint-org/jslint/compare/v2022.3.30...v2022.5.20

    Source code(tar.gz)
    Source code(zip)
  • v2022.3.30(Mar 31, 2022)

    What's Changed

    • website - use localStorage to persist jslint-options selected in ui
    • website - add optional debug-mode to use sessionStorage to persist jslint-globals and jslint-source from ui
    • jslint - add numeric-separator support
    • jslint - move regexp-literals to module-level so they are explicitly cached, to improve performance
    • ci - add check for package.json.fileCount

    Full Changelog: https://github.com/jslint-org/jslint/compare/v2022.2.20...v2022.3.30

    Source code(tar.gz)
    Source code(zip)
  • v2022.2.20(Feb 20, 2022)

    What's Changed

    • test - migrate all tests to use jstestDescribe(), jstestIt()
    • fs - rename jslint-wrapper-files to jslint_wrapper_xxx.xxx
    • bugfix - fix issue #382 - make fart-related warnings more readable
    • bugfix - fix issue #382 - fix warnings against destructured fart
    • bugfix - fix issue #379 - warn against naked-statement in fart.
    • update commonjs-wrapper jslint.cjs to load jslint in strict-mode.

    Full Changelog: https://github.com/jslint-org/jslint/compare/v2021.12.20...v2022.2.20

    Source code(tar.gz)
    Source code(zip)
  • v2021.12.20(Dec 21, 2021)

    What's Changed

    • npm - add file jslint.cjs so package @jslint-org/jslint can be published as dual-module
    • jslint - relax warning "function_in_loop"
    • update function assertJsonEqual to JSON.stringify 3rd param if its an object

    Full Changelog: https://github.com/jslint-org/jslint/compare/v2021.11.20...v2021.12.20

    Source code(tar.gz)
    Source code(zip)
  • v2021.11.20(Nov 22, 2021)

    What's Changed

    • jslint - add top-level-await support
    • ci - deprecate/remove jslint.cjs from ci
    • coverage - add cli-options --exclude=aa,bb, --exclude-node-modules=false, --include=aa,bb
    • coverage - dedupe coverage-logic now applied when only one script passed
    • npm - add file .npmignore
    • website - add clickable-links to editor-code in report-warnings and report-functions

    Full Changelog: https://github.com/jslint-org/jslint/compare/v2021.10.20...v2021.11.20

    Source code(tar.gz)
    Source code(zip)
  • v2021.10.20(Oct 20, 2021)

    What's Changed

    • ci - add release-trigger to publish to @jslint-org/jslint
    • bugfix - fix coverage-report having incorrect http-link to index.html
    • bugfix - fix false warning uninitialized 'bb' in code /*jslint node*/\nlet {aa:bb} = {}; bb();
    • bugfix - fix issue #358 - switch-statement crashes jslint
    • ci - cache coverage-example node-sqlite3 to speed up ci
    • ci - rename dir .build/ to .artifact/
    • ci - update shell-function shRunWithCoverage() to reduce size of string/argument passed to nodejs by using 2-space-indent
    • cli - add cli-command jslint_plugin_vim
    • cli - add cli-command v8_coverage_report
    • cli - change cli-option --mode-report to cli-command jslint_report=<filename>
    • coverage - relax requirement for coverageDir to be in cwd
    • deprecated - cli - add cli-option --mode-report
    • doc - add api-documentation
    • fs - merge file asset_codemirror_rollup.css into index.html
    • fs - merge file browser.mjs into index.html
    • fs - merge file function.html into help.html
    • fs - remove little-used font asset_font_programma_bold.woff2
    • fs - rename files with dashes to files with underscore
    • jslint - disable linting of embedded javascript in markdown-files
    • jslint - relax regexp-warning against using 'space'
    • npm - add file package.json and command npm test
    • style - change naming-convention for non-jslint-core code from underscore to camelCase
    • test - add mocha-like test-functions jstestDescribe, jstestIt

    Full Changelog: https://github.com/jslint-org/jslint/compare/v2021.9.20...v2021.10.20

    Source code(tar.gz)
    Source code(zip)
  • v2021.9.20(Sep 20, 2021)

    • jslint - add bigint support.
    • vim - add vim-plugin and file jslint.vim.
    • doc - auto-generate toc for README.md
    • jslint - rename little-used directive debug to trace to avoid confusion with non-related directive devel.
    Source code(tar.gz)
    Source code(zip)
  • v2021.8.20(Aug 22, 2021)

    • warning - disable un-ergonomic warnings restricting directive-global (missing_browser and unexpected_directive_a).
    • fs - rename file ci.sh to jslint_ci.sh.
    • license - add codemirror license to rollup-assets.
    • website - display number of warnings, properties, functions in report.
    • website - fix uiLoader getting hidden behind highlighted text.
    Source code(tar.gz)
    Source code(zip)
  • v2021.7.24(Jul 24, 2021)

    • bugfix - fix jslint not warning about function-redefinition when function is defined inside a call.
    • bugfix - fix website crashing when linting pure json-object.
    • ci - fix race-condition when inlining css.
    • doc - update README.md with links to archived web-demos.
    • jslint - add new beta-warning against redefining global-variables.
    • jslint - add new beta-warning if functions are unordered.
    • jslint - add new warning disallowing string-literal as property-name, e.g. {aa:0}.
    • jslint - comment out shebang in jslint.mjs so older ios devices can use website.
    • jslint - deprecate directive /*jslint eval*/ - use //jslint-quiet instead.
    • jslint-revamp - rearrange functions in jslint.mjs to comply with ordered-functions beta-warning.
    • jslint-revamp - revamp cause-based testing with more robust instrumentation.
    • tests - test artifact and column-position in warnings are correct.
    Source code(tar.gz)
    Source code(zip)
  • v2021.6.30(Jul 1, 2021)

    • breaking-change - rename files *.js to *.mjs for better integration with nodejs.
    • ci - auto-screenshot example-shell-commands in README.md.
    • ci - include explicit commonjs (jslint.cjs) and es-module (jslint.mjs) variants of jslint.
    • jslint - disable out-of-scope warning for functions.
    • jslint - reintroduce directive /*jslint indent2*/ - allow 2-space indent.
    • license - change license to public-domain/unlicense.
    • website - create codemirror-plugin to highlight jslint-warnings in editor.
    Source code(tar.gz)
    Source code(zip)
  • v2021.6.22(Jun 21, 2021)

    • bugfix - fix global_list being ignored by jslint.
    • bugfix - fix no-warning when exception in catch-block is unused.
    • ci - migrate ci-scripts from cjs to esm.
    • cli - add env-variable $JSLINT_BETA.
    • jslint - add new directive /*jslint beta*/ - enable features currently in beta.
    • jslint - add new directive /*jslint variable*/ - allow unordered variable-declarations that are not at top of function-scope.
    • jslint - add new warning if const/let/var statements are not declared at top of function-scope.
    • jslint - add new warning if const/let/var statements are unordered.
    • website - invalidate url-cache with each deployment.
    • website - replace .png logo with .svg logo.
    • website - replace current-editor with CodeMirror-editor and change programming-font-family from Programma to consolas, menlo, monospace.
    Source code(tar.gz)
    Source code(zip)
  • v2021.6.12(Jun 13, 2021)

    • bugfix - fix await expression/statement inside catch-statement not registered by functionage.await.
    • bugfix - fix cli appending slash "/" to normalized filename.
    • bugfix - fix issue #316, #317 - jslint complains about dynamic-import.
    • bugfix - fix misleading warning describing alphabetical-order instead of ascii-order.
    • bugfix - fix off-by-one-column bug in missing-semicolon-warning.
    • bugfix - fix try-catch-block complaining about "Unexpected await" inside async-function.
    • directive - re-introduce /*jslint name*/ to ignore "Bad property name" warning.
    • doc - add install-screenshots.
    • jslint - add new warning if case-statements are not sorted.
    • jslint - add warning for unexpected ? in example aa=/.{0}?/.
    • jslint - add warning for unexpected-expr in example async function aa(){await 0;}.
    • jslint-refactor-1 - make "stateful" variables scoped outside of jslint() "stateless" by moving them into jslint().
    • jslint-refactor-2 - inline constants anticondition, bitwiseop, escapeable, and opener directly into code.
    • jslint-refactor-3 - inline regexp-functions quantifier(), ranges(), klass(), choice(), directly into code.
    • jslint-refactor-4 - document jslint process and each recursion-loop converted to while-loop.
      • remove unnecessary variables nr.
      • rename artifact-related variables a, b to let artifact_now, artifact_nxt.
      • rename functions make() to token_create().
      • reorganize/rename "global" variables by topical-prefixes: artifact_xxx, export_xxx, from_xxx, import_xxx, line_xxx, mode_xxx, token_xxx
    • jslint-refactor-5 - split jslint-core-logic into 5-phases.
      • move phase-sub-functions out of function-jslint().
      • move global-vars into state-object, that can be passed between functions.
      • migrate recursive-loops to while-loops in sub-function phase2_lex().
      • move remaining global-vars into sub-functions or hardcode.
      • update functions artifact(), stop(), warn() with fallback-code the_token = the_token || state.token_nxt;.
    • website - add ui-loader-animation.
    Source code(tar.gz)
    Source code(zip)
  • v2021.6.3(Jun 3, 2021)

    • breaking-change - hardcode const fudge = 1
    • breaking-change - remove little-used-feature allowing jslint to accept array-of-strings as source b/c internal lines-object has been changed from array-of-strings to array-of-objects.
    • doc - add svg changelog.
    • doc - add svg package-listing.
    • doc - document cli-feature to jslint entire directory.
    • jslint - add eslint-like ignore-directives /*jslint-disable*/, /*jslint-enable*/, //jslint-quiet.
    • jslint - add new warning Directive /*jslint-disable*/ was not closed with /*jslint-enable*/..
    • jslint - add new warning Directive /*jslint-enable*/ was not opened with /*jslint-disable*/..
    • jslint - remove obsolete ie-era warning about duplicate names for caught-errors.
    • website - move options-ui to top of page after editor-ui
    Source code(tar.gz)
    Source code(zip)
  • v2021.5.30(May 30, 2021)

    • bugfix - fix issue #282 - fail to warn trailing semicolon in export default Object.freeze({}).
    • ci - 100% code-coverage!
    • ci - auto-update changelog in README.md from CHANGELOG.md.
    • ci - auto-update version numbers in README.md and jslint.js from CHANGELOG.md.
    • deadcode - replace with assertion-check in function choice() - if (char === "|") { warn... }.
    • deadcode - replace with assertion-check in function do_function() - if (mega_mode) { warn... }.
    • deadcode - replace with assertion-check in function no_space() - const at = (free ? ...).
    • deadcode - replace with assertion-check in function no_space() - if (open) {...}.
    • deadcode - replace with assertion-check in function parse_directive() - } else if (value === "false") {...}.
    • deadcode - replace with assertion-check in function supplant() - return ( replacement !== undefined ?...).
    • jslint - cleanup regexp code using switch-case-statements.
    • jslint - inline function activate into function action_var.
    • jslint - inline-document each deadcode-removal/assertion-check.
    • jslint - inline-document each warning with cause that can reproduce it - part 2.
    • tests - inline remaining causal-regressions from test.js into jslint.js
    • tests - validate inline-multi-causes are sorted.
    • website - replace links branch.xxx with branch-xxx.
    Source code(tar.gz)
    Source code(zip)
  • v2021.5.27(May 28, 2021)

    • ci - fix expectedWarningCode not being validated.
    • ci - in windows, disable git-autocrlf.
    • deadcode - replace with assertion-check in function are_similar() - "if (a === b) { return true }".
    • deadcode - replace with assertion-check in function are_similar() superseded by id-check - "if (Array.isArray(b)) { return false; }".
    • deadcode - replace with assertion-check in function are_similar() superseded by is_weird() check - "if (a.arity === "function" && a.arity ===...c".
    • jslint - add directive test_internal_error.
    • jslint - add directive unordered to tolerate unordered properties and params.
    • jslint - inline-document each warning with cause that can reproduce it - part 1.
    • style - refactor code moving infix-operators from post-position to pre-position in multiline statements.
    • website - add hotkey ctrl-enter to run jslint.
    Source code(tar.gz)
    Source code(zip)
  • v2021.5.26(May 26, 2021)

    • ci - fix ci silently failing in node-v12 and node-v14.
    • cli - add env var JSLINT_CLI to force-trigger cli in jslint.js (used for code-coverage of cli).
    • jslint - add "globalThis" to default globals.
    • jslint - add new rules unordered_param_a, unordered_property_a, that warn if parameters and properties are listed in nonascii-order.
    • jslint - fix bug where (global) functionage missing properties finally and try.
    • jslint - fix bug failing to parse unicode "\u{12345}".
    • jslint - fix bug falsely warning against conditional-chaining-operator "?.".
    • jslint - remove deadcode for preaction-binary-".".
    • jslint - remove deadcode warning bad_option_a.
    • website - add fork-me ribbon.
    • website - load index.html with example code.
    • website - merge file report.js into browser.js.
    Source code(tar.gz)
    Source code(zip)
  • v2021.5.23(May 24, 2021)

    v2021.5.23

    • doc - add section Changelog.
    • doc - update README.md with installation instructions.
    • cli - merge shell-function shJslintCli into jslint.js.
    • jslint - update default globals with support for "import".
    • jslint - sort warnings with higher priority for early_stop.
    • jslint - add async/await support.
    • ci - make branch-beta the default branch.
    • ci - validate non-http/file links in *.md files.
    • ci - add shell-functions shCiBranchPromote.
    Source code(tar.gz)
    Source code(zip)
  • v2021.5.21(May 21, 2021)

    v2021.5.21

    • this ci-release does not change any core-functionality of file jslint.js
    • doc - add file CHANGELOG.md
    • ci - begin addng regression tests and improve code-coverage.
    • ci - allow pull-requests to run restricted-ci (cannot upload artifacts).
    • gh-pages - fix missing assets and insecure http-links.
    • gh-pages - merge file jslint.css into index.html.
    • gh-pages - add files image-jslint-xxx.png.
    • gh-pages - cleanup asset naming-convention.
    • fix missing fonts in function.html and help.html.
    • add files .gitconfig, Daley-Bold.woff2, Programma-Bold.woff2, icon-folder-open-solid.svg, icon-window-maximize-regular.svg.
    • ci - fix http-links after moving to jslint-org.
    • doc - migrate file README to README.md with embedded ci links and screenshots.
    • ci - add macos and windows to ci-matrix.
    • ci - ci now fails if jslint-check fails for any of the files in branches.
    • ci - add github-workflows to generate code-coverage for jslint.js.
    Source code(tar.gz)
    Source code(zip)
  • v2020.11.6(May 19, 2021)

  • v2018.4.25(May 24, 2021)

  • v2017.11.6(May 24, 2021)

  • v2014.7.8(Jun 1, 2021)

  • v2013.3.13(May 24, 2021)

Owner
Douglas Crockford
I was born in Frostbite Falls, Minnesota. I left when I was 6 months old because it was too damn cold. My latest book is _How JavaScript Works_.
Douglas Crockford
Find and fix problems in your JavaScript code.

ESLint Website | Configuring | Rules | Contributing | Reporting Bugs | Code of Conduct | Twitter | Mailing List | Chat Room ESLint is a tool for ident

ESLint 21.8k Nov 28, 2022
🌟 JavaScript Style Guide, with linter & automatic code fixer

JavaScript Standard Style Sponsored by English • Español (Latinoamérica) • Français • Bahasa Indonesia • Italiano (Italian) • 日本語 (Japanese) • 한국어 (Ko

Standard JS 27.7k Nov 30, 2022
Prettier is an opinionated code formatter.

Opinionated Code Formatter JavaScript · TypeScript · Flow · JSX · JSON CSS · SCSS · Less HTML · Vue · Angular GraphQL · Markdown · YAML Your favorite

Prettier 44.3k Nov 22, 2022
Detect copy-pasted and structurally similar code

Detect copy-pasted and structurally similar JavaScript code. Requires Node.js 6.0+, and supports ES6, JSX as well as Flow. Note: the project has been

Daniel St. Jules 3.5k Nov 23, 2022
Pre-evaluate code at build-time with babel-macros

preval.macro This is a babel-plugin-macros macro for babel-plugin-preval. Please see those projects for more information. Installation This module is

Kent C. Dodds 117 Sep 24, 2022
For formatting, searching, and rewriting JavaScript.

jsfmt For formatting, searching, and rewriting JavaScript. Analogous to gofmt. Installation npm install -g jsfmt Usage $ jsfmt --help Usage: jsfmt [

Rdio 1.7k Nov 23, 2022
Magic number detection for JavaScript

Magic number detection for javascript. Let Buddy sniff out the unnamed numerical constants in your code. Overview What are magic numbers? Installation

Daniel St. Jules 825 Nov 13, 2022
Beautifier for javascript

JS Beautifier This little beautifier will reformat and re-indent bookmarklets, ugly JavaScript, unpack scripts packed by Dean Edward’s popular packer,

null 7.9k Nov 26, 2022
The JavaScript Code Quality Tool

JSLint, The JavaScript Code Quality Tool Douglas Crockford [email protected] 2019-03-15 jslint.js contains the jslint function. It parses and a

Douglas Crockford 3.5k Nov 28, 2022
High-quality QR Code generator library in Java, TypeScript/JavaScript, Python, Rust, C++, C.

QR Code generator library Introduction This project aims to be the best, clearest QR Code generator library in multiple languages. The primary goals a

Nayuki 3.2k Nov 26, 2022
WriterAI is an AI based content writing tool that helps users easily write high quality emails, blogs, letters, thesis and other stuff.

WriterAI is an AI based content writing tool that helps users easily write high quality emails, blogs, letters, thesis and other stuff. One can also share their project with others and work as a team.

Ishant Chauhan 53 Nov 20, 2022
Tina is an open source editor that brings visual editing into React websites. Tina empowers developers to give their teams a contextual and intuitive editing experience without sacrificing code quality.

Tina is an open-source toolkit for building content management directly into your website. Community Forum Getting Started Checkout the tutorial to ge

Tina 8.1k Nov 26, 2022
Tina is an open source editor that brings visual editing into React websites. Tina empowers developers to give their teams a contextual and intuitive editing experience without sacrificing code quality.

Tina is an open source editor that brings visual editing into React websites. Tina empowers developers to give their teams a contextual and intuitive editing experience without sacrificing code quality.

Tina 8.1k Nov 23, 2022
Shield is a development framework for circom developers. The core reason is to provide libraries, plugins, and testing tools to ensure code quality and security.

SHIELD Shield is a development framework for circom developers but we plan it to other languages such as CAIRO, SNARKYJS etc. The core reason is to pr

Xord 40 Nov 5, 2022
🌟 DataFormsJS 🌟 A minimal JavaScript Framework and standalone React and Web Components for rapid development of high quality websites and single page applications.

?? Welcome to DataFormsJS! Thanks for visiting! ?? ?? ?? ?? ?? ?? 中文 (简体) 欢迎来到 DataFormsJS Español Bienvenido a DataFormsJS Português (do Brasil) Bem

DataFormsJS 154 Nov 26, 2022
A high quality UI Toolkit built on Vue.js 2.0

iView A high quality UI Toolkit built on Vue.js. Docs 3.x | 2.x | 1.x Features Dozens of useful and beautiful components. Friendly API. It's made for

iView 24k Nov 26, 2022
Resize image in browser with high quality and high speed

pica - high quality image resize in browser Resize images in browser without pixelation and reasonably fast. Autoselect the best of available technolo

Nodeca 3.2k Nov 24, 2022
image/video/content slideshow engine providing high quality animation effects including Kenburns Effect and GLSL Transitions.

Diaporama Diaporama is an image/video/content slideshow engine providing high quality animation effects including Kenburns effect and GLSL Transitions

Gaëtan Renaudeau 797 Nov 26, 2022
DataSphereStudio is a one stop data application development& management portal, covering scenarios including data exchange, desensitization/cleansing, analysis/mining, quality measurement, visualization, and task scheduling.

English | 中文 Introduction DataSphere Studio (DSS for short) is WeDataSphere, a big data platform of WeBank, a self-developed one-stop data application

WeBankFinTech 2.4k Nov 30, 2022
A student-made, student-tailored Firefox add-on for Veracross. Provides ease of navigation in Veracross, among with other quality of life features. More features in progress.

Check out the Chrome version! This release is version 1.0.0, so the only feature it has is clickable links to the dropbox from the classpage. Any comm

Webb School CS Club 2 Mar 25, 2022