@@ -18,13 +18,18 @@ var checks = require("../lib/checks");
1818
1919// a wrapper for emitting perf timing
2020function 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 ;
2424 console . error ( "eslint.timing." + name + ": " + duration + "s" ) ;
2525 return rv ;
2626}
2727
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+
2833function buildIssueJson ( message , path ) {
2934 // ESLint doesn't emit a ruleId in the
3035 // case of a fatal error (such as an invalid
@@ -60,11 +65,6 @@ function buildIssueJson(message, path) {
6065 return JSON . stringify ( issue ) ;
6166}
6267
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-
6868function isFileWithMatchingExtension ( file , extensions ) {
6969 var stats = fs . lstatSync ( file ) ;
7070 var extension = "." + file . split ( "." ) . pop ( ) ;
@@ -79,7 +79,7 @@ function isFileIgnoredByLibrary(file) {
7979 var path = file . replace ( / ^ \/ c o d e \/ / , "" ) ;
8080 var ignored = cli . isPathIgnored ( path ) ;
8181 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" ;
8383 process . stderr . write ( output ) ;
8484 }
8585 return ignored ;
@@ -94,7 +94,7 @@ function prunePathsWithinSymlinks(paths) {
9494 return paths . filter ( function ( path ) {
9595 var withinSymlink = false ;
9696 symlinks . forEach ( function ( symlink ) {
97- if ( path . indexOf ( symlink ) == 0 ) {
97+ if ( path . indexOf ( symlink ) === 0 ) {
9898 withinSymlink = true ;
9999 }
100100 } ) ;
@@ -193,10 +193,10 @@ var analysisFiles = runWithTiming("buildFileList", function() {
193193} ) ;
194194
195195function analyzeFiles ( ) {
196- var batchNum = 0 ,
197- batchSize = 1 ,
198- batchFiles ,
199- batchReport ;
196+ var batchNum = 0
197+ , batchSize = 1
198+ , batchFiles
199+ , batchReport ;
200200
201201 while ( analysisFiles . length > 0 ) {
202202 batchFiles = analysisFiles . splice ( 0 , batchSize ) ;
0 commit comments