Skip to content

Commit 30806e1

Browse files
committed
refactor(lint): also ignore hidden/internal props
1 parent 43c1898 commit 30806e1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

projects/igniteui-angular/rules/boolean-input-transform.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,13 @@ export const rule = ESLintUtils.RuleCreator.withoutDocs({
118118

119119
if (!isBoolean) return;
120120

121-
const comments = context.sourceCode.getCommentsBefore(classDeclaration.decorators[0] ?? classDeclaration);
121+
// ignore hidden/internal properties
122+
const propComments = context.sourceCode.getCommentsBefore(decorator).filter(x => x.type === 'Block');
123+
if (propComments.some(x => x.value.includes('@hidden') || x.value.includes('@internal')))
124+
return;
125+
126+
// ignore hidden/internal classes
127+
const comments = context.sourceCode.getCommentsBefore(classDeclaration.decorators[0] ?? classDeclaration).filter(x => x.type === 'Block');
122128
if (comments.some(x => x.value.includes('@hidden') || x.value.includes('@internal')))
123129
return;
124130

0 commit comments

Comments
 (0)