Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx committed May 10, 2023
1 parent 909d1bc commit c89a181
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/preprocessors/glimmer.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ function mapRange(messages, filename) {

const lines = transformed.split('\n');
const originalLines = original.split('\n');

// get template ranges to remove eslint messages that are inside the templates
const templateRanges = [];
let isInsideTemplate = false;
for (const [index, line] of lines.entries()) {
const lineHasOpeningTag = openingTemplateTagRegex.test(line);
const lineHasClosingTag = closingTemplateTagRegex.test(line);

if (lineHasOpeningTag) {
isInsideTemplate = true;
templateRanges.push({
Expand All @@ -138,7 +138,7 @@ function mapRange(messages, filename) {
startColumn: line.search(openingTemplateTagRegex) + 1,
});
}

if (lineHasClosingTag && isInsideTemplate) {
isInsideTemplate = false;
const match = line.match(closingTemplateTagRegex);
Expand Down

0 comments on commit c89a181

Please sign in to comment.