Skip to content

Commit

Permalink
chore: apply changes after linting [bot]
Browse files Browse the repository at this point in the history
  • Loading branch information
taiga-family-bot authored and taiga-family-bot committed Oct 18, 2023
1 parent efc93b6 commit deb178c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
18 changes: 7 additions & 11 deletions projects/cdk/schematics/ng-update/v3/steps/migrate-templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,8 @@ function migrateTuiHideSelectedPipe({
const template = getTemplateFromTemplateResource(resource, fileSystem);
const templateOffset = getTemplateOffset(resource);

const elementsWithPipe = findElementsInTemplateByFn(
template,
el => el.attrs.some(attr => attr.value.match(HIDE_SELECTED_PIPE_WITH_ARGS_REG)),
const elementsWithPipe = findElementsInTemplateByFn(template, el =>
el.attrs.some(attr => attr.value.match(HIDE_SELECTED_PIPE_WITH_ARGS_REG)),
);

elementsWithPipe.forEach(el => {
Expand Down Expand Up @@ -387,14 +386,11 @@ function migrateBinaryAttributes({
const templateOffset = getTemplateOffset(resource);

TRUTHY_BOOLEAN_INPUT_TO_HTML_BINARY_ATTRIBUTE.forEach(attrName => {
const elements = findElementsInTemplateByFn(
template,
el =>
el.attrs.some(
attr =>
attr.value === `true` &&
attr.name.includes(attrName.toLowerCase()),
),
const elements = findElementsInTemplateByFn(template, el =>
el.attrs.some(
attr =>
attr.value === `true` && attr.name.includes(attrName.toLowerCase()),
),
);

elements.forEach(el => {
Expand Down
5 changes: 2 additions & 3 deletions projects/cdk/schematics/utils/templates/elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,8 @@ export function findElementsWithAttribute(
html: string,
attributeName: string,
): Element[] {
return findElementsInTemplateByFn(
html,
el => el.attrs.some(attr => attr.name === attributeName.toLowerCase()),
return findElementsInTemplateByFn(html, el =>
el.attrs.some(attr => attr.name === attributeName.toLowerCase()),
);
}

Expand Down

0 comments on commit deb178c

Please sign in to comment.