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.
- package/lib/rules/hbs-worker.js +1 -1
- package/lib/rules/lint.js +1 -3
- package/package.json +1 -1
package/lib/rules/hbs-worker.js
CHANGED
@@ -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
|
42
|
+
fix.range = fix.range.map(x => offset + x);
|
45
43
|
});
|
46
44
|
}
|
47
45
|
m.range = [
|