@arcaauth/eslint-plugin-jsx-a11y 6.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +17 -0
- package/.eslintrc +44 -0
- package/CHANGELOG.md +774 -0
- package/LICENSE.md +8 -0
- package/README.md +423 -0
- package/__mocks__/IdentifierMock.js +15 -0
- package/__mocks__/JSXAttributeMock.js +39 -0
- package/__mocks__/JSXElementMock.js +37 -0
- package/__mocks__/JSXExpressionContainerMock.js +15 -0
- package/__mocks__/JSXSpreadAttributeMock.js +18 -0
- package/__mocks__/JSXTextMock.js +17 -0
- package/__mocks__/LiteralMock.js +17 -0
- package/__mocks__/genInteractives.js +218 -0
- package/__tests__/__util__/axeMapping.js +6 -0
- package/__tests__/__util__/helpers/getESLintCoreRule.js +9 -0
- package/__tests__/__util__/helpers/parsers.js +186 -0
- package/__tests__/__util__/parserOptionsMapper.js +53 -0
- package/__tests__/__util__/ruleOptionsMapperFactory.js +33 -0
- package/__tests__/index-test.js +40 -0
- package/__tests__/src/rules/accessible-emoji-test.js +66 -0
- package/__tests__/src/rules/alt-text-test.js +291 -0
- package/__tests__/src/rules/anchor-ambiguous-text-test.js +117 -0
- package/__tests__/src/rules/anchor-has-content-test.js +54 -0
- package/__tests__/src/rules/anchor-is-valid-test.js +532 -0
- package/__tests__/src/rules/aria-activedescendant-has-tabindex-test.js +95 -0
- package/__tests__/src/rules/aria-props-test.js +69 -0
- package/__tests__/src/rules/aria-proptypes-test.js +311 -0
- package/__tests__/src/rules/aria-role-test.js +118 -0
- package/__tests__/src/rules/aria-unsupported-elements-test.js +75 -0
- package/__tests__/src/rules/autocomplete-valid-test.js +77 -0
- package/__tests__/src/rules/click-events-have-key-events-test.js +77 -0
- package/__tests__/src/rules/control-has-associated-label-test.js +327 -0
- package/__tests__/src/rules/heading-has-content-test.js +85 -0
- package/__tests__/src/rules/html-has-lang-test.js +42 -0
- package/__tests__/src/rules/iframe-has-title-test.js +55 -0
- package/__tests__/src/rules/img-redundant-alt-test.js +137 -0
- package/__tests__/src/rules/interactive-supports-focus-test.js +267 -0
- package/__tests__/src/rules/label-has-associated-control-test.js +243 -0
- package/__tests__/src/rules/label-has-for-test.js +235 -0
- package/__tests__/src/rules/lang-test.js +59 -0
- package/__tests__/src/rules/media-has-caption-test.js +220 -0
- package/__tests__/src/rules/mouse-events-have-key-events-test.js +154 -0
- package/__tests__/src/rules/no-access-key-test.js +48 -0
- package/__tests__/src/rules/no-aria-hidden-on-focusable-test.js +44 -0
- package/__tests__/src/rules/no-autofocus-test.js +68 -0
- package/__tests__/src/rules/no-distracting-elements-test.js +51 -0
- package/__tests__/src/rules/no-interactive-element-to-noninteractive-role-test.js +405 -0
- package/__tests__/src/rules/no-noninteractive-element-interactions-test.js +502 -0
- package/__tests__/src/rules/no-noninteractive-element-to-interactive-role-test.js +500 -0
- package/__tests__/src/rules/no-noninteractive-tabindex-test.js +123 -0
- package/__tests__/src/rules/no-onchange-test.js +57 -0
- package/__tests__/src/rules/no-redundant-roles-test.js +98 -0
- package/__tests__/src/rules/no-static-element-interactions-test.js +501 -0
- package/__tests__/src/rules/prefer-tag-over-role-test.js +63 -0
- package/__tests__/src/rules/role-has-required-aria-props-test.js +134 -0
- package/__tests__/src/rules/role-supports-aria-props-test.js +570 -0
- package/__tests__/src/rules/scope-test.js +50 -0
- package/__tests__/src/rules/tabindex-no-positive-test.js +55 -0
- package/__tests__/src/util/attributesComparator-test.js +91 -0
- package/__tests__/src/util/getAccessibleChildText-test.js +174 -0
- package/__tests__/src/util/getComputedRole-test.js +71 -0
- package/__tests__/src/util/getElementType-test.js +154 -0
- package/__tests__/src/util/getExplicitRole-test.js +35 -0
- package/__tests__/src/util/getImplicitRole-test.js +25 -0
- package/__tests__/src/util/getSuggestion-test.js +33 -0
- package/__tests__/src/util/getTabIndex-test.js +85 -0
- package/__tests__/src/util/hasAccessibleChild-test.js +157 -0
- package/__tests__/src/util/implicitRoles/input-test.js +87 -0
- package/__tests__/src/util/implicitRoles/menu-test.js +20 -0
- package/__tests__/src/util/implicitRoles/menuitem-test.js +38 -0
- package/__tests__/src/util/isAbstractRole-test.js +51 -0
- package/__tests__/src/util/isContentEditable-test.js +52 -0
- package/__tests__/src/util/isDOMElement-test.js +30 -0
- package/__tests__/src/util/isDisabledElement-test.js +88 -0
- package/__tests__/src/util/isFocusable-test.js +111 -0
- package/__tests__/src/util/isInteractiveElement-test.js +104 -0
- package/__tests__/src/util/isInteractiveRole-test.js +59 -0
- package/__tests__/src/util/isNonInteractiveElement-test.js +97 -0
- package/__tests__/src/util/isNonInteractiveRole-test.js +59 -0
- package/__tests__/src/util/isNonLiteralProperty-test.js +52 -0
- package/__tests__/src/util/isSemanticRoleElement-test.js +72 -0
- package/__tests__/src/util/mayContainChildComponent-test.js +219 -0
- package/__tests__/src/util/mayHaveAccessibleLabel-test.js +256 -0
- package/__tests__/src/util/parserOptionsMapper-test.js +93 -0
- package/__tests__/src/util/schemas-test.js +35 -0
- package/docs/rules/accessible-emoji.md +30 -0
- package/docs/rules/alt-text.md +168 -0
- package/docs/rules/anchor-ambiguous-text.md +91 -0
- package/docs/rules/anchor-has-content.md +64 -0
- package/docs/rules/anchor-is-valid.md +270 -0
- package/docs/rules/aria-activedescendant-has-tabindex.md +52 -0
- package/docs/rules/aria-props.md +29 -0
- package/docs/rules/aria-proptypes.md +30 -0
- package/docs/rules/aria-role.md +51 -0
- package/docs/rules/aria-unsupported-elements.md +30 -0
- package/docs/rules/autocomplete-valid.md +49 -0
- package/docs/rules/click-events-have-key-events.md +28 -0
- package/docs/rules/control-has-associated-label.md +113 -0
- package/docs/rules/heading-has-content.md +67 -0
- package/docs/rules/html-has-lang.md +31 -0
- package/docs/rules/iframe-has-title.md +37 -0
- package/docs/rules/img-redundant-alt.md +48 -0
- package/docs/rules/interactive-supports-focus.md +156 -0
- package/docs/rules/label-has-associated-control.md +152 -0
- package/docs/rules/label-has-for.md +130 -0
- package/docs/rules/lang.md +31 -0
- package/docs/rules/media-has-caption.md +48 -0
- package/docs/rules/mouse-events-have-key-events.md +58 -0
- package/docs/rules/no-access-key.md +30 -0
- package/docs/rules/no-aria-hidden-on-focusable.md +37 -0
- package/docs/rules/no-autofocus.md +43 -0
- package/docs/rules/no-distracting-elements.md +41 -0
- package/docs/rules/no-interactive-element-to-noninteractive-role.md +73 -0
- package/docs/rules/no-noninteractive-element-interactions.md +145 -0
- package/docs/rules/no-noninteractive-element-to-interactive-role.md +76 -0
- package/docs/rules/no-noninteractive-tabindex.md +115 -0
- package/docs/rules/no-onchange.md +36 -0
- package/docs/rules/no-redundant-roles.md +46 -0
- package/docs/rules/no-static-element-interactions.md +114 -0
- package/docs/rules/prefer-tag-over-role.md +32 -0
- package/docs/rules/role-has-required-aria-props.md +31 -0
- package/docs/rules/role-supports-aria-props.md +39 -0
- package/docs/rules/scope.md +30 -0
- package/docs/rules/tabindex-no-positive.md +32 -0
- package/lib/configs/flat-config-base.js +11 -0
- package/lib/configs/legacy-config-base.js +9 -0
- package/lib/index.js +209 -0
- package/lib/rules/accessible-emoji.js +63 -0
- package/lib/rules/alt-text.js +218 -0
- package/lib/rules/anchor-ambiguous-text.js +64 -0
- package/lib/rules/anchor-has-content.js +60 -0
- package/lib/rules/anchor-is-valid.js +122 -0
- package/lib/rules/aria-activedescendant-has-tabindex.js +66 -0
- package/lib/rules/aria-props.js +59 -0
- package/lib/rules/aria-proptypes.js +114 -0
- package/lib/rules/aria-role.js +89 -0
- package/lib/rules/aria-unsupported-elements.js +64 -0
- package/lib/rules/autocomplete-valid.js +67 -0
- package/lib/rules/click-events-have-key-events.js +68 -0
- package/lib/rules/control-has-associated-label.js +103 -0
- package/lib/rules/heading-has-content.js +61 -0
- package/lib/rules/html-has-lang.js +50 -0
- package/lib/rules/iframe-has-title.js +50 -0
- package/lib/rules/img-redundant-alt.js +88 -0
- package/lib/rules/interactive-supports-focus.js +87 -0
- package/lib/rules/label-has-associated-control.js +127 -0
- package/lib/rules/label-has-for.js +150 -0
- package/lib/rules/lang.js +68 -0
- package/lib/rules/media-has-caption.js +96 -0
- package/lib/rules/mouse-events-have-key-events.js +94 -0
- package/lib/rules/no-access-key.js +43 -0
- package/lib/rules/no-aria-hidden-on-focusable.js +47 -0
- package/lib/rules/no-autofocus.js +62 -0
- package/lib/rules/no-distracting-elements.js +54 -0
- package/lib/rules/no-interactive-element-to-noninteractive-role.js +81 -0
- package/lib/rules/no-noninteractive-element-interactions.js +95 -0
- package/lib/rules/no-noninteractive-element-to-interactive-role.js +80 -0
- package/lib/rules/no-noninteractive-tabindex.js +109 -0
- package/lib/rules/no-onchange.js +52 -0
- package/lib/rules/no-redundant-roles.js +86 -0
- package/lib/rules/no-static-element-interactions.js +102 -0
- package/lib/rules/prefer-tag-over-role.js +75 -0
- package/lib/rules/role-has-required-aria-props.js +88 -0
- package/lib/rules/role-supports-aria-props.js +78 -0
- package/lib/rules/scope.js +58 -0
- package/lib/rules/tabindex-no-positive.js +53 -0
- package/lib/util/attributesComparator.js +34 -0
- package/lib/util/getAccessibleChildText.js +55 -0
- package/lib/util/getComputedRole.js +19 -0
- package/lib/util/getElementType.js +30 -0
- package/lib/util/getExplicitRole.js +27 -0
- package/lib/util/getImplicitRole.js +24 -0
- package/lib/util/getSuggestion.js +32 -0
- package/lib/util/getTabIndex.js +34 -0
- package/lib/util/hasAccessibleChild.js +30 -0
- package/lib/util/implicitRoles/a.js +17 -0
- package/lib/util/implicitRoles/area.js +17 -0
- package/lib/util/implicitRoles/article.js +13 -0
- package/lib/util/implicitRoles/aside.js +13 -0
- package/lib/util/implicitRoles/body.js +13 -0
- package/lib/util/implicitRoles/button.js +13 -0
- package/lib/util/implicitRoles/datalist.js +13 -0
- package/lib/util/implicitRoles/details.js +13 -0
- package/lib/util/implicitRoles/dialog.js +13 -0
- package/lib/util/implicitRoles/form.js +13 -0
- package/lib/util/implicitRoles/h1.js +13 -0
- package/lib/util/implicitRoles/h2.js +13 -0
- package/lib/util/implicitRoles/h3.js +13 -0
- package/lib/util/implicitRoles/h4.js +13 -0
- package/lib/util/implicitRoles/h5.js +13 -0
- package/lib/util/implicitRoles/h6.js +13 -0
- package/lib/util/implicitRoles/hr.js +13 -0
- package/lib/util/implicitRoles/img.js +31 -0
- package/lib/util/implicitRoles/index.js +82 -0
- package/lib/util/implicitRoles/input.js +38 -0
- package/lib/util/implicitRoles/li.js +13 -0
- package/lib/util/implicitRoles/link.js +17 -0
- package/lib/util/implicitRoles/menu.js +19 -0
- package/lib/util/implicitRoles/menuitem.js +28 -0
- package/lib/util/implicitRoles/meter.js +13 -0
- package/lib/util/implicitRoles/nav.js +13 -0
- package/lib/util/implicitRoles/ol.js +13 -0
- package/lib/util/implicitRoles/option.js +13 -0
- package/lib/util/implicitRoles/output.js +13 -0
- package/lib/util/implicitRoles/progress.js +13 -0
- package/lib/util/implicitRoles/section.js +13 -0
- package/lib/util/implicitRoles/select.js +13 -0
- package/lib/util/implicitRoles/tbody.js +13 -0
- package/lib/util/implicitRoles/textarea.js +13 -0
- package/lib/util/implicitRoles/tfoot.js +13 -0
- package/lib/util/implicitRoles/thead.js +13 -0
- package/lib/util/implicitRoles/ul.js +13 -0
- package/lib/util/isAbstractRole.js +23 -0
- package/lib/util/isContentEditable.js +13 -0
- package/lib/util/isDOMElement.js +15 -0
- package/lib/util/isDisabledElement.js +23 -0
- package/lib/util/isFocusable.js +23 -0
- package/lib/util/isHiddenFromScreenReader.js +26 -0
- package/lib/util/isInteractiveElement.js +116 -0
- package/lib/util/isInteractiveRole.js +54 -0
- package/lib/util/isNonInteractiveElement.js +131 -0
- package/lib/util/isNonInteractiveRole.js +55 -0
- package/lib/util/isNonLiteralProperty.js +29 -0
- package/lib/util/isPresentationRole.js +13 -0
- package/lib/util/isSemanticRoleElement.js +54 -0
- package/lib/util/mayContainChildComponent.js +50 -0
- package/lib/util/mayHaveAccessibleLabel.js +95 -0
- package/lib/util/schemas.js +52 -0
- package/package.json +120 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = mayHaveAccessibleLabel;
|
|
7
|
+
var _arrayIncludes = _interopRequireDefault(require("array-includes"));
|
|
8
|
+
var _jsxAstUtils = require("jsx-ast-utils");
|
|
9
|
+
var _minimatch = _interopRequireDefault(require("minimatch"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
|
+
/**
|
|
12
|
+
* Returns true if a labelling element is found or if it cannot determine if
|
|
13
|
+
* a label is present because of expression containers or spread attributes.
|
|
14
|
+
* A false return value means that the node definitely does not have a label,
|
|
15
|
+
* but a true return return value means that the node may or may not have a
|
|
16
|
+
* label.
|
|
17
|
+
*
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
function tryTrim(value) {
|
|
22
|
+
return typeof value === 'string' ? value.trim() : value;
|
|
23
|
+
}
|
|
24
|
+
function hasLabellingProp(openingElement) {
|
|
25
|
+
var additionalLabellingProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
26
|
+
var labellingProps = [].concat('alt',
|
|
27
|
+
// Assume alt is used correctly on an image
|
|
28
|
+
'aria-label', 'aria-labelledby', additionalLabellingProps);
|
|
29
|
+
return openingElement.attributes.some(function (attribute) {
|
|
30
|
+
// We must assume that a spread value contains a labelling prop.
|
|
31
|
+
if (attribute.type !== 'JSXAttribute') {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
// Attribute matches.
|
|
35
|
+
if ((0, _arrayIncludes["default"])(labellingProps, (0, _jsxAstUtils.propName)(attribute)) && !!tryTrim((0, _jsxAstUtils.getPropValue)(attribute))) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function mayHaveAccessibleLabel(root) {
|
|
42
|
+
var maxDepth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
|
|
43
|
+
var additionalLabellingProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
44
|
+
var getElementType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _jsxAstUtils.elementType;
|
|
45
|
+
var controlComponents = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
|
|
46
|
+
function checkElement(node, depth) {
|
|
47
|
+
// Bail when maxDepth is exceeded.
|
|
48
|
+
if (depth > maxDepth) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
// Check for literal text.
|
|
52
|
+
if (node.type === 'Literal' && !!tryTrim(node.value)) {
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
// Assume an expression container renders a label. It is the best we can
|
|
56
|
+
// do in this case.
|
|
57
|
+
if (node.type === 'JSXExpressionContainer') {
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
60
|
+
// Check for JSXText.
|
|
61
|
+
// $FlowFixMe Remove after updating ast-types-flow
|
|
62
|
+
if (node.type === 'JSXText' && !!tryTrim(node.value)) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
// Check for labelling props.
|
|
66
|
+
if (node.openingElement
|
|
67
|
+
/* $FlowFixMe */ && hasLabellingProp(node.openingElement, additionalLabellingProps)) {
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
if (node.type === 'JSXElement' && node.children.length === 0 && node.openingElement) {
|
|
71
|
+
// $FlowFixMe `node.openingElement` has `unknown` type
|
|
72
|
+
var name = getElementType(node.openingElement);
|
|
73
|
+
var isReactComponent = name.length > 0 && name[0] === name[0].toUpperCase();
|
|
74
|
+
if (isReactComponent && !controlComponents.some(function (control) {
|
|
75
|
+
return (0, _minimatch["default"])(name, control);
|
|
76
|
+
})) {
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Recurse into the child element nodes.
|
|
82
|
+
if (node.children) {
|
|
83
|
+
/* $FlowFixMe */
|
|
84
|
+
for (var i = 0; i < node.children.length; i += 1) {
|
|
85
|
+
/* $FlowFixMe */
|
|
86
|
+
if (checkElement(node.children[i], depth + 1)) {
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
return checkElement(root, 0);
|
|
94
|
+
}
|
|
95
|
+
module.exports = exports.default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.generateObjSchema = exports.enumArraySchema = exports.arraySchema = void 0;
|
|
7
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
8
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
10
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
11
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
13
|
+
/**
|
|
14
|
+
* JSON schema to accept an array of unique strings
|
|
15
|
+
*/
|
|
16
|
+
var arraySchema = exports.arraySchema = {
|
|
17
|
+
type: 'array',
|
|
18
|
+
items: {
|
|
19
|
+
type: 'string'
|
|
20
|
+
},
|
|
21
|
+
uniqueItems: true,
|
|
22
|
+
additionalItems: false
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* JSON schema to accept an array of unique strings from an enumerated list.
|
|
27
|
+
*/
|
|
28
|
+
var enumArraySchema = exports.enumArraySchema = function enumArraySchema() {
|
|
29
|
+
var enumeratedList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
30
|
+
var minItems = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
31
|
+
return _objectSpread(_objectSpread({}, arraySchema), {}, {
|
|
32
|
+
items: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
"enum": enumeratedList
|
|
35
|
+
},
|
|
36
|
+
minItems
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Factory function to generate an object schema
|
|
42
|
+
* with specified properties object
|
|
43
|
+
*/
|
|
44
|
+
var generateObjSchema = exports.generateObjSchema = function generateObjSchema() {
|
|
45
|
+
var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
46
|
+
var required = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
47
|
+
return {
|
|
48
|
+
type: 'object',
|
|
49
|
+
properties,
|
|
50
|
+
required
|
|
51
|
+
};
|
|
52
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@arcaauth/eslint-plugin-jsx-a11y",
|
|
3
|
+
"version": "6.10.2",
|
|
4
|
+
"description": "Static AST checker for accessibility rules on JSX elements.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"eslint",
|
|
7
|
+
"eslintplugin",
|
|
8
|
+
"eslint-plugin",
|
|
9
|
+
"a11y",
|
|
10
|
+
"accessibility",
|
|
11
|
+
"jsx"
|
|
12
|
+
],
|
|
13
|
+
"author": "Ethan Cohen",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/arcaauth/eslint-plugin-jsx-a11y"
|
|
17
|
+
},
|
|
18
|
+
"main": "lib/index.js",
|
|
19
|
+
"scripts": {
|
|
20
|
+
"prepack": "npmignore --auto --commentLines=autogenerated && npm run build",
|
|
21
|
+
"build": "rimraf lib && babel src --out-dir lib --copy-files",
|
|
22
|
+
"create": "node ./scripts/create-rule",
|
|
23
|
+
"flow": "flow",
|
|
24
|
+
"lint:fix": "npm run lint -- --fix",
|
|
25
|
+
"lint": "npx eslint@8 --ext=js,mjs,cjs,ts,tsx .",
|
|
26
|
+
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
27
|
+
"prepublishOnly": "safe-publish-latest && npm run lint && npm run flow && npm run tests-only",
|
|
28
|
+
"pretest": "npm run lint:fix && npm run flow",
|
|
29
|
+
"test": "npm run tests-only",
|
|
30
|
+
"tests-only": "tape --require=@babel/register '__tests__/**/*.js'",
|
|
31
|
+
"posttest": "npx npm@'>=10.2' audit --production",
|
|
32
|
+
"pretest:examples": "npm run build",
|
|
33
|
+
"test:examples": "npm run test-example:legacy && npm run test-example:flat-esm && npm run test-example:flat-cjs",
|
|
34
|
+
"test-example:legacy": "cd examples/legacy && npm install && npm run lint",
|
|
35
|
+
"test-example:flat-esm": "cd examples/flat-esm && npm install && npm run lint",
|
|
36
|
+
"test-example:flat-cjs": "cd examples/flat-cjs && npm install && npm run lint",
|
|
37
|
+
"pregenerate-list-of-rules": "npm run build",
|
|
38
|
+
"generate-list-of-rules": "eslint-doc-generator --rule-doc-title-format prefix-name --rule-doc-section-options false --config-emoji recommended,☑️ --ignore-config flat/recommended --ignore-config flat/strict",
|
|
39
|
+
"generate-list-of-rules:check": "npm run generate-list-of-rules -- --check",
|
|
40
|
+
"version": "auto-changelog && git add CHANGELOG.md",
|
|
41
|
+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@babel/cli": "^7.25.9",
|
|
45
|
+
"@babel/core": "^7.26.0",
|
|
46
|
+
"@babel/eslint-parser": "^7.25.9",
|
|
47
|
+
"@babel/plugin-transform-flow-strip-types": "^7.25.9",
|
|
48
|
+
"@babel/register": "^7.25.9",
|
|
49
|
+
"auto-changelog": "^2.5.0",
|
|
50
|
+
"babel-plugin-add-module-exports": "^1.0.4",
|
|
51
|
+
"babel-preset-airbnb": "^5.0.0",
|
|
52
|
+
"eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9",
|
|
53
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
54
|
+
"eslint-doc-generator": "^1.7.1",
|
|
55
|
+
"eslint-plugin-eslint-plugin": "^4.3.0",
|
|
56
|
+
"eslint-plugin-flowtype": "^5.8.0 || ^8.0.3",
|
|
57
|
+
"eslint-plugin-import": "^2.31.0",
|
|
58
|
+
"estraverse": "^5.3.0",
|
|
59
|
+
"flow-bin": "^0.147.0",
|
|
60
|
+
"in-publish": "^2.0.1",
|
|
61
|
+
"jackspeak": "=2.1.1",
|
|
62
|
+
"jscodeshift": "^17.0.0",
|
|
63
|
+
"minimist": "^1.2.8",
|
|
64
|
+
"npmignore": "^0.3.1",
|
|
65
|
+
"object.assign": "^4.1.5",
|
|
66
|
+
"object.entries": "^1.1.8",
|
|
67
|
+
"rimraf": "^3.0.2",
|
|
68
|
+
"safe-publish-latest": "^2.0.0",
|
|
69
|
+
"semver": "^6.3.1",
|
|
70
|
+
"tape": "^5.9.0",
|
|
71
|
+
"to-ast": "^1.0.0"
|
|
72
|
+
},
|
|
73
|
+
"engines": {
|
|
74
|
+
"node": ">=4.0"
|
|
75
|
+
},
|
|
76
|
+
"license": "MIT",
|
|
77
|
+
"dependencies": {
|
|
78
|
+
"aria-query": "^5.3.2",
|
|
79
|
+
"array-includes": "^3.1.8",
|
|
80
|
+
"array.prototype.flatmap": "^1.3.2",
|
|
81
|
+
"ast-types-flow": "^0.0.8",
|
|
82
|
+
"axe-core": "^4.10.0",
|
|
83
|
+
"axobject-query": "^4.1.0",
|
|
84
|
+
"damerau-levenshtein": "^1.0.8",
|
|
85
|
+
"emoji-regex": "^9.2.2",
|
|
86
|
+
"hasown": "^2.0.2",
|
|
87
|
+
"jsx-ast-utils": "^3.3.5",
|
|
88
|
+
"language-tags": "^1.0.9",
|
|
89
|
+
"minimatch": "^3.1.2",
|
|
90
|
+
"object.fromentries": "^2.0.8",
|
|
91
|
+
"safe-regex-test": "^1.0.3",
|
|
92
|
+
"string.prototype.includes": "^2.0.1"
|
|
93
|
+
},
|
|
94
|
+
"peerDependencies": {
|
|
95
|
+
"eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9 || ^10"
|
|
96
|
+
},
|
|
97
|
+
"auto-changelog": {
|
|
98
|
+
"output": "CHANGELOG.md",
|
|
99
|
+
"template": "keepachangelog",
|
|
100
|
+
"unreleased": false,
|
|
101
|
+
"commitLimit": false,
|
|
102
|
+
"backfillLimit": false,
|
|
103
|
+
"hideCredit": true,
|
|
104
|
+
"startingVersion": "6.6.2"
|
|
105
|
+
},
|
|
106
|
+
"publishConfig": {
|
|
107
|
+
"access": "public",
|
|
108
|
+
"ignore": [
|
|
109
|
+
"!lib",
|
|
110
|
+
".github/workflows",
|
|
111
|
+
".flowconfig",
|
|
112
|
+
"/src",
|
|
113
|
+
"/reports",
|
|
114
|
+
"/flow",
|
|
115
|
+
"scripts/",
|
|
116
|
+
"CONTRIBUTING.md",
|
|
117
|
+
"/examples"
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
}
|