@@ -18,13 +18,18 @@ var checks = require("../lib/checks");
18
18
19
19
// a wrapper for emitting perf timing
20
20
function runWithTiming ( name , fn ) {
21
- var start = new Date ( ) ,
22
- rv = fn ( ) ,
23
- duration = ( new Date ( ) - start ) / 1000 ;
21
+ var start = new Date ( )
22
+ , rv = fn ( )
23
+ , duration = ( new Date ( ) - start ) / 1000 ;
24
24
console . error ( "eslint.timing." + name + ": " + duration + "s" ) ;
25
25
return rv ;
26
26
}
27
27
28
+ function contentBody ( check ) {
29
+ var content = docs . get ( check ) || "For more information visit " ;
30
+ return content + "Source: http://eslint.org/docs/rules/\n" ;
31
+ }
32
+
28
33
function buildIssueJson ( message , path ) {
29
34
// ESLint doesn't emit a ruleId in the
30
35
// case of a fatal error (such as an invalid
@@ -60,11 +65,6 @@ function buildIssueJson(message, path) {
60
65
return JSON . stringify ( issue ) ;
61
66
}
62
67
63
- function contentBody ( check ) {
64
- var content = docs . get ( check ) || "For more information visit " ;
65
- return content + "Source: http://eslint.org/docs/rules/\n" ;
66
- }
67
-
68
68
function isFileWithMatchingExtension ( file , extensions ) {
69
69
var stats = fs . lstatSync ( file ) ;
70
70
var extension = "." + file . split ( "." ) . pop ( ) ;
@@ -79,7 +79,7 @@ function isFileIgnoredByLibrary(file) {
79
79
var path = file . replace ( / ^ \/ c o d e \/ / , "" ) ;
80
80
var ignored = cli . isPathIgnored ( path ) ;
81
81
if ( ignored ) {
82
- output = "File `" + path + "` ignored because of your .eslintignore file." + "\n" ;
82
+ var output = "File `" + path + "` ignored because of your .eslintignore file." + "\n" ;
83
83
process . stderr . write ( output ) ;
84
84
}
85
85
return ignored ;
@@ -94,7 +94,7 @@ function prunePathsWithinSymlinks(paths) {
94
94
return paths . filter ( function ( path ) {
95
95
var withinSymlink = false ;
96
96
symlinks . forEach ( function ( symlink ) {
97
- if ( path . indexOf ( symlink ) == 0 ) {
97
+ if ( path . indexOf ( symlink ) === 0 ) {
98
98
withinSymlink = true ;
99
99
}
100
100
} ) ;
@@ -193,10 +193,10 @@ var analysisFiles = runWithTiming("buildFileList", function() {
193
193
} ) ;
194
194
195
195
function analyzeFiles ( ) {
196
- var batchNum = 0 ,
197
- batchSize = 1 ,
198
- batchFiles ,
199
- batchReport ;
196
+ var batchNum = 0
197
+ , batchSize = 1
198
+ , batchFiles
199
+ , batchReport ;
200
200
201
201
while ( analysisFiles . length > 0 ) {
202
202
batchFiles = analysisFiles . splice ( 0 , batchSize ) ;
0 commit comments