@@ -144,9 +144,11 @@ class Project {
144
144
lint ( callback ) {
145
145
warn ( 'Lint JS Files ......' ) ;
146
146
this . eslintConfig . useEslintrc = false ;
147
- let cli = new CLIEngine ( this . eslintConfig ) ,
147
+
148
+ const jsPath = sysPath . join ( this . config . _config . context , '/**/*.js' ) ,
149
+ cli = new CLIEngine ( this . eslintConfig ) ,
148
150
report = cli . executeOnFiles (
149
- globby . sync ( 'src/**/*.js' , {
151
+ globby . sync ( jsPath , {
150
152
cwd : this . cwd
151
153
} )
152
154
. filter (
@@ -159,9 +161,15 @@ class Project {
159
161
}
160
162
lintCss ( callback ) {
161
163
warn ( 'Lint CSS Files ......' ) ;
164
+
165
+ const cssExtNames = this . config . _config . entryExtNames . css ,
166
+ cssLintPath = cssExtNames . map ( ( cssExt ) => {
167
+ return sysPath . join ( this . config . _config . context , '/**/*' + cssExt )
168
+ } ) ;
169
+
162
170
let config = {
163
171
config : this . stylelintConfig ,
164
- files : globby . sync ( [ 'src/**/*.css' , 'src/**/*.sass' , 'src/**/*.scss' ] , {
172
+ files : globby . sync ( cssLintPath , {
165
173
cwd : this . cwd
166
174
} )
167
175
. filter (
@@ -170,6 +178,7 @@ class Project {
170
178
syntax : 'scss' ,
171
179
formatter : 'verbose'
172
180
} ;
181
+
173
182
if ( config . files . length ) {
174
183
stylelint . lint ( config ) . then ( function ( data ) {
175
184
if ( data . errored ) {
0 commit comments