1{
2  "plugins": [
3    "jsx-a11y" // require("eslint-plugin-jsx-a11y")
4  ],
5  "extends": [
6    "plugin:jsx-a11y/recommended", // require("eslint-plugin-jsx-a11y")
7  ],
8  "rules": {
9    // TODO: these rules should eventually be removed in favour of the
10    // plugin:jsx-a11y/recommended set (which they override) that has different severity
11    // levels.
12    "jsx-a11y/accessible-emoji": "warn",
13    "jsx-a11y/alt-text": "error",
14    "jsx-a11y/anchor-has-content": "warn",
15    "jsx-a11y/anchor-is-valid": "error",
16    "jsx-a11y/aria-activedescendant-has-tabindex": "warn",
17    "jsx-a11y/aria-props": "warn",
18    "jsx-a11y/aria-proptypes": "warn",
19    "jsx-a11y/aria-role": "warn",
20    "jsx-a11y/aria-unsupported-elements": "warn",
21    "jsx-a11y/click-events-have-key-events": "warn",
22    "jsx-a11y/heading-has-content": "warn",
23    "jsx-a11y/html-has-lang": "warn",
24    "jsx-a11y/iframe-has-title": "warn",
25    "jsx-a11y/img-redundant-alt": "warn",
26    "jsx-a11y/interactive-supports-focus": ["warn", {
27      "tabbable": ["button", "checkbox", "link", "searchbox", "spinbutton", "switch", "textbox"]
28    }],
29    "jsx-a11y/label-has-for": ["error", {
30      "required": {
31        "some": [ "nesting", "id" ]
32      }
33    }],
34    "jsx-a11y/label-has-associated-control": ["error", {
35      "required": {
36        "some": [ "nesting", "id" ]
37      }
38    }],
39    "jsx-a11y/media-has-caption": "warn",
40    "jsx-a11y/mouse-events-have-key-events": "warn",
41    "jsx-a11y/no-access-key": "warn",
42    "jsx-a11y/no-autofocus": "error",
43    "jsx-a11y/no-distracting-elements": "warn",
44
45    "jsx-a11y/no-interactive-element-to-noninteractive-role": ["warn", {
46      "tr": ["none", "presentation"]
47    }],
48    "jsx-a11y/no-noninteractive-element-interactions": ["warn", {
49      "handlers": ["onClick", "onError", "onLoad", "onMouseDown", "onMouseUp", "onKeyPress", "onKeyDown", "onKeyUp"],
50      "body": ["onError", "onLoad"],
51      "iframe": ["onError", "onLoad"],
52      "img": ["onError", "onLoad"]
53    }],
54    "jsx-a11y/no-noninteractive-element-to-interactive-role": ["warn", {
55      "ul": ["listbox", "menu", "menubar", "radiogroup", "tablist", "tree", "treegrid"],
56      "ol": ["listbox", "menu", "menubar", "radiogroup", "tablist", "tree", "treegrid"],
57      "li": ["menuitem", "option", "row", "tab", "treeitem"],
58      "table": ["grid"],
59      "td": ["gridcell"]
60    }],
61    "jsx-a11y/no-noninteractive-tabindex": ["warn", {
62      "tags": [],
63      "roles": ["tabpanel"]
64    }],
65    "jsx-a11y/no-onchange": "warn",
66    "jsx-a11y/no-redundant-roles": "error",
67    "jsx-a11y/no-static-element-interactions": ["warn", {
68      "handlers": ["onClick", "onMouseDown", "onMouseUp", "onKeyPress", "onKeyDown", "onKeyUp"]
69    }],
70    "jsx-a11y/role-has-required-aria-props": "warn",
71    "jsx-a11y/role-supports-aria-props": "warn",
72    "jsx-a11y/scope": "warn",
73    "jsx-a11y/tabindex-no-positive": "warn"
74  }
75}
76