FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
nodegit/util/nodejshint.js at v0.0.75 · nodegit/nodegit · GitHub
nodegit
nodegit
Repository navigation
Code
Issues
344
(344)
Pull requests
21
(21)
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
nodegit
/
util
/
nodejshint.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
37 lines (31 loc) · 881 Bytes
Breadcrumbs
nodegit
/
util
/
nodejshint.js
Copy path
File metadata and controls
37 lines (31 loc) · 881 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
var
JSHINT
=
require
(
'./jshint.js'
)
.
JSHINT
,
fs
=
require
(
'fs'
)
;
var
nodejshint
=
function
(
)
{
var
counter
=
0
;
return
function
(
files
,
callback
)
{
if
(
files
.
length
)
{
var
file
=
files
.
pop
(
)
;
fs
.
readFile
(
file
,
function
(
err
,
data
)
{
if
(
err
)
{
throw
err
;
}
if
(
JSHINT
(
data
.
toString
(
)
,
{
laxbreak
:
true
}
)
)
{
counter
++
;
console
.
log
(
'[32m✔ Passed [0m'
+
file
)
;
}
else
{
console
.
log
(
'[31mx Failed [0m'
+
file
)
;
JSHINT
.
errors
.
forEach
(
function
(
err
)
{
if
(
err
)
{
console
.
log
(
'[31mline '
+
err
.
line
+
'\t'
,
err
.
reason
+
'[0m'
)
;
}
}
)
;
}
return
nodejshint
(
files
,
callback
)
;
}
)
;
}
else
{
callback
&&
callback
(
counter
)
;
counter
=
0
;
}
}
;
}
(
)
;
exports
.
test
=
nodejshint
;
Back
|
FazBrowse Home
|
New Git URL