@@ -99,7 +99,7 @@ function mergeOptions(options) {
9999 if ( typeof beforeLint === 'function' ) {
100100 css = beforeLint ( css , filename , merged ) ;
101101 }
102- return lintImportedFiles ( merged ) ( css , filename ) ;
102+ return lintImportedFiles ( merged , css , filename ) ;
103103 } ;
104104
105105 // Allow additional plugins to be merged with the defaults
@@ -119,18 +119,16 @@ function mergeOptions(options) {
119119 * @param {Object } options
120120 * @returns {Function } Used by postcss-import transform
121121 */
122- function lintImportedFiles ( options ) {
123- return function ( css , filename ) {
124- var processor = postcss ( ) ;
122+ function lintImportedFiles ( options , css , filename ) {
123+ var processor = postcss ( ) ;
125124
126- if ( options . lint ) {
127- processor . use ( stylelint ( options . stylelint ) ) ;
128- }
125+ if ( options . lint ) {
126+ processor . use ( stylelint ( options . stylelint ) ) ;
127+ }
129128
130- processor
131- . use ( bemLinter ( options [ 'postcss-bem-linter' ] ) )
132- . use ( reporter ( options [ 'postcss-reporter' ] ) ) ;
129+ processor
130+ . use ( bemLinter ( options [ 'postcss-bem-linter' ] ) )
131+ . use ( reporter ( options [ 'postcss-reporter' ] ) ) ;
133132
134- return processor . process ( css , { from : filename } ) . css ;
135- } ;
133+ return processor . process ( css , { from : filename } ) . css ;
136134}
0 commit comments