Skip to content

Commit 39ac758

Browse files
author
Sergey Melyukov
committed
lint: revert reporter
1 parent bdd2423 commit 39ac758

File tree

2 files changed

+2
-30
lines changed

2 files changed

+2
-30
lines changed

lib/lint/index.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ function lint(config){
9999
unusedL10n.warn(flow);
100100
}
101101

102-
},
103-
function(flow){
104-
flow.result = require('./reporter/process-warns')(flow, options);
102+
flow.result = require('./reporter/process-warns')(flow.warns, options.filter);
105103
}
106104
]);
107105

lib/lint/reporter/process-warns.js

+1-27
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
var isChildProcess = typeof process.send == 'function'; // child process has send method
2-
3-
module.exports = function(flow, options){
1+
module.exports = function(warns, fileFilter){
42
var result = {};
5-
var warns = flow.warns;
6-
var fileFilter = options.filter;
73

84
warns.forEach(function(warn){
95
var filename = warn.file || '<UnknownFile>';
@@ -20,27 +16,5 @@ module.exports = function(flow, options){
2016
});
2117
});
2218

23-
if (!isChildProcess)
24-
{
25-
if (options.warnUnusedL10n && flow.usedL10nTokens)
26-
{
27-
var usedL10nTokensInfo = flow.usedL10nTokens;
28-
29-
for (var dictFileName in usedL10nTokensInfo.items){
30-
var tokenNames = usedL10nTokensInfo.items[dictFileName];
31-
32-
for (var tokenName in tokenNames) {
33-
if (!tokenNames[tokenName]) {
34-
result[dictFileName] = result[dictFileName] || [];
35-
result[dictFileName].push({
36-
loc: dictFileName,
37-
message: tokenName
38-
});
39-
}
40-
}
41-
}
42-
}
43-
}
44-
4519
return result;
4620
};

0 commit comments

Comments
 (0)