eslint-plugin-ember-template-lint 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/rules/lint.js +1 -1
- package/package.json +1 -1
package/lib/rules/lint.js
CHANGED
@@ -11,7 +11,7 @@ function runTemplateLint(node, context) {
|
|
11
11
|
const filename = context.getPhysicalFilename();
|
12
12
|
let text = node.contents;
|
13
13
|
const initialLine = sourceCodeText.split('\n')[node.loc.start.line-1];
|
14
|
-
const columnOffset = initialLine.match(
|
14
|
+
const columnOffset = initialLine.match(/^\s+/)?.[0].length || 0;
|
15
15
|
const offset = (node.range[0] || 0);
|
16
16
|
const spaces = ' '.repeat(columnOffset);
|
17
17
|
const originalDocument = new DocumentLines(spaces + text);
|