We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
forEach
1 parent 0419f37 commit 54c3658Copy full SHA for 54c3658
lib/options/rule-indent.js
@@ -23,12 +23,13 @@ module.exports = {
23
process: function(nodeType, node, level) {
24
// increasing indent level
25
if (nodeType === 'block') {
26
- var value = '\n' + new Array(level + 2).join(this._value);
27
if (node[0][0] !== 's') {
28
node.unshift(['s', '']);
29
}
30
- node.forEach(function(nodeItem, i) {
+ for (var i = 0; i < node.length; i++) {
+ var nodeItem = node[i];
31
if (nodeItem[0] === 'declaration') {
32
+ var value = '\n' + new Array(level + 2).join(this._value);
33
var space = node[i - 1];
34
var tail;
35
@@ -45,7 +46,7 @@ module.exports = {
45
46
// '\n \n ' => '\n \n\t'
47
space[1] = space[1].replace(/(\n)?([\t ]+)?$/, value);
48
- });
49
+ };
50
51
52
0 commit comments