Przeglądaj źródła

jshint: directive to ignore generated parser.js

Herbert Vojčík 7 lat temu
rodzic
commit
46bce5ee0e
4 zmienionych plików z 4 dodań i 3 usunięć
  1. 1 1
      Gruntfile.js
  2. 1 1
      internal/grunt-tasks/grunt-peg.js
  3. 1 1
      package.json
  4. 1 0
      support/parser.js

+ 1 - 1
Gruntfile.js

@@ -142,7 +142,7 @@ module.exports = function (grunt) {
         },
 
         jshint: {
-            amber: ['src/*.js', 'support/[^p]*.js'],
+            amber: ['src/*.js', 'support/*.js'],
             cli: ['external/amber-cli/src/*.js', 'external/amber-cli/support/*.js'],
             dev: ['external/amber-dev/lib/*.js'],
             grunt: ['Gruntfile.js', 'internal/grunt-tasks/*.js', 'external/amber-dev/tasks/*.js']

+ 1 - 1
internal/grunt-tasks/grunt-peg.js

@@ -18,7 +18,7 @@ module.exports = function (grunt) {
             export_var: 'module.exports'
         });
         var parser = PEG.buildParser(grunt.file.read(this.data.src), options);
-        var content = "define(['./boot'], function($boot) {\nvar $globals = $boot.globals;\n" + options.export_var + " = " + parser + ";\n});";
+        var content = "// jshint ignore:start\ndefine(['./boot'], function($boot) {\nvar $globals = $boot.globals;\n" + options.export_var + " = " + parser + ";\n});";
         grunt.file.write(this.data.dest, content);
     });
 };

+ 1 - 1
package.json

@@ -24,7 +24,7 @@
     "node": "0.10.x || 0.12.x || >=4.0.0"
   },
   "strings": {
-    "buildParserBegin": "define(['./boot'], function($boot) {\nvar $globals = $boot.globals;\n",
+    "buildParserBegin": "// jshint ignore:start\ndefine(['./boot'], function($boot) {\nvar $globals = $boot.globals;\n",
     "buildParserEnd": "});"
   },
   "scripts": {

+ 1 - 0
support/parser.js

@@ -1,3 +1,4 @@
+// jshint ignore:start
 define(['./boot'], function($boot) {
 var $globals = $boot.globals;
 $globals.SmalltalkParser = (function() {