@anolilab/eslint-config 11.3.0 → 11.3.1
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## @anolilab/eslint-config [11.3.1](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@11.3.0...@anolilab/eslint-config@11.3.1) (2023-08-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* update usage of createConfig utility in jsx-a11y config ([9f14734](https://github.com/anolilab/javascript-style-guide/commit/9f147346ad43691c48a83860280e88ee54b8850c))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Miscellaneous Chores
|
|
10
|
+
|
|
11
|
+
* **deps:** update dependency eslint to ^8.47.0 ([#730](https://github.com/anolilab/javascript-style-guide/issues/730)) ([afa200d](https://github.com/anolilab/javascript-style-guide/commit/afa200d232ebee4d60e816b8b616d690845e401b))
|
|
12
|
+
|
|
1
13
|
## @anolilab/eslint-config [11.3.0](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/eslint-config@11.2.3...@anolilab/eslint-config@11.3.0) (2023-08-10)
|
|
2
14
|
|
|
3
15
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var chunkWG6GTAIA_js = require('../../chunk-WG6GTAIA.js');
|
|
3
4
|
require('../../chunk-MFE6DF6Y.js');
|
|
4
5
|
var packageJsonUtils = require('@anolilab/package-json-utils');
|
|
5
6
|
|
|
6
|
-
!global.hasAnolilabEsLintConfigJsyA11yStorybook&&(packageJsonUtils.hasDevDependency("storybook")||packageJsonUtils.hasDependency("storybook"))&&(global.hasAnolilabEsLintConfigJsyA11yStorybook=!0);var
|
|
7
|
+
!global.hasAnolilabEsLintConfigJsyA11yStorybook&&(packageJsonUtils.hasDevDependency("storybook")||packageJsonUtils.hasDependency("storybook"))&&(global.hasAnolilabEsLintConfigJsyA11yStorybook=!0);var a=chunkWG6GTAIA_js.a("jsx_and_tsx",{parserOptions:{ecmaFeatures:{jsx:!0}},plugins:["jsx-a11y"],rules:{"jsx-a11y/accessible-emoji":"off","jsx-a11y/alt-text":["error",{area:[],elements:["img","object","area",'input[type="image"]'],img:[],'input[type="image"]':[],object:[]}],"jsx-a11y/anchor-has-content":["error",{components:[]}],"jsx-a11y/anchor-is-valid":["error",{aspects:["noHref","invalidHref","preferButton",...global.hasAnolilabEsLintConfigJsyA11yStorybook?["overrideParams","kind","story","to"]:[]],components:["A","LinkTo","Link"],specialLink:["to"]}],"jsx-a11y/aria-activedescendant-has-tabindex":"error","jsx-a11y/aria-props":"error","jsx-a11y/aria-proptypes":"error","jsx-a11y/aria-role":["error",{ignoreNonDOM:!1}],"jsx-a11y/aria-unsupported-elements":"error","jsx-a11y/autocomplete-valid":["off",{inputComponents:[]}],"jsx-a11y/click-events-have-key-events":"error","jsx-a11y/control-has-associated-label":["error",{controlComponents:[],depth:5,ignoreElements:["audio","canvas","embed","input","textarea","tr","video"],ignoreRoles:["grid","listbox","menu","menubar","radiogroup","row","tablist","toolbar","tree","treegrid"],labelAttributes:["label"]}],"jsx-a11y/heading-has-content":["error",{components:[""]}],"jsx-a11y/html-has-lang":"error","jsx-a11y/iframe-has-title":"error","jsx-a11y/img-redundant-alt":"error","jsx-a11y/interactive-supports-focus":"error","jsx-a11y/label-has-associated-control":["error",{assert:"both",controlComponents:[],depth:25,labelAttributes:[],labelComponents:[]}],"jsx-a11y/label-has-for":["off",{allowChildren:!1,components:[],required:{every:["nesting","id"]}}],"jsx-a11y/lang":"error","jsx-a11y/media-has-caption":["error",{audio:[],track:[],video:[]}],"jsx-a11y/mouse-events-have-key-events":"error","jsx-a11y/no-access-key":"error","jsx-a11y/no-autofocus":["error",{ignoreNonDOM:!0}],"jsx-a11y/no-distracting-elements":["error",{elements:["marquee","blink"]}],"jsx-a11y/no-interactive-element-to-noninteractive-role":["error",{tr:["none","presentation"]}],"jsx-a11y/no-noninteractive-element-interactions":["error",{handlers:["onClick","onMouseDown","onMouseUp","onKeyPress","onKeyDown","onKeyUp"]}],"jsx-a11y/no-noninteractive-element-to-interactive-role":["error",{li:["menuitem","option","row","tab","treeitem"],ol:["listbox","menu","menubar","radiogroup","tablist","tree","treegrid"],table:["grid"],td:["gridcell"],ul:["listbox","menu","menubar","radiogroup","tablist","tree","treegrid"]}],"jsx-a11y/no-noninteractive-tabindex":["error",{roles:["tabpanel"],tags:[]}],"jsx-a11y/no-onchange":"off","jsx-a11y/no-redundant-roles":"error","jsx-a11y/no-static-element-interactions":["error",{handlers:["onClick","onMouseDown","onMouseUp","onKeyPress","onKeyDown","onKeyUp"]}],"jsx-a11y/role-has-required-aria-props":"error","jsx-a11y/role-supports-aria-props":"error","jsx-a11y/scope":"error","jsx-a11y/tabindex-no-positive":"error"}}),s=a;
|
|
7
8
|
|
|
8
|
-
module.exports =
|
|
9
|
+
module.exports = s;
|
|
9
10
|
//# sourceMappingURL=out.js.map
|
|
10
11
|
//# sourceMappingURL=jsx-a11y.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/config/plugins/jsx-a11y.ts"],"names":["hasDependency","hasDevDependency","config","jsx_a11y_default"],"mappings":"gCAAA,OAAS,iBAAAA,EAAe,oBAAAC,MAAwB,+BAG5C,CAAC,OAAO,0CAA4CA,EAAiB,WAAW,GAAKD,EAAc,WAAW,KAC9G,OAAO,wCAA0C,IAGrD,IAAME,EAAwB,CAC1B,cAAe,CACX,aAAc,CACV,IAAK,EACT,CACJ,EAEA,QAAS,CAAC,WAAY,OAAO,EAE7B,MAAO,CAGH,4BAA6B,MAI7B,oBAAqB,CACjB,QACA,CACI,KAAM,CAAC,EACP,SAAU,CAAC,MAAO,SAAU,OAAQ,qBAAqB,EACzD,IAAK,CAAC,EACN,sBAAuB,CAAC,EACxB,OAAQ,CAAC,CACb,CACJ,EAIA,8BAA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CAChC,QACA,CACI,SAAU,CAAC,UAAW,OAAO,CACjC,CACJ,EAKA,yDAA0D,CACtD,QACA,CACI,GAAI,CAAC,OAAQ,cAAc,CAC/B,CACJ,EAIA,kDAAmD,CAC/C,QACA,CACI,SAAU,CAAC,UAAW,cAAe,YAAa,aAAc,YAAa,SAAS,CAC1F,CACJ,EAIA,yDAA0D,CACtD,QACA,CACI,GAAI,CAAC,WAAY,SAAU,MAAO,MAAO,UAAU,EACnD,GAAI,CAAC,UAAW,OAAQ,UAAW,aAAc,UAAW,OAAQ,UAAU,EAC9E,MAAO,CAAC,MAAM,EACd,GAAI,CAAC,UAAU,EACf,GAAI,CAAC,UAAW,OAAQ,UAAW,aAAc,UAAW,OAAQ,UAAU,CAClF,CACJ,EAIA,sCAAuC,CACnC,QACA,CACI,MAAO,CAAC,UAAU,EAClB,KAAM,CAAC,CACX,CACJ,EAIA,uBAAwB,MAIxB,8BAA+B,QAI/B,0CAA2C,CACvC,QACA,CACI,SAAU,CAAC,UAAW,cAAe,YAAa,aAAc,YAAa,SAAS,CAC1F,CACJ,EAIA,wCAAyC,QAIzC,oCAAqC,QAIrC,iBAAkB,QAIlB,gCAAiC,OACrC,CACJ,EAEOC,EAAQD","sourcesContent":["import { hasDependency, hasDevDependency } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\n\nif (!global.hasAnolilabEsLintConfigJsyA11yStorybook && (hasDevDependency(\"storybook\") || hasDependency(\"storybook\"))) {\n global.hasAnolilabEsLintConfigJsyA11yStorybook = true;\n}\n\nconst config: Linter.Config = {\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n\n plugins: [\"jsx-a11y\", \"react\"],\n\n rules: {\n // Enforce that anchors have content\n // disabled; rule is deprecated\n \"jsx-a11y/accessible-emoji\": \"off\",\n\n // Require ARIA roles to be valid and non-abstract\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/alt-text.md\n \"jsx-a11y/alt-text\": [\n \"error\",\n {\n area: [],\n elements: [\"img\", \"object\", \"area\", 'input[type=\"image\"]'],\n img: [],\n 'input[type=\"image\"]': [],\n object: [],\n },\n ],\n\n // Enforce all aria-* props are valid.\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-has-content.md\n \"jsx-a11y/anchor-has-content\": [\"error\", { components: [] }],\n\n // Enforce ARIA state and property values are valid.\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/0745af376cdc8686d85a361ce36952b1fb1ccf6e/docs/rules/anchor-is-valid.md\n \"jsx-a11y/anchor-is-valid\": [\n \"error\",\n {\n aspects: [\n \"noHref\",\n \"invalidHref\",\n \"preferButton\",\n ...(global.hasAnolilabEsLintConfigJsyA11yStorybook ? [\"overrideParams\", \"kind\", \"story\", \"to\"] : []),\n ],\n components: [\"A\", \"LinkTo\", \"Link\"],\n specialLink: [\"to\"],\n },\n ],\n\n // Enforce that elements that do not support ARIA roles, states, and\n // properties do not have those attributes.\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-activedescendant-has-tabindex.md\n \"jsx-a11y/aria-activedescendant-has-tabindex\": \"error\",\n\n // Enforce that all elements that require alternative text have meaningful information\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-props.md\n \"jsx-a11y/aria-props\": \"error\",\n\n // Prevent img alt text from containing redundant words like \"image\", \"picture\", or \"photo\"\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-proptypes.md\n \"jsx-a11y/aria-proptypes\": \"error\",\n\n // require that JSX labels use \"htmlFor\"\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-for.md\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-role.md\n \"jsx-a11y/aria-role\": [\"error\", { ignoreNonDOM: false }],\n\n // Enforce that a label tag has a text label and an associated control.\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-unsupported-elements.md\n \"jsx-a11y/aria-unsupported-elements\": \"error\",\n\n // Enforce that a control (an interactive element) has a text label.\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/29c68596b15c4ff0a40daae6d4a2670e36e37d35/docs/rules/autocomplete-valid.md\n \"jsx-a11y/autocomplete-valid\": [\n \"off\",\n {\n inputComponents: [],\n },\n ],\n\n // require that mouseover/out come with focus/blur, for keyboard-only users\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/click-events-have-key-events.md\n \"jsx-a11y/click-events-have-key-events\": \"error\",\n\n // Prevent use of `accessKey`\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/control-has-associated-label.md\n \"jsx-a11y/control-has-associated-label\": [\n \"error\",\n {\n controlComponents: [],\n depth: 5,\n ignoreElements: [\"audio\", \"canvas\", \"embed\", \"input\", \"textarea\", \"tr\", \"video\"],\n ignoreRoles: [\"grid\", \"listbox\", \"menu\", \"menubar\", \"radiogroup\", \"row\", \"tablist\", \"toolbar\", \"tree\", \"treegrid\"],\n labelAttributes: [\"label\"],\n },\n ],\n\n // require onBlur instead of onChange\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/heading-has-content.md\n \"jsx-a11y/heading-has-content\": [\"error\", { components: [\"\"] }],\n\n // Elements with an interactive role and interaction handlers must be focusable\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/html-has-lang.md\n \"jsx-a11y/html-has-lang\": \"error\",\n\n // Enforce that elements with ARIA roles must have all required attributes\n // for that role.\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/iframe-has-title.md\n \"jsx-a11y/iframe-has-title\": \"error\",\n\n // Enforce that elements with explicit or implicit roles defined contain\n // only aria-* properties supported by that role.\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/img-redundant-alt.md\n \"jsx-a11y/img-redundant-alt\": \"error\",\n\n // Enforce tabIndex value is not greater than zero.\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/interactive-supports-focus.md\n \"jsx-a11y/interactive-supports-focus\": \"error\",\n\n // ensure <hX> tags have content and are not aria-hidden\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/b800f40a2a69ad48015ae9226fbe879f946757ed/docs/rules/label-has-associated-control.md\n \"jsx-a11y/label-has-associated-control\": [\n \"error\",\n {\n assert: \"both\",\n controlComponents: [],\n depth: 25,\n labelAttributes: [],\n labelComponents: [],\n },\n ],\n\n // require HTML elements to have a \"lang\" prop\n // deprecated: replaced by `label-has-associated-control` rule\n \"jsx-a11y/label-has-for\": [\n \"off\",\n {\n allowChildren: false,\n components: [],\n required: {\n every: [\"nesting\", \"id\"],\n },\n },\n ],\n\n // require HTML element's lang prop to be valid\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/lang.md\n \"jsx-a11y/lang\": \"error\",\n\n // prevent distracting elements, like <marquee> and <blink>\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/media-has-caption.md\n \"jsx-a11y/media-has-caption\": [\n \"error\",\n {\n audio: [],\n track: [],\n video: [],\n },\n ],\n\n // only allow <th> to have the \"scope\" attr\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/mouse-events-have-key-events.md\n \"jsx-a11y/mouse-events-have-key-events\": \"error\",\n\n // require onClick be accompanied by onKeyUp/onKeyDown/onKeyPress\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-access-key.md\n \"jsx-a11y/no-access-key\": \"error\",\n\n // Enforce that DOM elements without semantic behavior not have interaction handlers\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-autofocus.md\n \"jsx-a11y/no-autofocus\": [\"error\", { ignoreNonDOM: true }],\n\n // A non-interactive element does not support event handlers (mouse and key handlers)\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-distracting-elements.md\n \"jsx-a11y/no-distracting-elements\": [\n \"error\",\n {\n elements: [\"marquee\", \"blink\"],\n },\n ],\n\n // ensure emoji are accessible\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/accessible-emoji.md\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-interactive-element-to-noninteractive-role.md\n \"jsx-a11y/no-interactive-element-to-noninteractive-role\": [\n \"error\",\n {\n tr: [\"none\", \"presentation\"],\n },\n ],\n\n // elements with aria-activedescendant must be tabbable\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-interactions.md\n \"jsx-a11y/no-noninteractive-element-interactions\": [\n \"error\",\n {\n handlers: [\"onClick\", \"onMouseDown\", \"onMouseUp\", \"onKeyPress\", \"onKeyDown\", \"onKeyUp\"],\n },\n ],\n\n // ensure iframe elements have a unique title\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-to-interactive-role.md\n \"jsx-a11y/no-noninteractive-element-to-interactive-role\": [\n \"error\",\n {\n li: [\"menuitem\", \"option\", \"row\", \"tab\", \"treeitem\"],\n ol: [\"listbox\", \"menu\", \"menubar\", \"radiogroup\", \"tablist\", \"tree\", \"treegrid\"],\n table: [\"grid\"],\n td: [\"gridcell\"],\n ul: [\"listbox\", \"menu\", \"menubar\", \"radiogroup\", \"tablist\", \"tree\", \"treegrid\"],\n },\n ],\n\n // prohibit autoFocus prop\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-tabindex.md\n \"jsx-a11y/no-noninteractive-tabindex\": [\n \"error\",\n {\n roles: [\"tabpanel\"],\n tags: [],\n },\n ],\n\n // ensure HTML elements do not specify redundant ARIA roles\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-onchange.md\n \"jsx-a11y/no-onchange\": \"off\",\n\n // media elements must have captions\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-redundant-roles.md\n \"jsx-a11y/no-redundant-roles\": \"error\",\n\n // WAI-ARIA roles should not be used to convert an interactive element to non-interactive\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md\n \"jsx-a11y/no-static-element-interactions\": [\n \"error\",\n {\n handlers: [\"onClick\", \"onMouseDown\", \"onMouseUp\", \"onKeyPress\", \"onKeyDown\", \"onKeyUp\"],\n },\n ],\n\n // WAI-ARIA roles should not be used to convert a non-interactive element to interactive\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-has-required-aria-props.md\n \"jsx-a11y/role-has-required-aria-props\": \"error\",\n\n // Tab key navigation should be limited to elements on the page that can be interacted with.\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-supports-aria-props.md\n \"jsx-a11y/role-supports-aria-props\": \"error\",\n\n // ensure <a> tags are valid\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/scope.md\n \"jsx-a11y/scope\": \"error\",\n\n // Ensure the autocomplete attribute is correct and suitable for the form field it is used with\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/tabindex-no-positive.md\n \"jsx-a11y/tabindex-no-positive\": \"error\",\n },\n};\n\nexport default config;\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../src/config/plugins/jsx-a11y.ts"],"names":["hasDependency","hasDevDependency","config","createConfig","jsx_a11y_default"],"mappings":"4EAAA,OAAS,iBAAAA,EAAe,oBAAAC,MAAwB,+BAI5C,CAAC,OAAO,0CAA4CA,EAAiB,WAAW,GAAKD,EAAc,WAAW,KAC9G,OAAO,wCAA0C,IAGrD,IAAME,EAAwBC,EAAa,cAAe,CACtD,cAAe,CACX,aAAc,CACV,IAAK,EACT,CACJ,EAEA,QAAS,CAAC,UAAU,EAEpB,MAAO,CAGH,4BAA6B,MAI7B,oBAAqB,CACjB,QACA,CACI,KAAM,CAAC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R,MAAO,CAAC,CACZ,CACJ,EAIA,wCAAyC,QAIzC,yBAA0B,QAI1B,wBAAyB,CAAC,QAAS,CAAE,aAAc,EAAK,CAAC,EAIzD,mCAAoC,CAChC,QACA,CACI,SAAU,CAAC,UAAW,OAAO,CACjC,CACJ,EAKA,yDAA0D,CACtD,QACA,CACI,GAAI,CAAC,OAAQ,cAAc,CAC/B,CACJ,EAIA,kDAAmD,CAC/C,QACA,CACI,SAAU,CAAC,UAAW,cAAe,YAAa,aAAc,YAAa,SAAS,CAC1F,CACJ,EAIA,yDAA0D,CACtD,QACA,CACI,GAAI,CAAC,WAAY,SAAU,MAAO,MAAO,UAAU,EACnD,GAAI,CAAC,UAAW,OAAQ,UAAW,aAAc,UAAW,OAAQ,UAAU,EAC9E,MAAO,CAAC,MAAM,EACd,GAAI,CAAC,UAAU,EACf,GAAI,CAAC,UAAW,OAAQ,UAAW,aAAc,UAAW,OAAQ,UAAU,CAClF,CACJ,EAIA,sCAAuC,CACnC,QACA,CACI,MAAO,CAAC,UAAU,EAClB,KAAM,CAAC,CACX,CACJ,EAIA,uBAAwB,MAIxB,8BAA+B,QAI/B,0CAA2C,CACvC,QACA,CACI,SAAU,CAAC,UAAW,cAAe,YAAa,aAAc,YAAa,SAAS,CAC1F,CACJ,EAIA,wCAAyC,QAIzC,oCAAqC,QAIrC,iBAAkB,QAIlB,gCAAiC,OACrC,CACJ,CAAC,EAEMC,EAAQF","sourcesContent":["import { hasDependency, hasDevDependency } from \"@anolilab/package-json-utils\";\nimport type { Linter } from \"eslint\";\nimport { createConfig } from \"../../utils/create-config\";\n\nif (!global.hasAnolilabEsLintConfigJsyA11yStorybook && (hasDevDependency(\"storybook\") || hasDependency(\"storybook\"))) {\n global.hasAnolilabEsLintConfigJsyA11yStorybook = true;\n}\n\nconst config: Linter.Config = createConfig(\"jsx_and_tsx\", {\n parserOptions: {\n ecmaFeatures: {\n jsx: true,\n },\n },\n\n plugins: [\"jsx-a11y\"],\n\n rules: {\n // Enforce that anchors have content\n // disabled; rule is deprecated\n \"jsx-a11y/accessible-emoji\": \"off\",\n\n // Require ARIA roles to be valid and non-abstract\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/alt-text.md\n \"jsx-a11y/alt-text\": [\n \"error\",\n {\n area: [],\n elements: [\"img\", \"object\", \"area\", 'input[type=\"image\"]'],\n img: [],\n 'input[type=\"image\"]': [],\n object: [],\n },\n ],\n\n // Enforce all aria-* props are valid.\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-has-content.md\n \"jsx-a11y/anchor-has-content\": [\"error\", { components: [] }],\n\n // Enforce ARIA state and property values are valid.\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/0745af376cdc8686d85a361ce36952b1fb1ccf6e/docs/rules/anchor-is-valid.md\n \"jsx-a11y/anchor-is-valid\": [\n \"error\",\n {\n aspects: [\n \"noHref\",\n \"invalidHref\",\n \"preferButton\",\n ...(global.hasAnolilabEsLintConfigJsyA11yStorybook ? [\"overrideParams\", \"kind\", \"story\", \"to\"] : []),\n ],\n components: [\"A\", \"LinkTo\", \"Link\"],\n specialLink: [\"to\"],\n },\n ],\n\n // Enforce that elements that do not support ARIA roles, states, and\n // properties do not have those attributes.\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-activedescendant-has-tabindex.md\n \"jsx-a11y/aria-activedescendant-has-tabindex\": \"error\",\n\n // Enforce that all elements that require alternative text have meaningful information\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-props.md\n \"jsx-a11y/aria-props\": \"error\",\n\n // Prevent img alt text from containing redundant words like \"image\", \"picture\", or \"photo\"\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-proptypes.md\n \"jsx-a11y/aria-proptypes\": \"error\",\n\n // require that JSX labels use \"htmlFor\"\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-for.md\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-role.md\n \"jsx-a11y/aria-role\": [\"error\", { ignoreNonDOM: false }],\n\n // Enforce that a label tag has a text label and an associated control.\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-unsupported-elements.md\n \"jsx-a11y/aria-unsupported-elements\": \"error\",\n\n // Enforce that a control (an interactive element) has a text label.\n // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/29c68596b15c4ff0a40daae6d4a2670e36e37d35/docs/rules/autocomplete-valid.md\n \"jsx-a11y/autocomplete-valid\": [\n \"off\",\n {\n inputComponents: [],\n },\n ],\n\n // require that mouseover/out come with focus/blur, for keyboard-only users\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/click-events-have-key-events.md\n \"jsx-a11y/click-events-have-key-events\": \"error\",\n\n // Prevent use of `accessKey`\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/control-has-associated-label.md\n \"jsx-a11y/control-has-associated-label\": [\n \"error\",\n {\n controlComponents: [],\n depth: 5,\n ignoreElements: [\"audio\", \"canvas\", \"embed\", \"input\", \"textarea\", \"tr\", \"video\"],\n ignoreRoles: [\"grid\", \"listbox\", \"menu\", \"menubar\", \"radiogroup\", \"row\", \"tablist\", \"toolbar\", \"tree\", \"treegrid\"],\n labelAttributes: [\"label\"],\n },\n ],\n\n // require onBlur instead of onChange\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/heading-has-content.md\n \"jsx-a11y/heading-has-content\": [\"error\", { components: [\"\"] }],\n\n // Elements with an interactive role and interaction handlers must be focusable\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/html-has-lang.md\n \"jsx-a11y/html-has-lang\": \"error\",\n\n // Enforce that elements with ARIA roles must have all required attributes\n // for that role.\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/iframe-has-title.md\n \"jsx-a11y/iframe-has-title\": \"error\",\n\n // Enforce that elements with explicit or implicit roles defined contain\n // only aria-* properties supported by that role.\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/img-redundant-alt.md\n \"jsx-a11y/img-redundant-alt\": \"error\",\n\n // Enforce tabIndex value is not greater than zero.\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/interactive-supports-focus.md\n \"jsx-a11y/interactive-supports-focus\": \"error\",\n\n // ensure <hX> tags have content and are not aria-hidden\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/b800f40a2a69ad48015ae9226fbe879f946757ed/docs/rules/label-has-associated-control.md\n \"jsx-a11y/label-has-associated-control\": [\n \"error\",\n {\n assert: \"both\",\n controlComponents: [],\n depth: 25,\n labelAttributes: [],\n labelComponents: [],\n },\n ],\n\n // require HTML elements to have a \"lang\" prop\n // deprecated: replaced by `label-has-associated-control` rule\n \"jsx-a11y/label-has-for\": [\n \"off\",\n {\n allowChildren: false,\n components: [],\n required: {\n every: [\"nesting\", \"id\"],\n },\n },\n ],\n\n // require HTML element's lang prop to be valid\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/lang.md\n \"jsx-a11y/lang\": \"error\",\n\n // prevent distracting elements, like <marquee> and <blink>\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/media-has-caption.md\n \"jsx-a11y/media-has-caption\": [\n \"error\",\n {\n audio: [],\n track: [],\n video: [],\n },\n ],\n\n // only allow <th> to have the \"scope\" attr\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/mouse-events-have-key-events.md\n \"jsx-a11y/mouse-events-have-key-events\": \"error\",\n\n // require onClick be accompanied by onKeyUp/onKeyDown/onKeyPress\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-access-key.md\n \"jsx-a11y/no-access-key\": \"error\",\n\n // Enforce that DOM elements without semantic behavior not have interaction handlers\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-autofocus.md\n \"jsx-a11y/no-autofocus\": [\"error\", { ignoreNonDOM: true }],\n\n // A non-interactive element does not support event handlers (mouse and key handlers)\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-distracting-elements.md\n \"jsx-a11y/no-distracting-elements\": [\n \"error\",\n {\n elements: [\"marquee\", \"blink\"],\n },\n ],\n\n // ensure emoji are accessible\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/accessible-emoji.md\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-interactive-element-to-noninteractive-role.md\n \"jsx-a11y/no-interactive-element-to-noninteractive-role\": [\n \"error\",\n {\n tr: [\"none\", \"presentation\"],\n },\n ],\n\n // elements with aria-activedescendant must be tabbable\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-interactions.md\n \"jsx-a11y/no-noninteractive-element-interactions\": [\n \"error\",\n {\n handlers: [\"onClick\", \"onMouseDown\", \"onMouseUp\", \"onKeyPress\", \"onKeyDown\", \"onKeyUp\"],\n },\n ],\n\n // ensure iframe elements have a unique title\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-to-interactive-role.md\n \"jsx-a11y/no-noninteractive-element-to-interactive-role\": [\n \"error\",\n {\n li: [\"menuitem\", \"option\", \"row\", \"tab\", \"treeitem\"],\n ol: [\"listbox\", \"menu\", \"menubar\", \"radiogroup\", \"tablist\", \"tree\", \"treegrid\"],\n table: [\"grid\"],\n td: [\"gridcell\"],\n ul: [\"listbox\", \"menu\", \"menubar\", \"radiogroup\", \"tablist\", \"tree\", \"treegrid\"],\n },\n ],\n\n // prohibit autoFocus prop\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-tabindex.md\n \"jsx-a11y/no-noninteractive-tabindex\": [\n \"error\",\n {\n roles: [\"tabpanel\"],\n tags: [],\n },\n ],\n\n // ensure HTML elements do not specify redundant ARIA roles\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-onchange.md\n \"jsx-a11y/no-onchange\": \"off\",\n\n // media elements must have captions\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-redundant-roles.md\n \"jsx-a11y/no-redundant-roles\": \"error\",\n\n // WAI-ARIA roles should not be used to convert an interactive element to non-interactive\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md\n \"jsx-a11y/no-static-element-interactions\": [\n \"error\",\n {\n handlers: [\"onClick\", \"onMouseDown\", \"onMouseUp\", \"onKeyPress\", \"onKeyDown\", \"onKeyUp\"],\n },\n ],\n\n // WAI-ARIA roles should not be used to convert a non-interactive element to interactive\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-has-required-aria-props.md\n \"jsx-a11y/role-has-required-aria-props\": \"error\",\n\n // Tab key navigation should be limited to elements on the page that can be interacted with.\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-supports-aria-props.md\n \"jsx-a11y/role-supports-aria-props\": \"error\",\n\n // ensure <a> tags are valid\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/scope.md\n \"jsx-a11y/scope\": \"error\",\n\n // Ensure the autocomplete attribute is correct and suitable for the form field it is used with\n // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/tabindex-no-positive.md\n \"jsx-a11y/tabindex-no-positive\": \"error\",\n },\n});\n\nexport default config;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anolilab/eslint-config",
|
|
3
|
-
"version": "11.3.
|
|
3
|
+
"version": "11.3.1",
|
|
4
4
|
"description": "ESLint shareable config for the Anolilab JavaScript style guide.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
"@types/confusing-browser-globals": "^1.0.0",
|
|
178
178
|
"@types/eslint": "^8.44.2",
|
|
179
179
|
"@types/semver": "^7.5.0",
|
|
180
|
-
"eslint": "^8.
|
|
180
|
+
"eslint": "^8.47.0",
|
|
181
181
|
"eslint-find-rules": "^4.1.0",
|
|
182
182
|
"eslint-plugin-babel": "^5.3.1",
|
|
183
183
|
"eslint-plugin-cypress": "^2.14.0",
|