Submitter | Anton Shestakov |
---|---|
Date | Nov. 27, 2017, 9:28 a.m. |
Message ID | <b451907941e8ccf8be9a.1511774894@neuro> |
Download | mbox | patch |
Permalink | /patch/25769/ |
State | Accepted |
Headers | show |
Comments
On Mon, Nov 27, 2017 at 05:28:14PM +0800, Anton Shestakov wrote: > # HG changeset patch > # User Anton Shestakov <av6@dwimlabs.net> > # Date 1511360286 -28800 > # Wed Nov 22 22:18:06 2017 +0800 > # Node ID b451907941e8ccf8be9a09ee72c0fe66733d6bee > # Parent b95d29f0e64c433c40ec23ad415f848d3c77429b > # EXP-Topic hgweb-cleanup > hgweb: add .jshintrc with some basic rules queued, thanks
Patch
diff --git a/.jshintrc b/.jshintrc new file mode 100644 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,11 @@ +{ + // 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) +} diff --git a/tests/test-check-code.t b/tests/test-check-code.t --- a/tests/test-check-code.t +++ b/tests/test-check-code.t @@ -44,6 +44,7 @@ Prevent adding new files in the root dir .hgignore .hgsigs .hgtags + .jshintrc CONTRIBUTING CONTRIBUTORS COPYING