.jshintrc
author Simon Sapin <simon.sapin@octobus.net>
Fri, 10 Dec 2021 23:08:25 +0100
changeset 48455 04d756b7c0b5
parent 35162 bdd2e18b54c5
permissions -rw-r--r--
tests: add a short `sleep` in test-status.t With dirstate-v2 and rhg both enabled, this test would sometimes fail for me with: ``` --- tests/test-status.t +++ tests/test-status.t#dirstate-v2.err @@ -943,7 +943,7 @@ $ rm subdir/unknown $ hg status $ hg debugdirstate --all --no-dates | grep '^ ' - 0 -1 set subdir + 0 -1 unset subdir ``` Meaning that `status` did not write a directory mtime in the dirstate as expected. This can happen if the observed mtime of the directory is the same as "current time" at the start of `status`. This current time is obtained by creating a temporary file and checking its mtime. Even with ext4 on my system being able to store nanosecond precision, identical mtime for successive but separate operations is still possible becuse the kernel may cache the current time: https://stackoverflow.com/a/14393315/1162888 0.1 second should be enough for this cache to be updated, without significantly slowing down the test. Differential Revision: https://phab.mercurial-scm.org/D11900
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
35162
bdd2e18b54c5 hgweb: add .jshintrc with some basic rules
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
     1
{
bdd2e18b54c5 hgweb: add .jshintrc with some basic rules
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
     2
    // Enforcing
bdd2e18b54c5 hgweb: add .jshintrc with some basic rules
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
     3
    "eqeqeq"        : true,     // true: Require triple equals (===) for comparison
bdd2e18b54c5 hgweb: add .jshintrc with some basic rules
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
     4
    "forin"         : true,     // true: Require filtering for..in loops with obj.hasOwnProperty()
bdd2e18b54c5 hgweb: add .jshintrc with some basic rules
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
     5
    "freeze"        : true,     // true: prohibits overwriting prototypes of native objects such as Array, Date etc.
bdd2e18b54c5 hgweb: add .jshintrc with some basic rules
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
     6
    "nonbsp"        : true,     // true: Prohibit "non-breaking whitespace" characters.
bdd2e18b54c5 hgweb: add .jshintrc with some basic rules
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
     7
    "undef"         : true,     // true: Require all non-global variables to be declared (prevents global leaks)
bdd2e18b54c5 hgweb: add .jshintrc with some basic rules
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
     8
bdd2e18b54c5 hgweb: add .jshintrc with some basic rules
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
     9
    // Environments
bdd2e18b54c5 hgweb: add .jshintrc with some basic rules
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
    10
    "browser"       : true      // Web Browser (window, document, etc)
bdd2e18b54c5 hgweb: add .jshintrc with some basic rules
Anton Shestakov <av6@dwimlabs.net>
parents:
diff changeset
    11
}