.jshintrc
author Matt Harbison <matt_harbison@yahoo.com>
Wed, 08 Apr 2020 17:30:10 -0400
changeset 44717 3dc6a70779f2
parent 35162 bdd2e18b54c5
permissions -rw-r--r--
phabricator: add an option to fold several commits into one review (issue6244) Now that all of the pieces are in place, alter the user facing command to allow it. This is the default behavior when using `arc`, but I much prefer the 1:1 approach, and I'm tempted to mark this advanced to limit its abuse. I started out calling this `--no-stack` like the feature request suggested, but I found it less obvious (especially when writing the code), so I went with the `hg fold` analogue. This will populate the `Commits` tab in the web UI with the hash of each commit folded into the review. From experimentation, it seems to list them in the order they are received from the extension instead of the actual parent/child relationship. The extension sends them in sorted order, thanks to `templatefilters.json()`. Since there's enough info there for them to put things in the right order, JSON is unordered aside from lists (IIUC), and there doesn't seem to be any harmful side effects, I guess we write this off as their bug. It is simple enough to workaround by putting a check for `util.sortdict` into `templatefilters.json()`, and don't resort in that case. There are a handful of restrictions that are documented in the code, which somebody could probably fix if they're interested. Notably, this requires the (default) `--amend` option, because there's not an easy way to apply a local tag across several commits. This also doesn't do preflight checking to ensure that all previous commits that were part of a single review are selected when updating. That seems expensive. What happens is the excluded commit is dropped from the review, but it keeps the Differential Revision line in the commit message. Not everything can be edited, so it doesn't seem worth making the code even more complicated to handle this edge case. There are a couple of "obsolete feature not enabled but X markers found!" messages that appeared on Windows but not macOS. I have no idea what's going on here, but that's an unrelated issue, so I conditionalized those lines. Differential Revision: https://phab.mercurial-scm.org/D8314
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
}