From 5d9f83ff2a47e64d372640265f63bf4a33e05566 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 5 Oct 2015 14:59:36 -0700 Subject: [PATCH] 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 --- Makefile | 3 ++- tools/eslint-rules/require-buffer.js | 6 +++--- vcbuild.bat | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index c99f6c21f830ac..1d8b89b65b60c4 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 7a975df58a608f..4fec765d7e9a18 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 99d44ba273e047..10beee50821e55 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