FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
atom/script/lib/lint-java-script-paths.js at master · feicc/atom · GitHub
feicc
/
atom
Public
forked from
atom/atom
Notifications
You must be signed in to change notification settings
Fork
1
Star
0
Code
Pull requests
53
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
atom
/
script
/
lib
/
lint-java-script-paths.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
33 lines (30 loc) · 1.03 KB
Breadcrumbs
atom
/
script
/
lib
/
lint-java-script-paths.js
Copy path
File metadata and controls
33 lines (30 loc) · 1.03 KB
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
'use strict'
const
expandGlobPaths
=
require
(
'./expand-glob-paths'
)
const
standard
=
require
(
'standard'
)
const
path
=
require
(
'path'
)
const
CONFIG
=
require
(
'../config'
)
module
.
exports
=
function
(
)
{
const
globPathsToLint
=
[
path
.
join
(
CONFIG
.
repositoryRootPath
,
'exports'
,
'**'
,
'*.js'
)
,
path
.
join
(
CONFIG
.
repositoryRootPath
,
'script'
,
'**'
,
'*.js'
)
,
path
.
join
(
CONFIG
.
repositoryRootPath
,
'src'
,
'**'
,
'*.js'
)
,
path
.
join
(
CONFIG
.
repositoryRootPath
,
'static'
,
'*.js'
)
]
return
expandGlobPaths
(
globPathsToLint
)
.
then
(
(
paths
)
=>
{
return
new
Promise
(
(
resolve
,
reject
)
=>
{
standard
.
lintFiles
(
paths
,
(
error
,
lintOutput
)
=>
{
if
(
error
)
{
reject
(
error
)
}
else
{
const
errors
=
[
]
for
(
let
result
of
lintOutput
.
results
)
{
for
(
let
message
of
result
.
messages
)
{
errors
.
push
(
{
path
:
result
.
filePath
,
lineNumber
:
message
.
line
,
message
:
message
.
message
,
rule
:
message
.
ruleId
}
)
}
}
resolve
(
errors
)
}
}
)
}
)
}
)
}
Back
|
FazBrowse Home
|
New Git URL