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 <thechargingvolcano@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Roman Reiss <me@silverwind.io>
This commit is contained in:
parent
e655a437b3
commit
dbce29a3ac
3
Makefile
3
Makefile
@ -505,7 +505,8 @@ bench-idle:
|
|||||||
$(NODE) benchmark/idle_clients.js &
|
$(NODE) benchmark/idle_clients.js &
|
||||||
|
|
||||||
jslint:
|
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 ?=
|
||||||
CPPLINT_EXCLUDE += src/node_lttng.cc
|
CPPLINT_EXCLUDE += src/node_lttng.cc
|
||||||
|
@ -8,9 +8,9 @@ module.exports = function(context) {
|
|||||||
'Program:exit': function() {
|
'Program:exit': function() {
|
||||||
context.getScope().through.forEach(function(ref) {
|
context.getScope().through.forEach(function(ref) {
|
||||||
if (ref.identifier.name === 'Buffer') {
|
if (ref.identifier.name === 'Buffer') {
|
||||||
context.report(ref.identifier, msg);
|
context.report(ref.identifier, msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
|
@ -246,7 +246,7 @@ goto jslint
|
|||||||
:jslint
|
:jslint
|
||||||
if not defined jslint goto exit
|
if not defined jslint goto exit
|
||||||
echo running jslint
|
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
|
goto exit
|
||||||
|
|
||||||
:create-msvs-files-failed
|
:create-msvs-files-failed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user