Skip to content

Commit

Permalink
tools: apply linting to custom rules code
Browse files Browse the repository at this point in the history
Apply our eslint rules to the code for our custom eslint rules.

Eslint Inception! Maybe. I never saw that movie...

PR-URL: #3195
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Roman Reiss <me@silverwind.io>
  • Loading branch information
Trott authored and jasnell committed Oct 8, 2015
1 parent 651a5b5 commit 5d9f83f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions tools/eslint-rules/require-buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
}
}
}
};
};
2 changes: 1 addition & 1 deletion vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5d9f83f

Please sign in to comment.