|
| 1 | +import accessibleEmoji from "./rules/accessible-emoji"; |
| 2 | +import altText from "./rules/alt-text"; |
| 3 | +import anchorHasContent from "./rules/anchor-has-content"; |
| 4 | +import ariaProps from "./rules/aria-props"; |
| 5 | +import ariaRole from "./rules/aria-role"; |
| 6 | +import ariaUnsupportedElements from "./rules/aria-unsupported-elements"; |
| 7 | +import clickEventsHaveKeyEvents from "./rules/click-events-have-key-events"; |
| 8 | +import formControlHasLabel from "./rules/form-control-has-label"; |
| 9 | +import headingHasContent from "./rules/heading-has-content"; |
| 10 | +import iframeHasTitle from "./rules/iframe-has-title"; |
| 11 | +import interactiveSupportsFocus from "./rules/interactive-supports-focus"; |
| 12 | +import labelHasFor from "./rules/label-has-for"; |
| 13 | +import mediaHasCaption from "./rules/media-has-caption"; |
| 14 | +import mouseEventsHaveKeyEvents from "./rules/mouse-events-have-key-events"; |
| 15 | +import noAccessKey from "./rules/no-access-key"; |
| 16 | +import noAutofocus from "./rules/no-autofocus"; |
| 17 | +import noDistractingElements from "./rules/no-distracting-elements"; |
| 18 | +import noOnchange from "./rules/no-onchange"; |
| 19 | +import noRedundantRoles from "./rules/no-redundant-roles"; |
| 20 | +import roleHasRequiredAriaProps from "./rules/role-has-required-aria-props"; |
| 21 | +import tabindexNoPositive from "./rules/tabindex-no-positive"; |
| 22 | + |
1 | 23 | export default {
|
2 | 24 | rules: {
|
3 |
| - "accessible-emoji": require("./rules/accessible-emoji"), |
4 |
| - "alt-text": require("./rules/alt-text"), |
5 |
| - "anchor-has-content": require("./rules/anchor-has-content"), |
6 |
| - "aria-props": require("./rules/aria-props"), |
7 |
| - "aria-role": require("./rules/aria-role"), |
8 |
| - "aria-unsupported-elements": require("./rules/aria-unsupported-elements"), |
9 |
| - "click-events-have-key-events": require("./rules/click-events-have-key-events"), |
10 |
| - "form-control-has-label": require("./rules/form-control-has-label"), |
11 |
| - "heading-has-content": require("./rules/heading-has-content"), |
12 |
| - "iframe-has-title": require("./rules/iframe-has-title"), |
13 |
| - "interactive-supports-focus": require("./rules/interactive-supports-focus"), |
14 |
| - "label-has-for": require("./rules/label-has-for"), |
15 |
| - "media-has-caption": require("./rules/media-has-caption"), |
16 |
| - "mouse-events-have-key-events": require("./rules/mouse-events-have-key-events"), |
17 |
| - "no-access-key": require("./rules/no-access-key"), |
18 |
| - "no-autofocus": require("./rules/no-autofocus"), |
19 |
| - "no-distracting-elements": require("./rules/no-distracting-elements"), |
20 |
| - "no-onchange": require("./rules/no-onchange"), |
21 |
| - "no-redundant-roles": require("./rules/no-redundant-roles"), |
22 |
| - "role-has-required-aria-props": require("./rules/role-has-required-aria-props"), |
23 |
| - "tabindex-no-positive": require("./rules/tabindex-no-positive") |
| 25 | + "accessible-emoji": accessibleEmoji, |
| 26 | + "alt-text": altText, |
| 27 | + "anchor-has-content": anchorHasContent, |
| 28 | + "aria-props": ariaProps, |
| 29 | + "aria-role": ariaRole, |
| 30 | + "aria-unsupported-elements": ariaUnsupportedElements, |
| 31 | + "click-events-have-key-events": clickEventsHaveKeyEvents, |
| 32 | + "form-control-has-label": formControlHasLabel, |
| 33 | + "heading-has-content": headingHasContent, |
| 34 | + "iframe-has-title": iframeHasTitle, |
| 35 | + "interactive-supports-focus": interactiveSupportsFocus, |
| 36 | + "label-has-for": labelHasFor, |
| 37 | + "media-has-caption": mediaHasCaption, |
| 38 | + "mouse-events-have-key-events": mouseEventsHaveKeyEvents, |
| 39 | + "no-access-key": noAccessKey, |
| 40 | + "no-autofocus": noAutofocus, |
| 41 | + "no-distracting-elements": noDistractingElements, |
| 42 | + "no-onchange": noOnchange, |
| 43 | + "no-redundant-roles": noRedundantRoles, |
| 44 | + "role-has-required-aria-props": roleHasRequiredAriaProps, |
| 45 | + "tabindex-no-positive": tabindexNoPositive |
24 | 46 | },
|
25 | 47 | configs: {
|
26 | 48 | recommended: {
|
27 | 49 | parser: require.resolve("vue-eslint-parser"),
|
| 50 | + parserOptions: { |
| 51 | + ecmaVersion: 2020 as const, |
| 52 | + sourceType: "module" as const |
| 53 | + }, |
| 54 | + env: { |
| 55 | + browser: true, |
| 56 | + es6: true |
| 57 | + }, |
28 | 58 | plugins: ["vuejs-accessibility"],
|
29 | 59 | rules: {
|
30 |
| - "vuejs-accessibility/accessible-emoji": "error", |
31 |
| - "vuejs-accessibility/alt-text": "error", |
32 |
| - "vuejs-accessibility/anchor-has-content": "error", |
33 |
| - "vuejs-accessibility/aria-props": "error", |
34 |
| - "vuejs-accessibility/aria-role": [ |
35 |
| - "error", |
36 |
| - { |
37 |
| - ignoreNonDOM: true |
38 |
| - } |
39 |
| - ], |
40 |
| - "vuejs-accessibility/aria-unsupported-elements": "error", |
41 |
| - "vuejs-accessibility/click-events-have-key-events": "error", |
42 |
| - "vuejs-accessibility/form-control-has-label": "error", |
43 |
| - "vuejs-accessibility/heading-has-content": "error", |
44 |
| - "vuejs-accessibility/iframe-has-title": "error", |
45 |
| - "vuejs-accessibility/interactive-supports-focus": [ |
46 |
| - "error", |
47 |
| - { |
48 |
| - tabbable: [ |
49 |
| - "button", |
50 |
| - "checkbox", |
51 |
| - "link", |
52 |
| - "searchbox", |
53 |
| - "spinbutton", |
54 |
| - "switch", |
55 |
| - "textbox" |
56 |
| - ] |
57 |
| - } |
58 |
| - ], |
59 |
| - "vuejs-accessibility/label-has-for": "error", |
60 |
| - "vuejs-accessibility/media-has-caption": "error", |
61 |
| - "vuejs-accessibility/mouse-events-have-key-events": "error", |
62 |
| - "vuejs-accessibility/no-access-key": "error", |
63 |
| - "vuejs-accessibility/no-autofocus": [ |
64 |
| - "error", |
65 |
| - { |
66 |
| - ignoreNonDOM: true |
67 |
| - } |
68 |
| - ], |
69 |
| - "vuejs-accessibility/no-distracting-elements": "error", |
70 |
| - "vuejs-accessibility/no-onchange": "error", |
71 |
| - "vuejs-accessibility/no-redundant-roles": "error", |
72 |
| - "vuejs-accessibility/role-has-required-aria-props": "error", |
73 |
| - "vuejs-accessibility/tabindex-no-positive": "error" |
| 60 | + "vuejs-accessibility/accessible-emoji": "error" as const, |
| 61 | + "vuejs-accessibility/alt-text": "error" as const, |
| 62 | + "vuejs-accessibility/anchor-has-content": "error" as const, |
| 63 | + "vuejs-accessibility/aria-props": "error" as const, |
| 64 | + "vuejs-accessibility/aria-role": "error" as const, |
| 65 | + "vuejs-accessibility/aria-unsupported-elements": "error" as const, |
| 66 | + "vuejs-accessibility/click-events-have-key-events": "error" as const, |
| 67 | + "vuejs-accessibility/form-control-has-label": "error" as const, |
| 68 | + "vuejs-accessibility/heading-has-content": "error" as const, |
| 69 | + "vuejs-accessibility/iframe-has-title": "error" as const, |
| 70 | + "vuejs-accessibility/interactive-supports-focus": "error" as const, |
| 71 | + "vuejs-accessibility/label-has-for": "error" as const, |
| 72 | + "vuejs-accessibility/media-has-caption": "error" as const, |
| 73 | + "vuejs-accessibility/mouse-events-have-key-events": "error" as const, |
| 74 | + "vuejs-accessibility/no-access-key": "error" as const, |
| 75 | + "vuejs-accessibility/no-autofocus": "error" as const, |
| 76 | + "vuejs-accessibility/no-distracting-elements": "error" as const, |
| 77 | + "vuejs-accessibility/no-onchange": "error" as const, |
| 78 | + "vuejs-accessibility/no-redundant-roles": "error" as const, |
| 79 | + "vuejs-accessibility/role-has-required-aria-props": "error" as const, |
| 80 | + "vuejs-accessibility/tabindex-no-positive": "error" as const |
74 | 81 | }
|
75 | 82 | }
|
76 | 83 | }
|
|
0 commit comments