File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ class Config {
46
46
} ,
47
47
entryExtNames : {
48
48
css : [ '.css' ] ,
49
- js : [ ]
49
+ js : [ '.js' ]
50
50
} ,
51
51
requireRules : [
52
52
'node_modules|package.json:main|index.js'
Original file line number Diff line number Diff line change @@ -145,10 +145,14 @@ class Project {
145
145
warn ( 'Lint JS Files ......' ) ;
146
146
this . eslintConfig . useEslintrc = false ;
147
147
148
- const jsPath = sysPath . join ( this . config . _config . context , '/**/*.js' ) ,
149
- cli = new CLIEngine ( this . eslintConfig ) ,
148
+ const jsExtNames = this . config . _config . entryExtNames . js ,
149
+ jsLintPath = jsExtNames . map ( ( jsExt ) => {
150
+ return sysPath . join ( this . config . _config . context , '/**/*' + jsExt )
151
+ } ) ;
152
+
153
+ const cli = new CLIEngine ( this . eslintConfig ) ,
150
154
report = cli . executeOnFiles (
151
- globby . sync ( jsPath , {
155
+ globby . sync ( jsLintPath , {
152
156
cwd : this . cwd
153
157
} )
154
158
. filter (
You can’t perform that action at this time.
0 commit comments