From 5b6b0c132aff0f1f28e2f8f6b55ff5646a99a534 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Mon, 6 Nov 2017 22:53:40 +0000 Subject: [PATCH] clean up Gruntfile to be more consistent --- .jshintrc | 1 + Gruntfile.js | 14 ++++++++++++-- package.json | 4 ++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.jshintrc b/.jshintrc index 2ebff4ff..81998b32 100644 --- a/.jshintrc +++ b/.jshintrc @@ -12,6 +12,7 @@ //"unused": true, // Check for unused functions and variables "loopfunc": true, // allow functions to be defined in loops //"expr": true, // allow ternery operator syntax... + "shadow": true, // allow variable shadowing (re-use of names...) "sub": true, // don't warn that foo['bar'] should be written as foo.bar "proto": true, // allow setting of __proto__ in node < v0.12 "esversion": 6 // allow es6 diff --git a/Gruntfile.js b/Gruntfile.js index 168df1e4..c67e8bf8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -17,10 +17,20 @@ module.exports = function(grunt) { }, jshint: { options: { - jshintrc:".jshintrc", // Use external file + jshintrc:true // Use external jshinrc file configured as below + // http://www.jshint.com/docs/options/ + //"asi": true, // allow missing semicolons + //"curly": true, // require braces + //"eqnull": true, // ignore ==null + //"forin": true, // require property filtering in "for in" loops + //"immed": true, // require immediate functions to be wrapped in ( ) + //"nonbsp": true, // warn on unexpected whitespace breaking chars + ////"strict": true, // commented out for now as it causes 100s of warnings, but want to get there eventually + //"loopfunc": true, // allow functions to be defined in loops + //"sub": true // don't warn that foo['bar'] should be written as foo.bar }, all: { - src: ['*/*.js','*/*/*.js'], + src: ['*/*/*.js'], filter: function(filepath) { // on some developer machines the test coverage HTML report utilities cause further failures if ((filepath.indexOf("coverage/") !== -1) || (filepath.indexOf("node_modules") !== -1)) { console.log( "\033[30m filtered out \033[32m:\033[37m " + filepath + "\033[0m"); diff --git a/package.json b/package.json index ed8d617e..8ccf535b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-red-nodes", - "version": "0.0.9", + "version": "0.0.10", "description": "Node-RED-nodes package to hold the test framework ONLY - use npm to install individual nodes", "homepage": "http://nodered.org", "license": "Apache-2.0", @@ -20,7 +20,7 @@ } ], "keywords": [ - "Node-RED", + "node-red", "nodes", "iot", "ibm",