Skip to content

Commit 13f2fae

Browse files
committed
ci(lint): lint rule to avoid blur() use to manage focus in components
1 parent eede11d commit 13f2fae

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

projects/igniteui-angular/eslint.config.mjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ export default [
4949

5050
"no-debugger": "error",
5151
},
52+
}, {
53+
files: ["**/*.ts"],
54+
ignores: ["**/*.spec.ts"],
55+
rules: {
56+
"no-restricted-syntax": ["error", {
57+
selector: "CallExpression[arguments.length=0] MemberExpression[property.name='blur']",
58+
message: "Avoid using `blur()` on focus-managed components without justification. Move focus elsewhere or disable check and provide reason.",
59+
}],
60+
},
5261
},
5362
...compat.extends(
5463
"plugin:@angular-eslint/template/recommended",

0 commit comments

Comments
 (0)