eslint-plugin-ember-template-lint 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -63,7 +63,7 @@ async function _applyFixes(options, results, columnOffset) {
63
63
  }
64
64
  const diffs = generateDifferences(template, code);
65
65
  diffs.forEach((d) => {
66
- d.range = [d.offset, d.offset + (d.deleteText?.length || 0)];
66
+ d.range = [d.offset - columnOffset, d.offset + (d.deleteText?.length || 0) - columnOffset];
67
67
  });
68
68
  fixableIssues.filter(r => r.rule === ruleName).forEach((r) => {
69
69
  const range = r.range;
package/lib/rules/lint.js CHANGED
@@ -27,8 +27,6 @@ function runTemplateLint(node, context) {
27
27
  lintMessages.forEach((m) => {
28
28
  if (m.fix) {
29
29
  m.fix.forEach((fix) => {
30
- const d = fix;
31
- fix.range = [d.offset, d.offset + (d.deleteText?.length || 0)];
32
30
  const start = originalDocument.offsetToPosition(fix.range[0]);
33
31
  const end = originalDocument.offsetToPosition(fix.range[1]);
34
32
  fix.range = [
@@ -41,7 +39,7 @@ function runTemplateLint(node, context) {
41
39
  character: end.character
42
40
  })
43
41
  ];
44
- fix.range = fix.range.map(x => offset + x - columnOffset);
42
+ fix.range = fix.range.map(x => offset + x);
45
43
  });
46
44
  }
47
45
  m.range = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-ember-template-lint",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Provide linting for ember template",
5
5
  "keywords": [
6
6
  "eslint",