Skip to content

Commit b1bdd69

Browse files
committed
Use eslint's indent rule
1 parent f6efe19 commit b1bdd69

10 files changed

Lines changed: 29 additions & 34 deletions

File tree

.eslintrc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@
22
"env": {
33
"node": true
44
},
5-
"plugins": [
6-
"nodeca"
7-
],
85
"rules": {
96
"strict": 0,
107
"camelcase": 0,
118
"curly": 0,
12-
"indent": [0, "tab"],
13-
"nodeca/indent": [2, "tabs", 1 ],
9+
"indent": [2, "tab", { "SwitchCase": 1 }],
1410
"eol-last": 1,
1511
"no-shadow": 0,
1612
"no-redeclare": 2,

hot/dev-server.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ if(module.hot) {
2929

3030
}).catch(function(err) {
3131
if(module.hot.status() in {
32-
abort: 1,
33-
fail: 1
34-
}) {
32+
abort: 1,
33+
fail: 1
34+
}) {
3535
console.warn("[HMR] Cannot apply update. Need to do a full reload!");
3636
console.warn("[HMR] " + err.stack || err.message);
3737
window.location.reload();

hot/only-dev-server.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ if(module.hot) {
3030
}
3131
}).catch(function(err) {
3232
if(module.hot.status() in {
33-
abort: 1,
34-
fail: 1
35-
}) {
33+
abort: 1,
34+
fail: 1
35+
}) {
3636
console.warn("[HMR] Cannot apply update. Need to do a full reload!");
3737
console.warn("[HMR] " + err.stack || err.message);
3838
} else {
@@ -41,9 +41,9 @@ if(module.hot) {
4141
});
4242
}).catch(function(err) {
4343
if(module.hot.status() in {
44-
abort: 1,
45-
fail: 1
46-
}) {
44+
abort: 1,
45+
fail: 1
46+
}) {
4747
console.warn("[HMR] Cannot check for update. Need to do a full reload!");
4848
console.warn("[HMR] " + err.stack || err.message);
4949
} else {

hot/poll.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ if(module.hot) {
1717
checkForUpdate(true);
1818
}).catch(function(err) {
1919
if(module.hot.status() in {
20-
abort: 1,
21-
fail: 1
22-
}) {
20+
abort: 1,
21+
fail: 1
22+
}) {
2323
console.warn("[HMR] Cannot apply update.");
2424
console.warn("[HMR] " + err.stack || err.message);
2525
console.warn("[HMR] You need to restart the application!");

hot/signal.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ if(module.hot) {
1919
}, function(err, renewedModules) {
2020
if(err) {
2121
if(module.hot.status() in {
22-
abort: 1,
23-
fail: 1
24-
}) {
22+
abort: 1,
23+
fail: 1
24+
}) {
2525
console.warn("[HMR] Cannot apply update (Need to do a full reload!)");
2626
console.warn("[HMR] " + err.stack || err.message);
2727
console.warn("[HMR] You need to restart the application!");
@@ -37,9 +37,9 @@ if(module.hot) {
3737
});
3838
}).catch(function(err) {
3939
if(module.hot.status() in {
40-
abort: 1,
41-
fail: 1
42-
}) {
40+
abort: 1,
41+
fail: 1
42+
}) {
4343
console.warn("[HMR] Cannot apply update.");
4444
console.warn("[HMR] " + err.stack || err.message);
4545
console.warn("[HMR] You need to restart the application!");

lib/NormalModule.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ NormalModule.prototype.build = function build(options, compilation, resolver, fs
179179
if(options.module && options.module.noParse) {
180180
if(Array.isArray(options.module.noParse)) {
181181
if(options.module.noParse.some(function(regExp) {
182-
return typeof regExp === "string" ?
182+
return typeof regExp === "string" ?
183183
this.request.indexOf(regExp) === 0 :
184184
regExp.test(this.request);
185-
}, this)) return callback();
185+
}, this)) return callback();
186186
} else if(typeof options.module.noParse === "string" ?
187187
this.request.indexOf(options.module.noParse) === 0 :
188188
options.module.noParse.test(this.request)) {
@@ -231,8 +231,8 @@ NormalModule.prototype.source = function(dependencyTemplates, outputOptions, req
231231
var name = variable.name;
232232
var expr = variable.expressionSource(dependencyTemplates, outputOptions, requestShortener);
233233
if(availableVars.some(function(v) {
234-
return v.name === name && v.expression.source() === expr.source();
235-
})) return;
234+
return v.name === name && v.expression.source() === expr.source();
235+
})) return;
236236
vars.push({
237237
name: name,
238238
expression: expr

lib/Parser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ Parser.prototype.initializeEvaluating = function() {
338338
return element !== null && this.evaluateExpression(element);
339339
}, this);
340340
if(items.filter(function(i) {
341-
return !i;
342-
}).length > 0) return;
341+
return !i;
342+
}).length > 0) return;
343343
return new BasicEvaluatedExpression().setItems(items).setRange(expr.range);
344344
});
345345
};

lib/Template.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ Template.prototype.asString = function(str) {
6565

6666
Template.prototype.getModulesArrayBounds = function(modules) {
6767
if(modules.some(function(module) {
68-
return typeof module.id !== "number";
69-
}))
68+
return typeof module.id !== "number";
69+
}))
7070
return false;
7171
var maxId = -Infinity;
7272
var minId = Infinity;

lib/optimize/RemoveParentModulesPlugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ function debugIds(chunks) {
4444
return chunk.debugId;
4545
});
4646
if(list.some(function(dId) {
47-
return typeof dId !== "number";
48-
})) return "no";
47+
return typeof dId !== "number";
48+
})) return "no";
4949
list.sort();
5050
return list.join(",");
5151
}

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
"diff": "^2.0.2",
3737
"es6-promise-polyfill": "^1.1.1",
3838
"eslint": "^1.1.0",
39-
"eslint-plugin-nodeca": "^1.0.3",
4039
"express": "~4.13.1",
4140
"extract-text-webpack-plugin": "^1.0.0",
4241
"file-loader": "~0.8.0",

0 commit comments

Comments
 (0)