Permalink
Browse files

processing jshint modifications to codebase, includes jshint integrat…

…ion with Gruntfile test task, adds new quality taskthat includes jsbeautify
  • Loading branch information...
1 parent 12cbd6f commit 248f3939665809d9d5c8c0066a0ec57f8b7e1752 Stan Carrico committed with shcarrico Jan 20, 2014
Showing with 34,191 additions and 37,980 deletions.
  1. +30 −0 .jsbeautifyrc
  2. +44 −44 .jshintrc
  3. +25 −5 Gruntfile.js
  4. +247 −254 component/component.js
  5. +669 −858 component/component_test.js
  6. +19 −16 component/examples/grid.js
  7. +138 −163 compute/compute.js
  8. +102 −143 compute/compute_test.js
  9. +149 −183 construct/construct.js
  10. +101 −135 construct/construct_test.js
  11. +23 −28 construct/proxy/proxy.js
  12. +26 −42 construct/proxy/proxy_test.js
  13. +32 −41 construct/super/super.js
  14. +58 −72 construct/super/super_test.js
  15. +420 −388 control/modifier/key/key.js
  16. +15 −22 control/modifier/key/key_test.js
  17. +43 −46 control/modifier/modifier.js
  18. +66 −70 control/modifier/modifier_test.js
  19. +212 −224 control/plugin/plugin.js
  20. +63 −62 control/plugin/plugin_test.js
  21. +1 −1 control/route/demo.html
  22. +12 −20 control/route/route.js
  23. +62 −80 control/route/route_test.js
  24. +10 −18 control/view/test/view_test.js
  25. +34 −44 control/view/view.js
  26. +783 −784 list/list.js
  27. +168 −175 list/list_test.js
  28. +353 −376 map/attributes/attributes.js
  29. +618 −672 map/attributes/attributes_test.js
  30. +25 −40 map/backup/backup.js
  31. +88 −137 map/backup/backup_test.js
  32. +120 −138 map/delegate/delegate.js
  33. +202 −233 map/delegate/delegate_test.js
  34. +22 −38 map/list/list.js
  35. +73 −106 map/list/list_test.js
  36. +20 −18 map/map_benchmark.js
  37. +67 −74 map/setter/setter.js
  38. +60 −68 map/setter/setter_test.js
  39. +151 −163 map/sort/sort.js
  40. +120 −105 map/sort/sort_test.js
  41. +55 −74 map/validations/validations.js
  42. +341 −287 map/validations/validations_test.js
  43. +195 −220 model/cached/cached.js
  44. +119 −126 model/cached/cached_test.js
  45. +245 −368 model/list/list.js
  46. +354 −415 model/list/list_test.js
  47. +64 −80 model/local/local.js
  48. +1,118 −1,178 model/model_test.js
  49. +61 −65 model/queue/queue.js
  50. +165 −197 model/queue/queue_test.js
  51. +277 −346 model/store/store.js
  52. +158 −184 model/store/store_test.js
  53. +63 −90 model/test/associations_test.js
  54. +1 −1 observe/observe.js
  55. +1,224 −1,359 observe/observe_test.js
  56. +3 −1 package.json
  57. +0 −1 route/demo.html
  58. +0 −1 route/pushstate/demo.html
  59. +127 −127 route/pushstate/pushstate.js
  60. +2 −3 route/route.html
  61. +283 −316 route/route.js
  62. +559 −532 route/route_test.js
  63. +1 −1 util/all.js
  64. +12 −15 util/array/each.js
  65. +7 −8 util/array/makeArray.js
  66. +43 −44 util/batch/batch.js
  67. +15 −21 util/bind/bind.js
  68. +14 −14 util/can.js
  69. +96 −112 util/deferred.js
  70. +332 −386 util/demos/observer.js
  71. +37 −38 util/destroyed.js
  72. +15,571 −16,993 util/dojo/dojo-1.8.1.js
  73. +270 −308 util/dojo/dojo.js
  74. +483 −501 util/dojo/nodelist-traverse.js
  75. +153 −152 util/dojo/trigger.js
  76. +106 −124 util/event.js
  77. +124 −161 util/event/event_test.js
  78. +407 −424 util/fixture/fixture_test.js
  79. +19 −28 util/fragment.js
  80. +27 −28 util/func.js
  81. +36 −57 util/function/function.js
  82. +0 −52 util/handlers.js
  83. +12 −14 util/hashchange.js
  84. +32 −29 util/inserted/inserted.js
  85. +12 −19 util/inserted/inserted_test.js
  86. +80 −91 util/jquery/jquery.js
  87. +0 −209 util/json.js
  88. +2 −2 util/library.js
  89. +185 −216 util/mootools/mootools.js
  90. +11 −19 util/object/isplain/isplain.js
  91. +29 −47 util/object/isplain/isplain_test.js
  92. +193 −228 util/object/object.js
  93. +128 −103 util/object/object_test.js
  94. +17 −21 util/string/classize.js
  95. +16 −27 util/string/deparam/deparam.js
  96. +32 −41 util/string/deparam/deparam_test.js
  97. +6 −17 util/string/rsplit/rsplit.js
  98. +36 −101 util/string/string.js
  99. +322 −238 util/string/string_test.js
  100. +2 −2 util/util.js
  101. +1 −3 util/util_test.js
  102. +177 −204 util/yui/yui.js
  103. +126 −139 util/zepto/zepto.js
  104. +23 −26 util/zepto/zepto_test.js
  105. +121 −111 view/bindings/bindings.js
  106. +100 −149 view/bindings/bindings_test.js
  107. +0 −1 view/ejs/demo.html
  108. +64 −77 view/ejs/ejs.js
  109. +0 −1 view/ejs/test/demo.html
  110. +13 −12 view/ejs/test/foo.js
  111. +88 −96 view/elements.js
  112. +178 −316 view/live/live.js
  113. +155 −221 view/live/live_test.js
  114. +186 −202 view/modifiers/modifiers.js
  115. +65 −64 view/modifiers/modifiers_test.js
  116. +2,022 −2,003 view/mustache/mustache.js
  117. +109 −120 view/node_lists/node_lists.js
  118. +28 −57 view/node_lists/node_lists_test.js
  119. +405 −404 view/scope/scope.js
  120. +178 −210 view/scope/scope_test.js
  121. +0 −12 view/test/compression/compression.html
  122. +0 −13 view/test/compression/compression.js
  123. +0 −51 view/test/compression/run.js
  124. 0 view/test/compression/views/keep.me
  125. +0 −3 view/test/compression/views/test.ejs
  126. +399 −537 view/view_test.js
