From: Rich Trott Date: Mon, 5 Oct 2015 21:59:36 +0000 (-0700) Subject: tools: apply linting to custom rules code X-Git-Tag: v4.2.0~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d9f83ff2a47e64d372640265f63bf4a33e05566;p=platform%2Fupstream%2Fnodejs.git tools: apply linting to custom rules code Apply our eslint rules to the code for our custom eslint rules. Eslint Inception! Maybe. I never saw that movie... PR-URL: https://github.com/nodejs/node/pull/3195 Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Ben Noordhuis Reviewed-By: Roman Reiss --- diff --git a/Makefile b/Makefile index c99f6c2..1d8b89b 100644 --- a/Makefile +++ b/Makefile @@ -505,7 +505,8 @@ bench-idle: $(NODE) benchmark/idle_clients.js & jslint: - $(NODE) tools/eslint/bin/eslint.js src lib test --rulesdir tools/eslint-rules --reset --quiet + $(NODE) tools/eslint/bin/eslint.js src lib test tools/eslint-rules \ + --rulesdir tools/eslint-rules --reset --quiet CPPLINT_EXCLUDE ?= CPPLINT_EXCLUDE += src/node_lttng.cc diff --git a/tools/eslint-rules/require-buffer.js b/tools/eslint-rules/require-buffer.js index 7a975df..4fec765 100644 --- a/tools/eslint-rules/require-buffer.js +++ b/tools/eslint-rules/require-buffer.js @@ -8,9 +8,9 @@ module.exports = function(context) { 'Program:exit': function() { context.getScope().through.forEach(function(ref) { if (ref.identifier.name === 'Buffer') { - context.report(ref.identifier, msg); + context.report(ref.identifier, msg); } }); } - } -} + }; +}; diff --git a/vcbuild.bat b/vcbuild.bat index 99d44ba..10beee5 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -246,7 +246,7 @@ goto jslint :jslint if not defined jslint goto exit echo running jslint -%config%\node tools\eslint\bin\eslint.js src lib test --rulesdir tools\eslint-rules --reset --quiet +%config%\node tools\eslint\bin\eslint.js src lib test tools\eslint-rules --rulesdir tools\eslint-rules --reset --quiet goto exit :create-msvs-files-failed