diff --git a/lib/rules/block-indentation.js b/lib/rules/block-indentation.js index d5fb5f0be1..6e43b0a779 100644 --- a/lib/rules/block-indentation.js +++ b/lib/rules/block-indentation.js @@ -276,7 +276,7 @@ module.exports = class BlockIndentation extends Rule { } } - // Process all the child with the path to access the child from the current node + // Recreate the node only if the source has changed, otherwise this would mean useless computation and possible mistake if (sourceBeforeFix !== this.sourceEdited && this.sourceEdited) { fixedNode = this.fixLine( this.sourceEdited.split('\n'), diff --git a/test/unit/rules/block-indentation-test.js b/test/unit/rules/block-indentation-test.js index dbffd22345..a179144074 100644 --- a/test/unit/rules/block-indentation-test.js +++ b/test/unit/rules/block-indentation-test.js @@ -227,7 +227,7 @@ generateRuleTests({ '{{/if}}', ].join('\n'), }, - ].filter((value, index) => index >= 0), + ], bad: [ {