Download:
child 26:95a37a852387
parent 24:3e0e63bc7c93
25:e06dd8612ad9
Anton Shestakov <av6@dwimlabs.net>, Tue, 19 Jun 2018 13:25:01 +0800
jshint: add .jshintrc to enforce some extra checks

1 файлов изменено, 20 вставок(+), 0 удалений(-) [+]
.jshintrc file | annotate | diff | comparison | revisions
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.jshintrc Tue Jun 19 13:25:01 2018 +0800
@@ -0,0 +1,20 @@
+{
+ // Enforcing
+ "curly" : true, // true: Require {} for every new block or scope
+ "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.
+ "latedef" : true, // true: Require variables/functions to be defined before being used
+ "newcap" : true, // true: Require capitalization of all constructor functions e.g. `new F()`
+ "noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee`
+ "noempty" : true, // true: Prohibit use of empty blocks
+ "nonbsp" : true, // true: Prohibit "non-breaking whitespace" characters.
+ "nonew" : true, // true: Prohibit use of constructors for side-effects (without assignment)
+
+ // Environments
+ "browser" : true, // Web Browser (window, document, etc)
+ "jquery" : true, // jQuery
+
+ // Custom Globals
+ "globals" : {"_": false, "Backbone": false}
+}