view .jshintrc @ 38162:bdf344aea0ee

extensions: peek command table of disabled extensions without importing With chg where demandimport disabled, and if disk cache not warm, it took more than 5 seconds to get "unknown command" error when you typo a command name. This is horrible UX. The new implementation is less accurate than the original one as Python can do anything at import time and cmdtable may be imported from another module, but I think it's good enough. Note that the new implementation has to parse .py files, which is slightly slower than executing .pyc if demandimport is enabled.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 03 May 2018 18:38:02 +0900
parents bdd2e18b54c5
children
line wrap: on
line source

{
    // Enforcing
    "eqeqeq"        : true,     // true: Require triple equals (===) for comparison
    "forin"         : true,     // true: Require filtering for..in loops with obj.hasOwnProperty()
    "freeze"        : true,     // true: prohibits overwriting prototypes of native objects such as Array, Date etc.
    "nonbsp"        : true,     // true: Prohibit "non-breaking whitespace" characters.
    "undef"         : true,     // true: Require all non-global variables to be declared (prevents global leaks)

    // Environments
    "browser"       : true      // Web Browser (window, document, etc)
}