We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aec11fc commit 3d07f81Copy full SHA for 3d07f81
lib/loaders/pitcher.js
@@ -10,7 +10,15 @@ module.exports = code => code
10
// and transform it into appropriate requests.
11
module.exports.pitch = function (remainingRequest) {
12
const query = qs.parse(this.resourceQuery.slice(1))
13
- const loaders = this.loaders.slice(1) // remove self
+
14
+ // if this is a language block request, remove eslint-loader to avoid
15
+ // duplicate linting.
16
+ const loaders = query.type
17
+ ? this.loaders.filter(l => !/(\/|\\|@)eslint-loader/.test(l.path))
18
+ : this.loaders
19
20
+ // remove self
21
+ loaders.shift()
22
23
// do not inject if user uses null-loader to void the type (#1239)
24
if (loaders.some(l => /(\/|\\|@)null-loader/.test(l.path))) {
0 commit comments