@angular-eslint/eslint-plugin-template
Advanced tools
Comparing version 18.2.1-alpha.0 to 18.2.1-alpha.1
@@ -95,3 +95,3 @@ declare const _default: { | ||
i18n: import("@typescript-eslint/utils/ts-eslint").RuleModule<import("./rules/i18n").MessageIds, import("./rules/i18n").Options, import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; | ||
"interactive-supports-focus": import("@typescript-eslint/utils/ts-eslint").RuleModule<"interactiveSupportsFocus", [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; | ||
"interactive-supports-focus": import("@typescript-eslint/utils/ts-eslint").RuleModule<"interactiveSupportsFocus", import("./rules/interactive-supports-focus").Options, import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; | ||
"label-has-associated-control": import("@typescript-eslint/utils/ts-eslint").RuleModule<"labelHasAssociatedControl", import("./rules/label-has-associated-control").Options, import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; | ||
@@ -98,0 +98,0 @@ "mouse-events-have-key-events": import("@typescript-eslint/utils/ts-eslint").RuleModule<"mouseEventsHaveKeyEvents", [], import("./utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; |
@@ -1,6 +0,10 @@ | ||
export type Options = []; | ||
export type Options = [ | ||
{ | ||
readonly allowList?: readonly string[]; | ||
} | ||
]; | ||
export type MessageIds = 'interactiveSupportsFocus'; | ||
export declare const RULE_NAME = "interactive-supports-focus"; | ||
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"interactiveSupportsFocus", [], import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; | ||
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"interactiveSupportsFocus", Options, import("../utils/create-eslint-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>; | ||
export default _default; | ||
//# sourceMappingURL=interactive-supports-focus.d.ts.map |
@@ -13,2 +13,3 @@ "use strict"; | ||
exports.RULE_NAME = 'interactive-supports-focus'; | ||
const DEFAULT_ALLOW_LIST = ['form']; | ||
exports.default = (0, create_eslint_rule_1.createESLintRule)({ | ||
@@ -21,3 +22,15 @@ name: exports.RULE_NAME, | ||
}, | ||
schema: [], | ||
schema: [ | ||
{ | ||
additionalProperties: false, | ||
properties: { | ||
allowList: { | ||
items: { type: 'string' }, | ||
type: 'array', | ||
uniqueItems: true, | ||
}, | ||
}, | ||
type: 'object', | ||
}, | ||
], | ||
messages: { | ||
@@ -27,4 +40,4 @@ interactiveSupportsFocus: 'Elements with interaction handlers must be focusable.', | ||
}, | ||
defaultOptions: [], | ||
create(context) { | ||
defaultOptions: [{ allowList: DEFAULT_ALLOW_LIST }], | ||
create(context, [{ allowList }]) { | ||
return { | ||
@@ -40,2 +53,4 @@ Element$1(node) { | ||
output.name.startsWith('keypress')); | ||
if (isElementInAllowList(elementType, allowList)) | ||
return; | ||
if (!interactiveOutput || | ||
@@ -68,1 +83,4 @@ (0, is_disabled_element_1.isDisabledElement)(node) || | ||
}); | ||
function isElementInAllowList(elementType, allowList) { | ||
return (allowList && allowList.length > 0 && allowList.indexOf(elementType) > -1); | ||
} |
{ | ||
"name": "@angular-eslint/eslint-plugin-template", | ||
"version": "18.2.1-alpha.0", | ||
"version": "18.2.1-alpha.1", | ||
"description": "ESLint plugin for Angular Templates", | ||
@@ -21,4 +21,4 @@ "license": "MIT", | ||
"dependencies": { | ||
"@angular-eslint/bundled-angular-compiler": "18.2.1-alpha.0", | ||
"@angular-eslint/utils": "18.2.1-alpha.0", | ||
"@angular-eslint/bundled-angular-compiler": "18.2.1-alpha.1", | ||
"@angular-eslint/utils": "18.2.1-alpha.1", | ||
"aria-query": "5.3.0", | ||
@@ -28,3 +28,3 @@ "axobject-query": "4.1.0" | ||
"devDependencies": { | ||
"@angular-eslint/test-utils": "18.2.1-alpha.0", | ||
"@angular-eslint/test-utils": "18.2.1-alpha.1", | ||
"@types/aria-query": "5.0.4" | ||
@@ -31,0 +31,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
223095
4126
+ Added@angular-eslint/bundled-angular-compiler@18.2.1-alpha.1(transitive)
+ Added@angular-eslint/utils@18.2.1-alpha.1(transitive)
- Removed@angular-eslint/bundled-angular-compiler@18.2.1-alpha.0(transitive)
- Removed@angular-eslint/utils@18.2.1-alpha.0(transitive)
Updated@angular-eslint/bundled-angular-compiler@18.2.1-alpha.1