Bump version
This commit is contained in:
parent
674eaf1811
commit
1e6d679af3
18
dist/package.json
vendored
18
dist/package.json
vendored
@ -1,18 +1,19 @@
|
||||
{
|
||||
"name": "@aet/eslint-rules",
|
||||
"version": "0.0.27",
|
||||
"version": "0.0.32",
|
||||
"license": "UNLICENSED",
|
||||
"peerDependencies": {
|
||||
"eslint": "^8.57.0",
|
||||
"typescript": "^5.4.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@aet/eslint-define-config": "0.1.0-beta.1",
|
||||
"@eslint-community/eslint-utils": "^4.4.0",
|
||||
"@types/eslint": "^8.56.10",
|
||||
"@typescript-eslint/eslint-plugin": "^7.13.0",
|
||||
"@typescript-eslint/parser": "^7.13.0",
|
||||
"@typescript-eslint/type-utils": "^7.13.0",
|
||||
"@typescript-eslint/utils": "^7.13.0",
|
||||
"@typescript-eslint/eslint-plugin": "^7.14.1",
|
||||
"@typescript-eslint/parser": "^7.14.1",
|
||||
"@typescript-eslint/type-utils": "^7.14.1",
|
||||
"@typescript-eslint/utils": "^7.14.1",
|
||||
"aria-query": "^5.3.0",
|
||||
"axe-core": "^4.9.1",
|
||||
"axobject-query": "^4.0.0",
|
||||
@ -22,12 +23,11 @@
|
||||
"emoji-regex": "^10.3.0",
|
||||
"enhanced-resolve": "^5.17.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-define-config": "^1.24.1",
|
||||
"eslint-import-resolver-node": "^0.3.9",
|
||||
"eslint-module-utils": "^2.8.1",
|
||||
"eslint-plugin-es-x": "^7.7.0",
|
||||
"eslint-plugin-import-x": "^0.5.1",
|
||||
"eslint-plugin-jsdoc": "^48.2.12",
|
||||
"eslint-plugin-import-x": "^0.5.2",
|
||||
"eslint-plugin-jsdoc": "^48.5.0",
|
||||
"eslint-plugin-unicorn": "^54.0.0",
|
||||
"esprima": "^4.0.1",
|
||||
"esquery": "^1.5.0",
|
||||
@ -39,7 +39,7 @@
|
||||
"is-glob": "^4.0.3",
|
||||
"language-tags": "^1.0.9",
|
||||
"lodash": "^4.17.21",
|
||||
"minimatch": "^9.0.4",
|
||||
"minimatch": "^9.0.5",
|
||||
"resolve": "^2.0.0-next.5",
|
||||
"semver": "^7.6.2",
|
||||
"tsconfig-paths": "^4.2.0"
|
||||
|
18
package.json
18
package.json
@ -18,12 +18,12 @@
|
||||
"@types/estree": "^1.0.5",
|
||||
"@types/estree-jsx": "^1.0.5",
|
||||
"@types/lodash": "^4.17.5",
|
||||
"@types/node": "^20.14.2",
|
||||
"@typescript-eslint/eslint-plugin": "7.13.0",
|
||||
"@typescript-eslint/type-utils": "^7.13.0",
|
||||
"@typescript-eslint/types": "^7.13.0",
|
||||
"@typescript-eslint/typescript-estree": "^7.13.0",
|
||||
"@typescript-eslint/utils": "^7.13.0",
|
||||
"@types/node": "^20.14.9",
|
||||
"@typescript-eslint/eslint-plugin": "7.14.1",
|
||||
"@typescript-eslint/type-utils": "^7.14.1",
|
||||
"@typescript-eslint/types": "^7.14.1",
|
||||
"@typescript-eslint/typescript-estree": "^7.14.1",
|
||||
"@typescript-eslint/utils": "^7.14.1",
|
||||
"babel-plugin-macros": "^3.1.0",
|
||||
"dts-bundle-generator": "9.4.0",
|
||||
"esbin": "0.0.4",
|
||||
@ -31,19 +31,19 @@
|
||||
"esbuild-plugin-alias": "^0.2.1",
|
||||
"eslint": "8.57.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-import-x": "^0.5.1",
|
||||
"eslint-plugin-import-x": "^0.5.2",
|
||||
"esprima": "^4.0.1",
|
||||
"esquery": "^1.5.0",
|
||||
"fast-glob": "^3.3.2",
|
||||
"find-cache-dir": "^5.0.0",
|
||||
"json-schema-to-ts": "^3.1.0",
|
||||
"lodash": "^4.17.21",
|
||||
"minimatch": "^9.0.4",
|
||||
"minimatch": "^9.0.5",
|
||||
"patch-package": "^8.0.0",
|
||||
"picocolors": "^1.0.1",
|
||||
"prettier": "^3.3.2",
|
||||
"prop-types": "^15.8.1",
|
||||
"typescript": "^5.4.5"
|
||||
"typescript": "^5.5.2"
|
||||
},
|
||||
"prettier": {
|
||||
"arrowParens": "avoid",
|
||||
|
@ -1,10 +1,16 @@
|
||||
diff --git a/src/index.js b/src/index.js
|
||||
index 752ff61..99a42a3 100644
|
||||
index 2fa185f..627af9b 100644
|
||||
--- a/src/index.js
|
||||
+++ b/src/index.js
|
||||
@@ -1,70 +1,110 @@
|
||||
@@ -1,48 +1,90 @@
|
||||
/* eslint-disable global-require */
|
||||
+// @ts-check
|
||||
-const flatConfigBase = require('./configs/flat-config-base');
|
||||
-const legacyConfigBase = require('./configs/legacy-config-base');
|
||||
-const { name, version } = require('../package.json');
|
||||
+import flatConfigBase from './configs/flat-config-base';
|
||||
+import legacyConfigBase from './configs/legacy-config-base';
|
||||
+import { name, version } from '../package.json';
|
||||
+
|
||||
+import accessibleEmoji from './rules/accessible-emoji';
|
||||
+import altText from './rules/alt-text';
|
||||
+import anchorAmbiguousText from './rules/anchor-ambiguous-text';
|
||||
@ -45,504 +51,181 @@ index 752ff61..99a42a3 100644
|
||||
+import scope from './rules/scope';
|
||||
+import tabindexNoPositive from './rules/tabindex-no-positive';
|
||||
|
||||
-module.exports = {
|
||||
- rules: {
|
||||
- 'accessible-emoji': require('./rules/accessible-emoji'),
|
||||
- 'alt-text': require('./rules/alt-text'),
|
||||
- 'anchor-ambiguous-text': require('./rules/anchor-ambiguous-text'),
|
||||
- 'anchor-has-content': require('./rules/anchor-has-content'),
|
||||
- 'anchor-is-valid': require('./rules/anchor-is-valid'),
|
||||
- 'aria-activedescendant-has-tabindex': require('./rules/aria-activedescendant-has-tabindex'),
|
||||
- 'aria-props': require('./rules/aria-props'),
|
||||
- 'aria-proptypes': require('./rules/aria-proptypes'),
|
||||
- 'aria-role': require('./rules/aria-role'),
|
||||
- 'aria-unsupported-elements': require('./rules/aria-unsupported-elements'),
|
||||
- 'autocomplete-valid': require('./rules/autocomplete-valid'),
|
||||
- 'click-events-have-key-events': require('./rules/click-events-have-key-events'),
|
||||
- 'control-has-associated-label': require('./rules/control-has-associated-label'),
|
||||
- 'heading-has-content': require('./rules/heading-has-content'),
|
||||
- 'html-has-lang': require('./rules/html-has-lang'),
|
||||
- 'iframe-has-title': require('./rules/iframe-has-title'),
|
||||
- 'img-redundant-alt': require('./rules/img-redundant-alt'),
|
||||
- 'interactive-supports-focus': require('./rules/interactive-supports-focus'),
|
||||
- 'label-has-associated-control': require('./rules/label-has-associated-control'),
|
||||
- 'label-has-for': require('./rules/label-has-for'),
|
||||
- lang: require('./rules/lang'),
|
||||
- 'media-has-caption': require('./rules/media-has-caption'),
|
||||
- 'mouse-events-have-key-events': require('./rules/mouse-events-have-key-events'),
|
||||
- 'no-access-key': require('./rules/no-access-key'),
|
||||
- 'no-aria-hidden-on-focusable': require('./rules/no-aria-hidden-on-focusable'),
|
||||
- 'no-autofocus': require('./rules/no-autofocus'),
|
||||
- 'no-distracting-elements': require('./rules/no-distracting-elements'),
|
||||
- 'no-interactive-element-to-noninteractive-role': require('./rules/no-interactive-element-to-noninteractive-role'),
|
||||
- 'no-noninteractive-element-interactions': require('./rules/no-noninteractive-element-interactions'),
|
||||
- 'no-noninteractive-element-to-interactive-role': require('./rules/no-noninteractive-element-to-interactive-role'),
|
||||
- 'no-noninteractive-tabindex': require('./rules/no-noninteractive-tabindex'),
|
||||
- 'no-onchange': require('./rules/no-onchange'),
|
||||
- 'no-redundant-roles': require('./rules/no-redundant-roles'),
|
||||
- 'no-static-element-interactions': require('./rules/no-static-element-interactions'),
|
||||
- 'prefer-tag-over-role': require('./rules/prefer-tag-over-role'),
|
||||
- 'role-has-required-aria-props': require('./rules/role-has-required-aria-props'),
|
||||
- 'role-supports-aria-props': require('./rules/role-supports-aria-props'),
|
||||
- scope: require('./rules/scope'),
|
||||
- 'tabindex-no-positive': require('./rules/tabindex-no-positive'),
|
||||
- },
|
||||
- configs: {
|
||||
- recommended: {
|
||||
- plugins: [
|
||||
- 'jsx-a11y',
|
||||
- ],
|
||||
- parserOptions: {
|
||||
- ecmaFeatures: {
|
||||
- jsx: true,
|
||||
- },
|
||||
+export const rules = kebabCase({
|
||||
+ accessibleEmoji,
|
||||
+ altText,
|
||||
+ anchorAmbiguousText,
|
||||
+ anchorHasContent,
|
||||
+ anchorIsValid,
|
||||
+ ariaActivedescendantHasTabindex,
|
||||
+ ariaProps,
|
||||
+ ariaProptypes,
|
||||
+ ariaRole,
|
||||
+ ariaUnsupportedElements,
|
||||
+ autocompleteValid,
|
||||
+ clickEventsHaveKeyEvents,
|
||||
+ controlHasAssociatedLabel,
|
||||
+ headingHasContent,
|
||||
+ htmlHasLang,
|
||||
+ iframeHasTitle,
|
||||
+ imgRedundantAlt,
|
||||
+ interactiveSupportsFocus,
|
||||
+ labelHasAssociatedControl,
|
||||
+ labelHasFor,
|
||||
const allRules = {
|
||||
- 'accessible-emoji': require('./rules/accessible-emoji'),
|
||||
- 'alt-text': require('./rules/alt-text'),
|
||||
- 'anchor-ambiguous-text': require('./rules/anchor-ambiguous-text'),
|
||||
- 'anchor-has-content': require('./rules/anchor-has-content'),
|
||||
- 'anchor-is-valid': require('./rules/anchor-is-valid'),
|
||||
- 'aria-activedescendant-has-tabindex': require('./rules/aria-activedescendant-has-tabindex'),
|
||||
- 'aria-props': require('./rules/aria-props'),
|
||||
- 'aria-proptypes': require('./rules/aria-proptypes'),
|
||||
- 'aria-role': require('./rules/aria-role'),
|
||||
- 'aria-unsupported-elements': require('./rules/aria-unsupported-elements'),
|
||||
- 'autocomplete-valid': require('./rules/autocomplete-valid'),
|
||||
- 'click-events-have-key-events': require('./rules/click-events-have-key-events'),
|
||||
- 'control-has-associated-label': require('./rules/control-has-associated-label'),
|
||||
- 'heading-has-content': require('./rules/heading-has-content'),
|
||||
- 'html-has-lang': require('./rules/html-has-lang'),
|
||||
- 'iframe-has-title': require('./rules/iframe-has-title'),
|
||||
- 'img-redundant-alt': require('./rules/img-redundant-alt'),
|
||||
- 'interactive-supports-focus': require('./rules/interactive-supports-focus'),
|
||||
- 'label-has-associated-control': require('./rules/label-has-associated-control'),
|
||||
- 'label-has-for': require('./rules/label-has-for'),
|
||||
- lang: require('./rules/lang'),
|
||||
- 'media-has-caption': require('./rules/media-has-caption'),
|
||||
- 'mouse-events-have-key-events': require('./rules/mouse-events-have-key-events'),
|
||||
- 'no-access-key': require('./rules/no-access-key'),
|
||||
- 'no-aria-hidden-on-focusable': require('./rules/no-aria-hidden-on-focusable'),
|
||||
- 'no-autofocus': require('./rules/no-autofocus'),
|
||||
- 'no-distracting-elements': require('./rules/no-distracting-elements'),
|
||||
- 'no-interactive-element-to-noninteractive-role': require('./rules/no-interactive-element-to-noninteractive-role'),
|
||||
- 'no-noninteractive-element-interactions': require('./rules/no-noninteractive-element-interactions'),
|
||||
- 'no-noninteractive-element-to-interactive-role': require('./rules/no-noninteractive-element-to-interactive-role'),
|
||||
- 'no-noninteractive-tabindex': require('./rules/no-noninteractive-tabindex'),
|
||||
- 'no-onchange': require('./rules/no-onchange'),
|
||||
- 'no-redundant-roles': require('./rules/no-redundant-roles'),
|
||||
- 'no-static-element-interactions': require('./rules/no-static-element-interactions'),
|
||||
- 'prefer-tag-over-role': require('./rules/prefer-tag-over-role'),
|
||||
- 'role-has-required-aria-props': require('./rules/role-has-required-aria-props'),
|
||||
- 'role-supports-aria-props': require('./rules/role-supports-aria-props'),
|
||||
- scope: require('./rules/scope'),
|
||||
- 'tabindex-no-positive': require('./rules/tabindex-no-positive'),
|
||||
+ 'accessible-emoji': accessibleEmoji,
|
||||
+ 'alt-text': altText,
|
||||
+ 'anchor-ambiguous-text': anchorAmbiguousText,
|
||||
+ 'anchor-has-content': anchorHasContent,
|
||||
+ 'anchor-is-valid': anchorIsValid,
|
||||
+ 'aria-activedescendant-has-tabindex': ariaActivedescendantHasTabindex,
|
||||
+ 'aria-props': ariaProps,
|
||||
+ 'aria-proptypes': ariaProptypes,
|
||||
+ 'aria-role': ariaRole,
|
||||
+ 'aria-unsupported-elements': ariaUnsupportedElements,
|
||||
+ 'autocomplete-valid': autocompleteValid,
|
||||
+ 'click-events-have-key-events': clickEventsHaveKeyEvents,
|
||||
+ 'control-has-associated-label': controlHasAssociatedLabel,
|
||||
+ 'heading-has-content': headingHasContent,
|
||||
+ 'html-has-lang': htmlHasLang,
|
||||
+ 'iframe-has-title': iframeHasTitle,
|
||||
+ 'img-redundant-alt': imgRedundantAlt,
|
||||
+ 'interactive-supports-focus': interactiveSupportsFocus,
|
||||
+ 'label-has-associated-control': labelHasAssociatedControl,
|
||||
+ 'label-has-for': labelHasFor,
|
||||
+ lang,
|
||||
+ mediaHasCaption,
|
||||
+ mouseEventsHaveKeyEvents,
|
||||
+ noAccessKey,
|
||||
+ noAriaHiddenOnFocusable,
|
||||
+ noAutofocus,
|
||||
+ noDistractingElements,
|
||||
+ noInteractiveElementToNoninteractiveRole,
|
||||
+ noNoninteractiveElementInteractions,
|
||||
+ noNoninteractiveElementToInteractiveRole,
|
||||
+ noNoninteractiveTabindex,
|
||||
+ noOnChange,
|
||||
+ noRedundantRoles,
|
||||
+ noStaticElementInteractions,
|
||||
+ preferTagOverRole,
|
||||
+ roleHasRequiredAriaProps,
|
||||
+ roleSupportsAriaProps,
|
||||
+ 'media-has-caption': mediaHasCaption,
|
||||
+ 'mouse-events-have-key-events': mouseEventsHaveKeyEvents,
|
||||
+ 'no-access-key': noAccessKey,
|
||||
+ 'no-aria-hidden-on-focusable': noAriaHiddenOnFocusable,
|
||||
+ 'no-autofocus': noAutofocus,
|
||||
+ 'no-distracting-elements': noDistractingElements,
|
||||
+ 'no-interactive-element-to-noninteractive-role':
|
||||
+ noInteractiveElementToNoninteractiveRole,
|
||||
+ 'no-noninteractive-element-interactions': noNoninteractiveElementInteractions,
|
||||
+ 'no-noninteractive-element-to-interactive-role':
|
||||
+ noNoninteractiveElementToInteractiveRole,
|
||||
+ 'no-noninteractive-tabindex': noNoninteractiveTabindex,
|
||||
+ 'no-onchange': noOnChange,
|
||||
+ 'no-redundant-roles': noRedundantRoles,
|
||||
+ 'no-static-element-interactions': noStaticElementInteractions,
|
||||
+ 'prefer-tag-over-role': preferTagOverRole,
|
||||
+ 'role-has-required-aria-props': roleHasRequiredAriaProps,
|
||||
+ 'role-supports-aria-props': roleSupportsAriaProps,
|
||||
+ scope,
|
||||
+ tabindexNoPositive,
|
||||
+});
|
||||
+
|
||||
+export const configs = {
|
||||
+ recommended: {
|
||||
+ plugins: ['jsx-a11y'],
|
||||
+ parserOptions: {
|
||||
+ ecmaFeatures: {
|
||||
+ jsx: true,
|
||||
},
|
||||
- rules: {
|
||||
- 'jsx-a11y/alt-text': 'error',
|
||||
- 'jsx-a11y/anchor-ambiguous-text': 'off', // TODO: error
|
||||
- 'jsx-a11y/anchor-has-content': 'error',
|
||||
- 'jsx-a11y/anchor-is-valid': 'error',
|
||||
- 'jsx-a11y/aria-activedescendant-has-tabindex': 'error',
|
||||
- 'jsx-a11y/aria-props': 'error',
|
||||
- 'jsx-a11y/aria-proptypes': 'error',
|
||||
- 'jsx-a11y/aria-role': 'error',
|
||||
- 'jsx-a11y/aria-unsupported-elements': 'error',
|
||||
- 'jsx-a11y/autocomplete-valid': 'error',
|
||||
- 'jsx-a11y/click-events-have-key-events': 'error',
|
||||
- 'jsx-a11y/control-has-associated-label': ['off', {
|
||||
+ },
|
||||
+ rules: {
|
||||
+ 'jsx-a11y/alt-text': 'error',
|
||||
+ 'jsx-a11y/anchor-ambiguous-text': 'off', // TODO: error
|
||||
+ 'jsx-a11y/anchor-has-content': 'error',
|
||||
+ 'jsx-a11y/anchor-is-valid': 'error',
|
||||
+ 'jsx-a11y/aria-activedescendant-has-tabindex': 'error',
|
||||
+ 'jsx-a11y/aria-props': 'error',
|
||||
+ 'jsx-a11y/aria-proptypes': 'error',
|
||||
+ 'jsx-a11y/aria-role': 'error',
|
||||
+ 'jsx-a11y/aria-unsupported-elements': 'error',
|
||||
+ 'jsx-a11y/autocomplete-valid': 'error',
|
||||
+ 'jsx-a11y/click-events-have-key-events': 'error',
|
||||
+ 'jsx-a11y/control-has-associated-label': [
|
||||
+ 'off',
|
||||
+ {
|
||||
ignoreElements: [
|
||||
'audio',
|
||||
'canvas',
|
||||
@@ -86,140 +126,122 @@ module.exports = {
|
||||
'tree',
|
||||
'treegrid',
|
||||
],
|
||||
- includeRoles: [
|
||||
- 'alert',
|
||||
- 'dialog',
|
||||
+ includeRoles: ['alert', 'dialog'],
|
||||
+ },
|
||||
+ ],
|
||||
+ 'jsx-a11y/heading-has-content': 'error',
|
||||
+ 'jsx-a11y/html-has-lang': 'error',
|
||||
+ 'jsx-a11y/iframe-has-title': 'error',
|
||||
+ 'jsx-a11y/img-redundant-alt': 'error',
|
||||
+ 'jsx-a11y/interactive-supports-focus': [
|
||||
+ 'error',
|
||||
+ {
|
||||
+ tabbable: [
|
||||
+ 'button',
|
||||
+ 'checkbox',
|
||||
+ 'link',
|
||||
+ 'searchbox',
|
||||
+ 'spinbutton',
|
||||
+ 'switch',
|
||||
+ 'textbox',
|
||||
],
|
||||
- }],
|
||||
- 'jsx-a11y/heading-has-content': 'error',
|
||||
- 'jsx-a11y/html-has-lang': 'error',
|
||||
- 'jsx-a11y/iframe-has-title': 'error',
|
||||
- 'jsx-a11y/img-redundant-alt': 'error',
|
||||
- 'jsx-a11y/interactive-supports-focus': [
|
||||
- 'error',
|
||||
- {
|
||||
- tabbable: [
|
||||
- 'button',
|
||||
- 'checkbox',
|
||||
- 'link',
|
||||
- 'searchbox',
|
||||
- 'spinbutton',
|
||||
- 'switch',
|
||||
- 'textbox',
|
||||
- ],
|
||||
- },
|
||||
- ],
|
||||
- 'jsx-a11y/label-has-associated-control': 'error',
|
||||
- 'jsx-a11y/label-has-for': 'off',
|
||||
- 'jsx-a11y/media-has-caption': 'error',
|
||||
- 'jsx-a11y/mouse-events-have-key-events': 'error',
|
||||
- 'jsx-a11y/no-access-key': 'error',
|
||||
- 'jsx-a11y/no-autofocus': 'error',
|
||||
- 'jsx-a11y/no-distracting-elements': 'error',
|
||||
- 'jsx-a11y/no-interactive-element-to-noninteractive-role': [
|
||||
- 'error',
|
||||
- {
|
||||
- tr: ['none', 'presentation'],
|
||||
- canvas: ['img'],
|
||||
- },
|
||||
- ],
|
||||
- 'jsx-a11y/no-noninteractive-element-interactions': [
|
||||
- 'error',
|
||||
- {
|
||||
- handlers: [
|
||||
- 'onClick',
|
||||
- 'onError',
|
||||
- 'onLoad',
|
||||
- 'onMouseDown',
|
||||
- 'onMouseUp',
|
||||
- 'onKeyPress',
|
||||
- 'onKeyDown',
|
||||
- 'onKeyUp',
|
||||
- ],
|
||||
- alert: ['onKeyUp', 'onKeyDown', 'onKeyPress'],
|
||||
- body: ['onError', 'onLoad'],
|
||||
- dialog: ['onKeyUp', 'onKeyDown', 'onKeyPress'],
|
||||
- iframe: ['onError', 'onLoad'],
|
||||
- img: ['onError', 'onLoad'],
|
||||
- },
|
||||
- ],
|
||||
- 'jsx-a11y/no-noninteractive-element-to-interactive-role': [
|
||||
- 'error',
|
||||
- {
|
||||
- ul: [
|
||||
- 'listbox',
|
||||
- 'menu',
|
||||
- 'menubar',
|
||||
- 'radiogroup',
|
||||
- 'tablist',
|
||||
- 'tree',
|
||||
- 'treegrid',
|
||||
- ],
|
||||
- ol: [
|
||||
- 'listbox',
|
||||
- 'menu',
|
||||
- 'menubar',
|
||||
- 'radiogroup',
|
||||
- 'tablist',
|
||||
- 'tree',
|
||||
- 'treegrid',
|
||||
- ],
|
||||
- li: ['menuitem', 'menuitemradio', 'menuitemcheckbox', 'option', 'row', 'tab', 'treeitem'],
|
||||
- table: ['grid'],
|
||||
- td: ['gridcell'],
|
||||
- fieldset: ['radiogroup', 'presentation'],
|
||||
- },
|
||||
- ],
|
||||
- 'jsx-a11y/no-noninteractive-tabindex': [
|
||||
- 'error',
|
||||
- {
|
||||
- tags: [],
|
||||
- roles: ['tabpanel'],
|
||||
- allowExpressionValues: true,
|
||||
- },
|
||||
- ],
|
||||
- 'jsx-a11y/no-redundant-roles': 'error',
|
||||
- 'jsx-a11y/no-static-element-interactions': [
|
||||
- 'error',
|
||||
- {
|
||||
- allowExpressionValues: true,
|
||||
- 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',
|
||||
- },
|
||||
- },
|
||||
- strict: {
|
||||
- plugins: [
|
||||
- 'jsx-a11y',
|
||||
+ },
|
||||
+ ],
|
||||
+ 'jsx-a11y/label-has-associated-control': 'error',
|
||||
+ 'jsx-a11y/label-has-for': 'off',
|
||||
+ 'jsx-a11y/media-has-caption': 'error',
|
||||
+ 'jsx-a11y/mouse-events-have-key-events': 'error',
|
||||
+ 'jsx-a11y/no-access-key': 'error',
|
||||
+ 'jsx-a11y/no-autofocus': 'error',
|
||||
+ 'jsx-a11y/no-distracting-elements': 'error',
|
||||
+ 'jsx-a11y/no-interactive-element-to-noninteractive-role': [
|
||||
+ 'error',
|
||||
+ {
|
||||
+ tr: ['none', 'presentation'],
|
||||
+ canvas: ['img'],
|
||||
+ },
|
||||
+ ],
|
||||
+ 'jsx-a11y/no-noninteractive-element-interactions': [
|
||||
+ 'error',
|
||||
+ {
|
||||
+ handlers: [
|
||||
+ 'onClick',
|
||||
+ 'onError',
|
||||
+ 'onLoad',
|
||||
+ 'onMouseDown',
|
||||
+ 'onMouseUp',
|
||||
+ 'onKeyPress',
|
||||
+ 'onKeyDown',
|
||||
+ 'onKeyUp',
|
||||
+ ],
|
||||
+ alert: ['onKeyUp', 'onKeyDown', 'onKeyPress'],
|
||||
+ body: ['onError', 'onLoad'],
|
||||
+ dialog: ['onKeyUp', 'onKeyDown', 'onKeyPress'],
|
||||
+ iframe: ['onError', 'onLoad'],
|
||||
+ img: ['onError', 'onLoad'],
|
||||
+ },
|
||||
+ ],
|
||||
+ 'jsx-a11y/no-noninteractive-element-to-interactive-role': [
|
||||
+ 'error',
|
||||
+ {
|
||||
+ ul: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'],
|
||||
+ ol: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'],
|
||||
+ li: ['menuitem', 'option', 'row', 'tab', 'treeitem'],
|
||||
+ table: ['grid'],
|
||||
+ td: ['gridcell'],
|
||||
+ fieldset: ['radiogroup', 'presentation'],
|
||||
+ },
|
||||
+ ],
|
||||
+ 'jsx-a11y/no-noninteractive-tabindex': [
|
||||
+ 'error',
|
||||
+ {
|
||||
+ tags: [],
|
||||
+ roles: ['tabpanel'],
|
||||
+ allowExpressionValues: true,
|
||||
+ },
|
||||
],
|
||||
- parserOptions: {
|
||||
- ecmaFeatures: {
|
||||
- jsx: true,
|
||||
+ 'jsx-a11y/no-redundant-roles': 'error',
|
||||
+ 'jsx-a11y/no-static-element-interactions': [
|
||||
+ 'error',
|
||||
+ {
|
||||
+ allowExpressionValues: true,
|
||||
+ 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',
|
||||
+ },
|
||||
+ },
|
||||
+ strict: {
|
||||
+ plugins: ['jsx-a11y'],
|
||||
+ parserOptions: {
|
||||
+ ecmaFeatures: {
|
||||
+ jsx: true,
|
||||
},
|
||||
- rules: {
|
||||
- 'jsx-a11y/alt-text': 'error',
|
||||
- 'jsx-a11y/anchor-has-content': 'error',
|
||||
- 'jsx-a11y/anchor-is-valid': 'error',
|
||||
- 'jsx-a11y/aria-activedescendant-has-tabindex': 'error',
|
||||
- 'jsx-a11y/aria-props': 'error',
|
||||
- 'jsx-a11y/aria-proptypes': 'error',
|
||||
- 'jsx-a11y/aria-role': 'error',
|
||||
- 'jsx-a11y/aria-unsupported-elements': 'error',
|
||||
- 'jsx-a11y/autocomplete-valid': 'error',
|
||||
- 'jsx-a11y/click-events-have-key-events': 'error',
|
||||
- 'jsx-a11y/control-has-associated-label': ['off', {
|
||||
+ },
|
||||
+ rules: {
|
||||
+ 'jsx-a11y/alt-text': 'error',
|
||||
+ 'jsx-a11y/anchor-has-content': 'error',
|
||||
+ 'jsx-a11y/anchor-is-valid': 'error',
|
||||
+ 'jsx-a11y/aria-activedescendant-has-tabindex': 'error',
|
||||
+ 'jsx-a11y/aria-props': 'error',
|
||||
+ 'jsx-a11y/aria-proptypes': 'error',
|
||||
+ 'jsx-a11y/aria-role': 'error',
|
||||
+ 'jsx-a11y/aria-unsupported-elements': 'error',
|
||||
+ 'jsx-a11y/autocomplete-valid': 'error',
|
||||
+ 'jsx-a11y/click-events-have-key-events': 'error',
|
||||
+ 'jsx-a11y/control-has-associated-label': [
|
||||
+ 'off',
|
||||
+ {
|
||||
ignoreElements: [
|
||||
'audio',
|
||||
'canvas',
|
||||
@@ -241,56 +263,63 @@ module.exports = {
|
||||
'tree',
|
||||
'treegrid',
|
||||
],
|
||||
- includeRoles: [
|
||||
- 'alert',
|
||||
- 'dialog',
|
||||
+ includeRoles: ['alert', 'dialog'],
|
||||
+ },
|
||||
+ ],
|
||||
+ 'jsx-a11y/heading-has-content': 'error',
|
||||
+ 'jsx-a11y/html-has-lang': 'error',
|
||||
+ 'jsx-a11y/iframe-has-title': 'error',
|
||||
+ 'jsx-a11y/img-redundant-alt': 'error',
|
||||
+ 'jsx-a11y/interactive-supports-focus': [
|
||||
+ 'error',
|
||||
+ {
|
||||
+ tabbable: [
|
||||
+ 'button',
|
||||
+ 'checkbox',
|
||||
+ 'link',
|
||||
+ 'progressbar',
|
||||
+ 'searchbox',
|
||||
+ 'slider',
|
||||
+ 'spinbutton',
|
||||
+ 'switch',
|
||||
+ 'textbox',
|
||||
],
|
||||
- }],
|
||||
- 'jsx-a11y/heading-has-content': 'error',
|
||||
- 'jsx-a11y/html-has-lang': 'error',
|
||||
- 'jsx-a11y/iframe-has-title': 'error',
|
||||
- 'jsx-a11y/img-redundant-alt': 'error',
|
||||
- 'jsx-a11y/interactive-supports-focus': [
|
||||
- 'error',
|
||||
- {
|
||||
- tabbable: [
|
||||
- 'button',
|
||||
- 'checkbox',
|
||||
- 'link',
|
||||
- 'progressbar',
|
||||
- 'searchbox',
|
||||
- 'slider',
|
||||
- 'spinbutton',
|
||||
- 'switch',
|
||||
- 'textbox',
|
||||
- ],
|
||||
- },
|
||||
- ],
|
||||
- 'jsx-a11y/label-has-for': 'off',
|
||||
- 'jsx-a11y/label-has-associated-control': 'error',
|
||||
- 'jsx-a11y/media-has-caption': 'error',
|
||||
- 'jsx-a11y/mouse-events-have-key-events': 'error',
|
||||
- 'jsx-a11y/no-access-key': 'error',
|
||||
- 'jsx-a11y/no-autofocus': 'error',
|
||||
- 'jsx-a11y/no-distracting-elements': 'error',
|
||||
- 'jsx-a11y/no-interactive-element-to-noninteractive-role': 'error',
|
||||
- 'jsx-a11y/no-noninteractive-element-interactions': [
|
||||
- 'error',
|
||||
- {
|
||||
- body: ['onError', 'onLoad'],
|
||||
- iframe: ['onError', 'onLoad'],
|
||||
- img: ['onError', 'onLoad'],
|
||||
- },
|
||||
- ],
|
||||
- 'jsx-a11y/no-noninteractive-element-to-interactive-role': 'error',
|
||||
- 'jsx-a11y/no-noninteractive-tabindex': 'error',
|
||||
- 'jsx-a11y/no-redundant-roles': 'error',
|
||||
- 'jsx-a11y/no-static-element-interactions': 'error',
|
||||
- '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',
|
||||
- },
|
||||
+ },
|
||||
+ ],
|
||||
+ 'jsx-a11y/label-has-for': 'off',
|
||||
+ 'jsx-a11y/label-has-associated-control': 'error',
|
||||
+ 'jsx-a11y/media-has-caption': 'error',
|
||||
+ 'jsx-a11y/mouse-events-have-key-events': 'error',
|
||||
+ 'jsx-a11y/no-access-key': 'error',
|
||||
+ 'jsx-a11y/no-autofocus': 'error',
|
||||
+ 'jsx-a11y/no-distracting-elements': 'error',
|
||||
+ 'jsx-a11y/no-interactive-element-to-noninteractive-role': 'error',
|
||||
+ 'jsx-a11y/no-noninteractive-element-interactions': [
|
||||
+ 'error',
|
||||
+ {
|
||||
+ body: ['onError', 'onLoad'],
|
||||
+ iframe: ['onError', 'onLoad'],
|
||||
+ img: ['onError', 'onLoad'],
|
||||
+ },
|
||||
+ ],
|
||||
+ 'jsx-a11y/no-noninteractive-element-to-interactive-role': 'error',
|
||||
+ 'jsx-a11y/no-noninteractive-tabindex': 'error',
|
||||
+ 'jsx-a11y/no-redundant-roles': 'error',
|
||||
+ 'jsx-a11y/no-static-element-interactions': 'error',
|
||||
+ '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',
|
||||
},
|
||||
},
|
||||
+ 'tabindex-no-positive': tabindexNoPositive,
|
||||
};
|
||||
+
|
||||
+/** @param {object} obj */
|
||||
+function kebabCase(obj) {
|
||||
+ return Object.fromEntries(
|
||||
+ Object.entries(obj).map(([key, value]) => [
|
||||
+ key.replace(/([A-Z])/g, '-$1').toLowerCase(),
|
||||
+ value,
|
||||
+ ]),
|
||||
+ );
|
||||
+}
|
||||
|
||||
const recommendedRules = {
|
||||
@@ -60,15 +102,7 @@ const recommendedRules = {
|
||||
'jsx-a11y/control-has-associated-label': [
|
||||
'off',
|
||||
{
|
||||
- ignoreElements: [
|
||||
- 'audio',
|
||||
- 'canvas',
|
||||
- 'embed',
|
||||
- 'input',
|
||||
- 'textarea',
|
||||
- 'tr',
|
||||
- 'video',
|
||||
- ],
|
||||
+ ignoreElements: ['audio', 'canvas', 'embed', 'input', 'textarea', 'tr', 'video'],
|
||||
ignoreRoles: [
|
||||
'grid',
|
||||
'listbox',
|
||||
@@ -139,24 +173,8 @@ const recommendedRules = {
|
||||
'jsx-a11y/no-noninteractive-element-to-interactive-role': [
|
||||
'error',
|
||||
{
|
||||
- ul: [
|
||||
- 'listbox',
|
||||
- 'menu',
|
||||
- 'menubar',
|
||||
- 'radiogroup',
|
||||
- 'tablist',
|
||||
- 'tree',
|
||||
- 'treegrid',
|
||||
- ],
|
||||
- ol: [
|
||||
- 'listbox',
|
||||
- 'menu',
|
||||
- 'menubar',
|
||||
- 'radiogroup',
|
||||
- 'tablist',
|
||||
- 'tree',
|
||||
- 'treegrid',
|
||||
- ],
|
||||
+ ul: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'],
|
||||
+ ol: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'],
|
||||
li: [
|
||||
'menuitem',
|
||||
'menuitemradio',
|
||||
@@ -214,15 +232,7 @@ const strictRules = {
|
||||
'jsx-a11y/control-has-associated-label': [
|
||||
'off',
|
||||
{
|
||||
- ignoreElements: [
|
||||
- 'audio',
|
||||
- 'canvas',
|
||||
- 'embed',
|
||||
- 'input',
|
||||
- 'textarea',
|
||||
- 'tr',
|
||||
- 'video',
|
||||
- ],
|
||||
+ ignoreElements: ['audio', 'canvas', 'embed', 'input', 'textarea', 'tr', 'video'],
|
||||
ignoreRoles: [
|
||||
'grid',
|
||||
'listbox',
|
||||
@@ -299,22 +309,22 @@ const jsxA11y = {
|
||||
const createConfig = (rules, flatConfigName) => ({
|
||||
...(flatConfigName
|
||||
? {
|
||||
- ...flatConfigBase,
|
||||
- name: `jsx-a11y/${flatConfigName}`,
|
||||
- plugins: { 'jsx-a11y': jsxA11y },
|
||||
- }
|
||||
+ ...flatConfigBase,
|
||||
+ name: `jsx-a11y/${flatConfigName}`,
|
||||
+ plugins: { 'jsx-a11y': jsxA11y },
|
||||
+ }
|
||||
: { ...legacyConfigBase, plugins: ['jsx-a11y'] }),
|
||||
rules: { ...rules },
|
||||
});
|
||||
|
||||
// Create configs for the plugin object
|
||||
-const configs = {
|
||||
+export const configs = {
|
||||
recommended: createConfig(recommendedRules),
|
||||
strict: createConfig(strictRules),
|
||||
};
|
||||
-const flatConfigs = {
|
||||
+export const flatConfigs = {
|
||||
recommended: createConfig(recommendedRules, 'recommended'),
|
||||
strict: createConfig(strictRules, 'strict'),
|
||||
};
|
||||
|
||||
-module.exports = { ...jsxA11y, configs, flatConfigs };
|
||||
+export default { ...jsxA11y, configs, flatConfigs };
|
||||
diff --git a/src/util/mayContainChildComponent.js b/src/util/mayContainChildComponent.js
|
||||
index 43a03ef..5e1035e 100644
|
||||
--- a/src/util/mayContainChildComponent.js
|
||||
|
@ -171,7 +171,7 @@ index 4dadb076..de01ae32 100644
|
||||
const variableUtil = require('../util/variable');
|
||||
const testReactVersion = require('../util/version').testReactVersion;
|
||||
diff --git a/lib/rules/jsx-key.js b/lib/rules/jsx-key.js
|
||||
index feee7ad5..c2bd9265 100644
|
||||
index 825d21f4..fb4459dd 100644
|
||||
--- a/lib/rules/jsx-key.js
|
||||
+++ b/lib/rules/jsx-key.js
|
||||
@@ -5,8 +5,7 @@
|
||||
|
168
pnpm-lock.yaml
generated
168
pnpm-lock.yaml
generated
@ -56,23 +56,23 @@ importers:
|
||||
specifier: ^4.17.5
|
||||
version: 4.17.5
|
||||
'@types/node':
|
||||
specifier: ^20.14.2
|
||||
version: 20.14.2
|
||||
specifier: ^20.14.9
|
||||
version: 20.14.9
|
||||
'@typescript-eslint/eslint-plugin':
|
||||
specifier: 7.13.0
|
||||
version: 7.13.0(@typescript-eslint/parser@7.0.2(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)
|
||||
specifier: 7.14.1
|
||||
version: 7.14.1(@typescript-eslint/parser@7.0.2(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2)
|
||||
'@typescript-eslint/type-utils':
|
||||
specifier: ^7.13.0
|
||||
version: 7.13.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
specifier: ^7.14.1
|
||||
version: 7.14.1(eslint@8.57.0)(typescript@5.5.2)
|
||||
'@typescript-eslint/types':
|
||||
specifier: ^7.13.0
|
||||
version: 7.13.0
|
||||
specifier: ^7.14.1
|
||||
version: 7.14.1
|
||||
'@typescript-eslint/typescript-estree':
|
||||
specifier: ^7.13.0
|
||||
version: 7.13.0(typescript@5.4.5)
|
||||
specifier: ^7.14.1
|
||||
version: 7.14.1(typescript@5.5.2)
|
||||
'@typescript-eslint/utils':
|
||||
specifier: ^7.13.0
|
||||
version: 7.13.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
specifier: ^7.14.1
|
||||
version: 7.14.1(eslint@8.57.0)(typescript@5.5.2)
|
||||
babel-plugin-macros:
|
||||
specifier: ^3.1.0
|
||||
version: 3.1.0
|
||||
@ -95,8 +95,8 @@ importers:
|
||||
specifier: ^9.1.0
|
||||
version: 9.1.0(eslint@8.57.0)
|
||||
eslint-plugin-import-x:
|
||||
specifier: ^0.5.1
|
||||
version: 0.5.1(eslint@8.57.0)(typescript@5.4.5)
|
||||
specifier: ^0.5.2
|
||||
version: 0.5.2(eslint@8.57.0)(typescript@5.5.2)
|
||||
esprima:
|
||||
specifier: ^4.0.1
|
||||
version: 4.0.1
|
||||
@ -116,8 +116,8 @@ importers:
|
||||
specifier: ^4.17.21
|
||||
version: 4.17.21
|
||||
minimatch:
|
||||
specifier: ^9.0.4
|
||||
version: 9.0.4
|
||||
specifier: ^9.0.5
|
||||
version: 9.0.5
|
||||
patch-package:
|
||||
specifier: ^8.0.0
|
||||
version: 8.0.0
|
||||
@ -131,8 +131,8 @@ importers:
|
||||
specifier: ^15.8.1
|
||||
version: 15.8.1
|
||||
typescript:
|
||||
specifier: ^5.4.5
|
||||
version: 5.4.5
|
||||
specifier: ^5.5.2
|
||||
version: 5.5.2
|
||||
|
||||
packages:
|
||||
|
||||
@ -1036,14 +1036,14 @@ packages:
|
||||
'@types/lodash@4.17.5':
|
||||
resolution: {integrity: sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw==}
|
||||
|
||||
'@types/node@20.14.2':
|
||||
resolution: {integrity: sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==}
|
||||
'@types/node@20.14.9':
|
||||
resolution: {integrity: sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg==}
|
||||
|
||||
'@types/parse-json@4.0.2':
|
||||
resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==}
|
||||
|
||||
'@typescript-eslint/eslint-plugin@7.13.0':
|
||||
resolution: {integrity: sha512-FX1X6AF0w8MdVFLSdqwqN/me2hyhuQg4ykN6ZpVhh1ij/80pTvDKclX1sZB9iqex8SjQfVhwMKs3JtnnMLzG9w==}
|
||||
'@typescript-eslint/eslint-plugin@7.14.1':
|
||||
resolution: {integrity: sha512-aAJd6bIf2vvQRjUG3ZkNXkmBpN+J7Wd0mfQiiVCJMu9Z5GcZZdcc0j8XwN/BM97Fl7e3SkTXODSk4VehUv7CGw==}
|
||||
engines: {node: ^18.18.0 || >=20.0.0}
|
||||
peerDependencies:
|
||||
'@typescript-eslint/parser': ^7.0.0
|
||||
@ -1067,12 +1067,12 @@ packages:
|
||||
resolution: {integrity: sha512-l6sa2jF3h+qgN2qUMjVR3uCNGjWw4ahGfzIYsCtFrQJCjhbrDPdiihYT8FnnqFwsWX+20hK592yX9I2rxKTP4g==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
|
||||
'@typescript-eslint/scope-manager@7.13.0':
|
||||
resolution: {integrity: sha512-ZrMCe1R6a01T94ilV13egvcnvVJ1pxShkE0+NDjDzH4nvG1wXpwsVI5bZCvE7AEDH1mXEx5tJSVR68bLgG7Dng==}
|
||||
'@typescript-eslint/scope-manager@7.14.1':
|
||||
resolution: {integrity: sha512-gPrFSsoYcsffYXTOZ+hT7fyJr95rdVe4kGVX1ps/dJ+DfmlnjFN/GcMxXcVkeHDKqsq6uAcVaQaIi3cFffmAbA==}
|
||||
engines: {node: ^18.18.0 || >=20.0.0}
|
||||
|
||||
'@typescript-eslint/type-utils@7.13.0':
|
||||
resolution: {integrity: sha512-xMEtMzxq9eRkZy48XuxlBFzpVMDurUAfDu5Rz16GouAtXm0TaAoTFzqWUFPPuQYXI/CDaH/Bgx/fk/84t/Bc9A==}
|
||||
'@typescript-eslint/type-utils@7.14.1':
|
||||
resolution: {integrity: sha512-/MzmgNd3nnbDbOi3LfasXWWe292+iuo+umJ0bCCMCPc1jLO/z2BQmWUUUXvXLbrQey/JgzdF/OV+I5bzEGwJkQ==}
|
||||
engines: {node: ^18.18.0 || >=20.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.56.0
|
||||
@ -1085,8 +1085,8 @@ packages:
|
||||
resolution: {integrity: sha512-ZzcCQHj4JaXFjdOql6adYV4B/oFOFjPOC9XYwCaZFRvqN8Llfvv4gSxrkQkd2u4Ci62i2c6W6gkDwQJDaRc4nA==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
|
||||
'@typescript-eslint/types@7.13.0':
|
||||
resolution: {integrity: sha512-QWuwm9wcGMAuTsxP+qz6LBBd3Uq8I5Nv8xb0mk54jmNoCyDspnMvVsOxI6IsMmway5d1S9Su2+sCKv1st2l6eA==}
|
||||
'@typescript-eslint/types@7.14.1':
|
||||
resolution: {integrity: sha512-mL7zNEOQybo5R3AavY+Am7KLv8BorIv7HCYS5rKoNZKQD9tsfGUpO4KdAn3sSUvTiS4PQkr2+K0KJbxj8H9NDg==}
|
||||
engines: {node: ^18.18.0 || >=20.0.0}
|
||||
|
||||
'@typescript-eslint/typescript-estree@7.0.2':
|
||||
@ -1098,8 +1098,8 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
|
||||
'@typescript-eslint/typescript-estree@7.13.0':
|
||||
resolution: {integrity: sha512-cAvBvUoobaoIcoqox1YatXOnSl3gx92rCZoMRPzMNisDiM12siGilSM4+dJAekuuHTibI2hVC2fYK79iSFvWjw==}
|
||||
'@typescript-eslint/typescript-estree@7.14.1':
|
||||
resolution: {integrity: sha512-k5d0VuxViE2ulIO6FbxxSZaxqDVUyMbXcidC8rHvii0I56XZPv8cq+EhMns+d/EVIL41sMXqRbK3D10Oza1bbA==}
|
||||
engines: {node: ^18.18.0 || >=20.0.0}
|
||||
peerDependencies:
|
||||
typescript: '*'
|
||||
@ -1107,8 +1107,8 @@ packages:
|
||||
typescript:
|
||||
optional: true
|
||||
|
||||
'@typescript-eslint/utils@7.13.0':
|
||||
resolution: {integrity: sha512-jceD8RgdKORVnB4Y6BqasfIkFhl4pajB1wVxrF4akxD2QPM8GNYjgGwEzYS+437ewlqqrg7Dw+6dhdpjMpeBFQ==}
|
||||
'@typescript-eslint/utils@7.14.1':
|
||||
resolution: {integrity: sha512-CMmVVELns3nak3cpJhZosDkm63n+DwBlDX8g0k4QUa9BMnF+lH2lr3d130M1Zt1xxmB3LLk3NV7KQCq86ZBBhQ==}
|
||||
engines: {node: ^18.18.0 || >=20.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.56.0
|
||||
@ -1117,8 +1117,8 @@ packages:
|
||||
resolution: {integrity: sha512-8Y+YiBmqPighbm5xA2k4wKTxRzx9EkBu7Rlw+WHqMvRJ3RPz/BMBO9b2ru0LUNmXg120PHUXD5+SWFy2R8DqlQ==}
|
||||
engines: {node: ^16.0.0 || >=18.0.0}
|
||||
|
||||
'@typescript-eslint/visitor-keys@7.13.0':
|
||||
resolution: {integrity: sha512-nxn+dozQx+MK61nn/JP+M4eCkHDSxSLDpgE3WcQo0+fkjEolnaB5jswvIKC4K56By8MMgIho7f1PVxERHEo8rw==}
|
||||
'@typescript-eslint/visitor-keys@7.14.1':
|
||||
resolution: {integrity: sha512-Crb+F75U1JAEtBeQGxSKwI60hZmmzaqA3z9sYsVm8X7W5cwLEm5bRe0/uXS6+MR/y8CVpKSR/ontIAIEPFcEkA==}
|
||||
engines: {node: ^18.18.0 || >=20.0.0}
|
||||
|
||||
'@ungap/structured-clone@1.2.0':
|
||||
@ -1336,8 +1336,8 @@ packages:
|
||||
eslint-import-resolver-node@0.3.9:
|
||||
resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==}
|
||||
|
||||
eslint-plugin-import-x@0.5.1:
|
||||
resolution: {integrity: sha512-2JK8bbFOLes+gG6tgdnM8safCxMAj4u2wjX8X1BRFPfnY7Ct2hFYESoIcVwABX/DDcdpQFLGtKmzbNEWJZD9iQ==}
|
||||
eslint-plugin-import-x@0.5.2:
|
||||
resolution: {integrity: sha512-6f1YMmg3PdLwfiJDYnCRPfh67zJKbwbOKL99l6xGZDmIFkMht/4xyudafGEcDOmDlgp36e41W4RXDfOn7+pGRg==}
|
||||
engines: {node: '>=16'}
|
||||
peerDependencies:
|
||||
eslint: ^8.56.0 || ^9.0.0-0
|
||||
@ -1644,8 +1644,8 @@ packages:
|
||||
resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==}
|
||||
engines: {node: '>=16 || 14 >=14.17'}
|
||||
|
||||
minimatch@9.0.4:
|
||||
resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==}
|
||||
minimatch@9.0.5:
|
||||
resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==}
|
||||
engines: {node: '>=16 || 14 >=14.17'}
|
||||
|
||||
minimist@1.2.8:
|
||||
@ -1916,8 +1916,8 @@ packages:
|
||||
resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
typescript@5.4.5:
|
||||
resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==}
|
||||
typescript@5.5.2:
|
||||
resolution: {integrity: sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==}
|
||||
engines: {node: '>=14.17'}
|
||||
hasBin: true
|
||||
|
||||
@ -3023,40 +3023,40 @@ snapshots:
|
||||
|
||||
'@types/lodash@4.17.5': {}
|
||||
|
||||
'@types/node@20.14.2':
|
||||
'@types/node@20.14.9':
|
||||
dependencies:
|
||||
undici-types: 5.26.5
|
||||
|
||||
'@types/parse-json@4.0.2': {}
|
||||
|
||||
'@typescript-eslint/eslint-plugin@7.13.0(@typescript-eslint/parser@7.0.2(eslint@8.57.0)(typescript@5.4.5))(eslint@8.57.0)(typescript@5.4.5)':
|
||||
'@typescript-eslint/eslint-plugin@7.14.1(@typescript-eslint/parser@7.0.2(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2)':
|
||||
dependencies:
|
||||
'@eslint-community/regexpp': 4.10.0
|
||||
'@typescript-eslint/parser': 7.0.2(eslint@8.57.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/scope-manager': 7.13.0
|
||||
'@typescript-eslint/type-utils': 7.13.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/utils': 7.13.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/visitor-keys': 7.13.0
|
||||
'@typescript-eslint/parser': 7.0.2(eslint@8.57.0)(typescript@5.5.2)
|
||||
'@typescript-eslint/scope-manager': 7.14.1
|
||||
'@typescript-eslint/type-utils': 7.14.1(eslint@8.57.0)(typescript@5.5.2)
|
||||
'@typescript-eslint/utils': 7.14.1(eslint@8.57.0)(typescript@5.5.2)
|
||||
'@typescript-eslint/visitor-keys': 7.14.1
|
||||
eslint: 8.57.0
|
||||
graphemer: 1.4.0
|
||||
ignore: 5.3.1
|
||||
natural-compare: 1.4.0
|
||||
ts-api-utils: 1.3.0(typescript@5.4.5)
|
||||
ts-api-utils: 1.3.0(typescript@5.5.2)
|
||||
optionalDependencies:
|
||||
typescript: 5.4.5
|
||||
typescript: 5.5.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/parser@7.0.2(eslint@8.57.0)(typescript@5.4.5)':
|
||||
'@typescript-eslint/parser@7.0.2(eslint@8.57.0)(typescript@5.5.2)':
|
||||
dependencies:
|
||||
'@typescript-eslint/scope-manager': 7.0.2
|
||||
'@typescript-eslint/types': 7.0.2
|
||||
'@typescript-eslint/typescript-estree': 7.0.2(typescript@5.4.5)
|
||||
'@typescript-eslint/typescript-estree': 7.0.2(typescript@5.5.2)
|
||||
'@typescript-eslint/visitor-keys': 7.0.2
|
||||
debug: 4.3.4
|
||||
eslint: 8.57.0
|
||||
optionalDependencies:
|
||||
typescript: 5.4.5
|
||||
typescript: 5.5.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
@ -3065,28 +3065,28 @@ snapshots:
|
||||
'@typescript-eslint/types': 7.0.2
|
||||
'@typescript-eslint/visitor-keys': 7.0.2
|
||||
|
||||
'@typescript-eslint/scope-manager@7.13.0':
|
||||
'@typescript-eslint/scope-manager@7.14.1':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 7.13.0
|
||||
'@typescript-eslint/visitor-keys': 7.13.0
|
||||
'@typescript-eslint/types': 7.14.1
|
||||
'@typescript-eslint/visitor-keys': 7.14.1
|
||||
|
||||
'@typescript-eslint/type-utils@7.13.0(eslint@8.57.0)(typescript@5.4.5)':
|
||||
'@typescript-eslint/type-utils@7.14.1(eslint@8.57.0)(typescript@5.5.2)':
|
||||
dependencies:
|
||||
'@typescript-eslint/typescript-estree': 7.13.0(typescript@5.4.5)
|
||||
'@typescript-eslint/utils': 7.13.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/typescript-estree': 7.14.1(typescript@5.5.2)
|
||||
'@typescript-eslint/utils': 7.14.1(eslint@8.57.0)(typescript@5.5.2)
|
||||
debug: 4.3.4
|
||||
eslint: 8.57.0
|
||||
ts-api-utils: 1.3.0(typescript@5.4.5)
|
||||
ts-api-utils: 1.3.0(typescript@5.5.2)
|
||||
optionalDependencies:
|
||||
typescript: 5.4.5
|
||||
typescript: 5.5.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/types@7.0.2': {}
|
||||
|
||||
'@typescript-eslint/types@7.13.0': {}
|
||||
'@typescript-eslint/types@7.14.1': {}
|
||||
|
||||
'@typescript-eslint/typescript-estree@7.0.2(typescript@5.4.5)':
|
||||
'@typescript-eslint/typescript-estree@7.0.2(typescript@5.5.2)':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 7.0.2
|
||||
'@typescript-eslint/visitor-keys': 7.0.2
|
||||
@ -3095,33 +3095,33 @@ snapshots:
|
||||
is-glob: 4.0.3
|
||||
minimatch: 9.0.3
|
||||
semver: 7.6.0
|
||||
ts-api-utils: 1.3.0(typescript@5.4.5)
|
||||
ts-api-utils: 1.3.0(typescript@5.5.2)
|
||||
optionalDependencies:
|
||||
typescript: 5.4.5
|
||||
typescript: 5.5.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/typescript-estree@7.13.0(typescript@5.4.5)':
|
||||
'@typescript-eslint/typescript-estree@7.14.1(typescript@5.5.2)':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 7.13.0
|
||||
'@typescript-eslint/visitor-keys': 7.13.0
|
||||
'@typescript-eslint/types': 7.14.1
|
||||
'@typescript-eslint/visitor-keys': 7.14.1
|
||||
debug: 4.3.4
|
||||
globby: 11.1.0
|
||||
is-glob: 4.0.3
|
||||
minimatch: 9.0.4
|
||||
minimatch: 9.0.5
|
||||
semver: 7.6.0
|
||||
ts-api-utils: 1.3.0(typescript@5.4.5)
|
||||
ts-api-utils: 1.3.0(typescript@5.5.2)
|
||||
optionalDependencies:
|
||||
typescript: 5.4.5
|
||||
typescript: 5.5.2
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/utils@7.13.0(eslint@8.57.0)(typescript@5.4.5)':
|
||||
'@typescript-eslint/utils@7.14.1(eslint@8.57.0)(typescript@5.5.2)':
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0)
|
||||
'@typescript-eslint/scope-manager': 7.13.0
|
||||
'@typescript-eslint/types': 7.13.0
|
||||
'@typescript-eslint/typescript-estree': 7.13.0(typescript@5.4.5)
|
||||
'@typescript-eslint/scope-manager': 7.14.1
|
||||
'@typescript-eslint/types': 7.14.1
|
||||
'@typescript-eslint/typescript-estree': 7.14.1(typescript@5.5.2)
|
||||
eslint: 8.57.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
@ -3132,9 +3132,9 @@ snapshots:
|
||||
'@typescript-eslint/types': 7.0.2
|
||||
eslint-visitor-keys: 3.4.3
|
||||
|
||||
'@typescript-eslint/visitor-keys@7.13.0':
|
||||
'@typescript-eslint/visitor-keys@7.14.1':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 7.13.0
|
||||
'@typescript-eslint/types': 7.14.1
|
||||
eslint-visitor-keys: 3.4.3
|
||||
|
||||
'@ungap/structured-clone@1.2.0': {}
|
||||
@ -3307,7 +3307,7 @@ snapshots:
|
||||
|
||||
dts-bundle-generator@9.4.0:
|
||||
dependencies:
|
||||
typescript: 5.4.5
|
||||
typescript: 5.5.2
|
||||
yargs: 17.7.2
|
||||
|
||||
electron-to-chromium@1.4.722: {}
|
||||
@ -3373,16 +3373,16 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
eslint-plugin-import-x@0.5.1(eslint@8.57.0)(typescript@5.4.5):
|
||||
eslint-plugin-import-x@0.5.2(eslint@8.57.0)(typescript@5.5.2):
|
||||
dependencies:
|
||||
'@typescript-eslint/utils': 7.13.0(eslint@8.57.0)(typescript@5.4.5)
|
||||
'@typescript-eslint/utils': 7.14.1(eslint@8.57.0)(typescript@5.5.2)
|
||||
debug: 4.3.4
|
||||
doctrine: 3.0.0
|
||||
eslint: 8.57.0
|
||||
eslint-import-resolver-node: 0.3.9
|
||||
get-tsconfig: 4.7.5
|
||||
is-glob: 4.0.3
|
||||
minimatch: 9.0.4
|
||||
minimatch: 9.0.5
|
||||
semver: 7.6.0
|
||||
tslib: 2.6.3
|
||||
transitivePeerDependencies:
|
||||
@ -3714,7 +3714,7 @@ snapshots:
|
||||
dependencies:
|
||||
brace-expansion: 2.0.1
|
||||
|
||||
minimatch@9.0.4:
|
||||
minimatch@9.0.5:
|
||||
dependencies:
|
||||
brace-expansion: 2.0.1
|
||||
|
||||
@ -3940,9 +3940,9 @@ snapshots:
|
||||
|
||||
ts-algebra@2.0.0: {}
|
||||
|
||||
ts-api-utils@1.3.0(typescript@5.4.5):
|
||||
ts-api-utils@1.3.0(typescript@5.5.2):
|
||||
dependencies:
|
||||
typescript: 5.4.5
|
||||
typescript: 5.5.2
|
||||
|
||||
tsconfig-paths@4.2.0:
|
||||
dependencies:
|
||||
@ -3958,7 +3958,7 @@ snapshots:
|
||||
|
||||
type-fest@0.20.2: {}
|
||||
|
||||
typescript@5.4.5: {}
|
||||
typescript@5.5.2: {}
|
||||
|
||||
undici-types@5.26.5: {}
|
||||
|
||||
|
@ -4,7 +4,6 @@ sync() (
|
||||
)
|
||||
|
||||
sync eslint-import-resolver-typescript
|
||||
sync eslint-plugin-import
|
||||
sync eslint-plugin-jsx-a11y
|
||||
sync eslint-plugin-n
|
||||
sync eslint-plugin-react
|
||||
|
@ -12,10 +12,10 @@
|
||||
"subject": "chore(deps): update dependency eslint to ^8.57.0 (#287)"
|
||||
},
|
||||
"eslint-plugin-jsx-a11y": {
|
||||
"hash": "5d1440825a8838ae10dc94cc3a4a7e1e967644b4",
|
||||
"date": "2024-06-10T09:28:24-07:00",
|
||||
"hash": "0be7ea95f560c6afc6817d381054d914ebd0b2ca",
|
||||
"date": "2024-06-23T23:41:48-04:00",
|
||||
"committer": "Jordan Harband",
|
||||
"subject": "[Deps] update `@babel/runtime`, `array-includes`, `es-iterator-helpers`, `hasown`, `object.fromentries`, `safe-regex-test`"
|
||||
"subject": "[readme] remove deprecated travis ci badge; add github actions badge"
|
||||
},
|
||||
"eslint-plugin-n": {
|
||||
"hash": "67bbfdf3c6862dcbfe455a4afbd83fa60f9d1ea4",
|
||||
@ -24,10 +24,10 @@
|
||||
"subject": "chore(master): release 17.9.0 (#299)"
|
||||
},
|
||||
"eslint-plugin-react": {
|
||||
"hash": "393bfa2fc071bfd08cef2327790e2ccc95507d72",
|
||||
"date": "2024-06-12T20:49:45-04:00",
|
||||
"hash": "3c1d5203438965b3999911520a930306f6e9c58f",
|
||||
"date": "2024-06-23T23:00:32-07:00",
|
||||
"committer": "Jordan Harband",
|
||||
"subject": "[Fix] `no-object-type-as-default-prop`: enable rule for components with many parameters"
|
||||
"subject": "[Dev Deps] downgrade `eslint-remote-tester-repositories`"
|
||||
},
|
||||
"jsx-ast-utils": {
|
||||
"hash": "5943318eaf23764eec3ff397ebb969613d728a95",
|
||||
|
12
src/index.ts
12
src/index.ts
@ -102,6 +102,8 @@ export function extendConfig(of: InputConfig = {}): ESLintConfig {
|
||||
extends: _extends,
|
||||
overrides,
|
||||
customRuleFiles,
|
||||
// @ts-expect-error
|
||||
localRules: _,
|
||||
...rest
|
||||
} = of;
|
||||
|
||||
@ -124,7 +126,7 @@ export function extendConfig(of: InputConfig = {}): ESLintConfig {
|
||||
const result: InputConfig = {
|
||||
root: true,
|
||||
parser: '@typescript-eslint/parser',
|
||||
plugins: unique('@typescript-eslint', 'import', 'rules', plugins),
|
||||
plugins: unique('@typescript-eslint', 'import-x', 'rules', plugins),
|
||||
env: { node: true, browser: true, es2023: true },
|
||||
reportUnusedDisableDirectives: true,
|
||||
parserOptions: {
|
||||
@ -134,8 +136,8 @@ export function extendConfig(of: InputConfig = {}): ESLintConfig {
|
||||
'eslint:recommended',
|
||||
'prettier',
|
||||
'plugin:@typescript-eslint/recommended-type-checked',
|
||||
'plugin:import/errors',
|
||||
'plugin:import/typescript',
|
||||
'plugin:import-x/errors',
|
||||
'plugin:import-x/typescript',
|
||||
hasReact && [
|
||||
'plugin:react/recommended',
|
||||
'plugin:react-hooks/recommended',
|
||||
@ -146,10 +148,10 @@ export function extendConfig(of: InputConfig = {}): ESLintConfig {
|
||||
_extends,
|
||||
),
|
||||
settings: {
|
||||
'import/parsers': {
|
||||
'import-x/parsers': {
|
||||
'@typescript-eslint/parser': ['.ts', '.tsx', '.mts', '.cts'],
|
||||
},
|
||||
'import/resolver': {
|
||||
'import-x/resolver': {
|
||||
typescript: {
|
||||
alwaysTryTypes: true,
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user