View
@@ -0,0 +1,30 @@
+{
+ "html": {
+ "braceStyle": "collapse",
+ "indentWithTabs": true,
+ "indentScripts": "keep",
+ "maxPreserveNewlines": 10,
+ "preserveNewlines": true,
+ "unformatted": ["a", "sub", "sup", "b", "i", "u"],
+ "wrapLineLength": 0
+ },
+ "css": {
+ "indentWithTabs": true
+ },
+ "js": {
+ "braceStyle": "expanded",
+ "breakChainedMethods": true,
+ "e4x": false,
+ "evalCode": false,
+ "indentLevel": 0,
+ "indentWithTabs": true,
+ "jslintHappy": true,
+ "keepFunctionIndentation": false,
+ "maxPreserveNewlines": 2,
+ "preserveNewlines": true,
+ "spaceBeforeConditional": true,
+ "spaceInParen": false,
+ "unescapeStrings": false,
+ "wrapLineLength": 0
+ }
+}
View
@@ -1,54 +1,54 @@
{
- "predef" : [
-
- // Bitovi Tools
- "steal",
- "can",
-
- // Supported Libs
- "jQuery",
- "$",
- "$$",
- "DOJO",
- "YUI",
- "Zepto",
-
- // QUnit API
- // http://docs.jquery.com/QUnit#API_documentation
- "QUnit",
- "test",
- "asyncTest",
- "expect",
- "module",
- "ok",
- "equal",
- "notEqual",
- "deepEqual",
- "notDeepEqual",
- "strictEqual",
- "notStrictEqual",
- "raises",
- "start",
- "stop",
-
- // Node.js and CommonJS keywords
- "define",
- "require",
- "__dirname"
-
- ],
+ "globals": {
+
+ "steal": true,
+ "can": true,
+
+
+ "Zepto": true,
+
+
+ "QUnit": true,
+ "test": true,
+ "asyncTest": true,
+ "expect": true,
+ "module": true,
+ "ok": true,
+ "equal": true,
+ "notEqual": true,
+ "deepEqual": true,
+ "notDeepEqual": true,
+ "strictEqual": true,
+ "notStrictEqual": true,
+ "raises": true,
+ "start": true,
+ "stop": true
+ },
+
- "browser": true,
"curly": true,
- "eqnull": true,
"eqeqeq": true,
- "expr": true,
+ "freeze": true,
+ "indent": 2,
"latedef": true,
"noarg": true,
- "smarttabs": true,
"undef": true,
- "boss": true,
- "evil": true
+ "unused": "vars",
+ "trailing": true,
+ "maxdepth": 4,
+ "boss" : true,
+ "eqnull": true,
+ "evil": true,
+ "loopfunc": true,
+ "smarttabs": true,
+ "maxerr" : 200,
+ "jquery": true,
+ "dojo": true,
+ "mootools": true,
+ "yui": true,
+ "browser": true,
+ "phantom": true,
+ "rhino": true
}
View
@@ -1,3 +1,4 @@
+/*global __dirname */
var path = require('path');
// Returns mappings for AMDify
var getAmdifyMap = function (baseName) {
@@ -8,7 +9,7 @@ var getAmdifyMap = function (baseName) {
amdifyMap['can/can'] = 'can';
return amdifyMap;
-}
+};
module.exports = function (grunt) {
var _ = grunt.util._;
@@ -69,7 +70,7 @@ module.exports = function (grunt) {
options: function (config) {
return {
dist: 'can.' + config
- }
+ };
}
}
},
@@ -282,20 +283,39 @@ module.exports = function (grunt) {
tagName: 'v<%= version %>'
}
},
- publish: {}
+ publish: {},
+ jshint: {
+ options: {
+ jshintrc: true
+ },
+ lib: [
+ 'component/**/*.js', 'compute/**/*.js', 'construct/**/*.js', 'control/**/*.js', 'list/**/*.js',
+ 'map/**/*.js', 'model/**/*.js', 'observe/**/*.js','route/**/*.js', 'util/**/*.js','view/**/*.js',
+ '!util/dojo/dojo-1.8.1.js', '!util/dojo/nodelist-traverse.js'
+ ]
+ },
+ jsbeautifier: {
+ files: '<%= jshint.lib %>',
+ options: {
+ config: ".jsbeautifyrc"
+ }
+ }
});
- grunt.loadNpmTasks('grunt-string-replace');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-clean');
+ grunt.loadNpmTasks('grunt-contrib-jshint');
+ grunt.loadNpmTasks('grunt-string-replace');
grunt.loadNpmTasks('grunt-release-steps');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('bitovi-tools');
+ grunt.loadNpmTasks('grunt-jsbeautifier');
+ grunt.registerTask('quality', [ 'jsbeautifier', 'jshint']);
grunt.registerTask('build', ['clean:build', 'builder', 'amdify', 'stealify', 'uglify', 'string-replace:version']);
- grunt.registerTask('test', ['connect', 'build', 'testify', 'qunit']);
+ grunt.registerTask('test', ['jshint', 'connect', 'build', 'testify', 'qunit']);
grunt.registerTask('default', ['build']);
};
Oops, something went wrong.

0 comments on commit 248f393

Please sign in to comment.