Skip to content
This repository was archived by the owner on Sep 28, 2020. It is now read-only.

Commit 0d3d6dd

Browse files
committed
🤫 Stop using this keyword in loader function
1 parent abc88bf commit 0d3d6dd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ module.exports = function(input, map) {
145145

146146
var userOptions = assign(
147147
// user defaults
148-
this.options.eslint || {},
148+
webpack.options.eslint || {},
149149
// loader query string
150-
loaderUtils.getOptions(this)
150+
loaderUtils.getOptions(webpack)
151151
)
152152

153153
var config = assign(
@@ -175,7 +175,7 @@ module.exports = function(input, map) {
175175
engines[configHash] = new eslint.CLIEngine(config)
176176
}
177177

178-
this.cacheable()
178+
webpack.cacheable()
179179

180180
var resourcePath = webpack.resourcePath
181181
var cwd = process.cwd()
@@ -189,7 +189,7 @@ module.exports = function(input, map) {
189189
var engine = engines[configHash]
190190
// return early if cached
191191
if (config.cache) {
192-
var callback = this.async()
192+
var callback = webpack.async()
193193
return cache(
194194
{
195195
directory: cacheDirectory,
@@ -209,8 +209,8 @@ module.exports = function(input, map) {
209209
}
210210
)
211211
}
212-
printLinterOutput(lint(engine, input, resourcePath), config, this)
213-
this.callback(null, input, map)
212+
printLinterOutput(lint(engine, input, resourcePath), config, webpack)
213+
webpack.callback(null, input, map)
214214
}
215215

216216
function lint(engine, input, resourcePath) {

0 commit comments

Comments
 (0)