Skip to content

Commit 3ed714d

Browse files
committed
style: tweaks
1 parent 154b405 commit 3ed714d

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ var defaultFilesGlob = require('./lib/constants').defaultFilesGlob;
1414
function apply (options, compiler) {
1515
options = options || {};
1616
var context = options.context || compiler.context;
17+
1718
options = assign({
1819
formatter: formatter
1920
}, options, {
@@ -25,14 +26,14 @@ function apply (options, compiler) {
2526
context: context
2627
});
2728

28-
var runner = runCompilation.bind(this, options);
29-
3029
if (options.lintDirtyModulesOnly) {
3130
new LintDirtyModulesPlugin(compiler, options); // eslint-disable-line no-new
3231
} else {
32+
var runner = runCompilation.bind(this, options);
33+
3334
compiler.plugin('run', runner);
34-
compiler.plugin('watch-run', function onWatchRun (watcher, callback) {
35-
runner(watcher.compiler, callback);
35+
compiler.plugin('watch-run', function onWatchRun (watcher, done) {
36+
runner(watcher.compiler, done);
3637
});
3738
}
3839
}

lib/lint-dirty-modules-plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ LintDirtyModulesPlugin.prototype.lint = function lint (compilation, callback) {
5454
* Returns an array of changed files comparing current timestamps
5555
* against cached timestamps from previous run.
5656
*
57-
* @param plugin - stylelint-webpack-plugin this scopr
57+
* @this plugin - stylelint-webpack-plugin this scope
5858
* @param fileTimestamps - an object with keys as filenames and values as their timestamps.
5959
* e.g. {'/filename.scss': 12444222000}
6060
* @param glob - glob pattern to match files

0 commit comments

Comments
 (0)