view .jshintrc @ 39291:9f097214fbf3

index: embed nodetree in index object to avoid reference cycle Since the index has a reference to a nodetree and the nodetree has a reference back to the index, there is a reference cycle, so the index (and its nodetree) can never be freed. This patch fixes that by making "nodetree" a plan C struct that the index can embed, and also introduces a new "nodetreeObject" that is a Python type wrapping the nodetree struct. Thanks to Yuya for noticing this and for suggesting the solution. All tests passed on the first attempt once it compiled (I guess C is like Haskell in this regard?). Differential Revision: https://phab.mercurial-scm.org/D4372
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 24 Aug 2018 08:45:18 -0700
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)
}