diff --git a/packages/eslint-config/configs/react/index.mjs b/packages/eslint-config/configs/react/index.mjs index 202b60706..0edb174eb 100644 --- a/packages/eslint-config/configs/react/index.mjs +++ b/packages/eslint-config/configs/react/index.mjs @@ -1,23 +1,20 @@ import reactRules from './rules/react.mjs' import reactA11yRules from './rules/react-a11y.mjs' import jsxA11y from 'eslint-plugin-jsx-a11y' -import eslintPluginReactConfig from 'eslint-plugin-react/configs/recommended.js' -import eslintPluginReact from 'eslint-plugin-react' +import react from "@eslint-react/eslint-plugin"; import reactHooks from 'eslint-plugin-react-hooks' import globals from 'globals'; -import { fixupPluginRules } from '@eslint/compat' import { deepMerge } from '../../deepMerge.js' /** @type {import('eslint').Linter.FlatConfig} */ export const index = deepMerge( + react.configs["recommended-type-checked"], { - rules: eslintPluginReact.configs.recommended.rules + rules: reactRules }, { - rules: eslintPluginReactConfig.rules // Only take rules from the config, not plugins, as plugins there are on the old eslint v8 format => add react-hooks plugin myself below + rules: reactA11yRules }, - reactRules, - reactA11yRules, { languageOptions: { globals: { @@ -31,7 +28,6 @@ export const index = deepMerge( }, plugins: { 'jsx-a11y': jsxA11y, - react: fixupPluginRules(eslintPluginReact), 'react-hooks': reactHooks, }, settings: { diff --git a/packages/eslint-config/configs/react/rules/react-a11y.mjs b/packages/eslint-config/configs/react/rules/react-a11y.mjs index 70caf7afd..9c0ef3833 100644 --- a/packages/eslint-config/configs/react/rules/react-a11y.mjs +++ b/packages/eslint-config/configs/react/rules/react-a11y.mjs @@ -3,247 +3,245 @@ /** @type {import('eslint').Linter.FlatConfig} */ export const index = { - rules: { - // Enforce that anchors have content - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-has-content.md - 'jsx-a11y/anchor-has-content': ['error', { components: [] }], + // Enforce that anchors have content + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-has-content.md + 'jsx-a11y/anchor-has-content': ['error', { components: [] }], - // Require ARIA roles to be valid and non-abstract - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-role.md - 'jsx-a11y/aria-role': ['error', { ignoreNonDom: false }], + // Require ARIA roles to be valid and non-abstract + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-role.md + 'jsx-a11y/aria-role': ['error', { ignoreNonDom: false }], - // Enforce all aria-* props are valid. - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-props.md - 'jsx-a11y/aria-props': 'error', + // Enforce all aria-* props are valid. + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-props.md + 'jsx-a11y/aria-props': 'error', - // Enforce ARIA state and property values are valid. - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-proptypes.md - 'jsx-a11y/aria-proptypes': 'error', + // Enforce ARIA state and property values are valid. + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-proptypes.md + 'jsx-a11y/aria-proptypes': 'error', - // Enforce that elements that do not support ARIA roles, states, and - // properties do not have those attributes. - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-unsupported-elements.md - 'jsx-a11y/aria-unsupported-elements': 'error', + // Enforce that elements that do not support ARIA roles, states, and + // properties do not have those attributes. + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-unsupported-elements.md + 'jsx-a11y/aria-unsupported-elements': 'error', - // Enforce that all elements that require alternative text have meaningful information - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/alt-text.md - 'jsx-a11y/alt-text': [ - 'error', - { - elements: ['img', 'object', 'area', 'input[type="image"]'], - img: [], - object: [], - area: [], - 'input[type="image"]': [], + // Enforce that all elements that require alternative text have meaningful information + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/alt-text.md + 'jsx-a11y/alt-text': [ + 'error', + { + elements: ['img', 'object', 'area', 'input[type="image"]'], + img: [], + object: [], + area: [], + 'input[type="image"]': [], + }, + ], + + // Prevent img alt text from containing redundant words like "image", "picture", or "photo" + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/img-redundant-alt.md + 'jsx-a11y/img-redundant-alt': 'error', + + // require that JSX labels use "htmlFor" + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-for.md + // deprecated: replaced by `label-has-associated-control` rule + 'jsx-a11y/label-has-for': [ + 'off', + { + components: [], + required: { + every: ['nesting', 'id'], }, - ], + allowChildren: false, + }, + ], - // Prevent img alt text from containing redundant words like "image", "picture", or "photo" - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/img-redundant-alt.md - 'jsx-a11y/img-redundant-alt': 'error', + // Enforce that a label tag has a text label and an associated control. + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/b800f40a2a69ad48015ae9226fbe879f946757ed/docs/rules/label-has-associated-control.md + 'jsx-a11y/label-has-associated-control': [ + 'error', + { + labelComponents: [], + labelAttributes: [], + controlComponents: [], + assert: 'both', + depth: 25, + }, + ], - // require that JSX labels use "htmlFor" - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-for.md - // deprecated: replaced by `label-has-associated-control` rule - 'jsx-a11y/label-has-for': [ - 'off', - { - components: [], - required: { - every: ['nesting', 'id'], - }, - allowChildren: false, - }, - ], + // Enforce that a control (an interactive element) has a text label. + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/control-has-associated-label.md + 'jsx-a11y/control-has-associated-label': [ + 'error', + { + labelAttributes: ['label'], + controlComponents: [], + ignoreElements: ['audio', 'canvas', 'embed', 'input', 'textarea', 'tr', 'video'], + ignoreRoles: [ + 'grid', + 'listbox', + 'menu', + 'menubar', + 'radiogroup', + 'row', + 'tablist', + 'toolbar', + 'tree', + 'treegrid', + ], + depth: 5, + }, + ], - // Enforce that a label tag has a text label and an associated control. - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/b800f40a2a69ad48015ae9226fbe879f946757ed/docs/rules/label-has-associated-control.md - 'jsx-a11y/label-has-associated-control': [ - 'error', - { - labelComponents: [], - labelAttributes: [], - controlComponents: [], - assert: 'both', - depth: 25, - }, - ], + // require that mouseover/out come with focus/blur, for keyboard-only users + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/mouse-events-have-key-events.md + 'jsx-a11y/mouse-events-have-key-events': 'error', - // Enforce that a control (an interactive element) has a text label. - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/control-has-associated-label.md - 'jsx-a11y/control-has-associated-label': [ - 'error', - { - labelAttributes: ['label'], - controlComponents: [], - ignoreElements: ['audio', 'canvas', 'embed', 'input', 'textarea', 'tr', 'video'], - ignoreRoles: [ - 'grid', - 'listbox', - 'menu', - 'menubar', - 'radiogroup', - 'row', - 'tablist', - 'toolbar', - 'tree', - 'treegrid', - ], - depth: 5, - }, - ], + // Prevent use of `accessKey` + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-access-key.md + 'jsx-a11y/no-access-key': 'error', - // require that mouseover/out come with focus/blur, for keyboard-only users - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/mouse-events-have-key-events.md - 'jsx-a11y/mouse-events-have-key-events': 'error', + // require onBlur instead of onChange + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-onchange.md + 'jsx-a11y/no-onchange': 'off', - // Prevent use of `accessKey` - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-access-key.md - 'jsx-a11y/no-access-key': 'error', + // Elements with an interactive role and interaction handlers must be focusable + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/interactive-supports-focus.md + 'jsx-a11y/interactive-supports-focus': 'error', - // require onBlur instead of onChange - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-onchange.md - 'jsx-a11y/no-onchange': 'off', + // Enforce that elements with ARIA roles must have all required attributes + // for that role. + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-has-required-aria-props.md + 'jsx-a11y/role-has-required-aria-props': 'error', - // Elements with an interactive role and interaction handlers must be focusable - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/interactive-supports-focus.md - 'jsx-a11y/interactive-supports-focus': 'error', + // Enforce that elements with explicit or implicit roles defined contain + // only aria-* properties supported by that role. + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-supports-aria-props.md + 'jsx-a11y/role-supports-aria-props': 'error', - // Enforce that elements with ARIA roles must have all required attributes - // for that role. - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-has-required-aria-props.md - 'jsx-a11y/role-has-required-aria-props': 'error', + // Enforce tabIndex value is not greater than zero. + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/tabindex-no-positive.md + 'jsx-a11y/tabindex-no-positive': 'error', - // Enforce that elements with explicit or implicit roles defined contain - // only aria-* properties supported by that role. - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-supports-aria-props.md - 'jsx-a11y/role-supports-aria-props': 'error', + // ensure tags have content and are not aria-hidden + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/heading-has-content.md + 'jsx-a11y/heading-has-content': ['error', { components: [''] }], - // Enforce tabIndex value is not greater than zero. - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/tabindex-no-positive.md - 'jsx-a11y/tabindex-no-positive': 'error', + // require HTML elements to have a "lang" prop + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/html-has-lang.md + 'jsx-a11y/html-has-lang': 'error', - // ensure tags have content and are not aria-hidden - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/heading-has-content.md - 'jsx-a11y/heading-has-content': ['error', { components: [''] }], + // require HTML element's lang prop to be valid + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/lang.md + 'jsx-a11y/lang': 'error', - // require HTML elements to have a "lang" prop - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/html-has-lang.md - 'jsx-a11y/html-has-lang': 'error', + // prevent distracting elements, like and + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-distracting-elements.md + 'jsx-a11y/no-distracting-elements': [ + 'error', + { + elements: ['marquee', 'blink'], + }, + ], - // require HTML element's lang prop to be valid - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/lang.md - 'jsx-a11y/lang': 'error', + // only allow to have the "scope" attr + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/scope.md + 'jsx-a11y/scope': 'error', - // prevent distracting elements, like and - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-distracting-elements.md - 'jsx-a11y/no-distracting-elements': [ - 'error', - { - elements: ['marquee', 'blink'], - }, - ], + // require onClick be accompanied by onKeyUp/onKeyDown/onKeyPress + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/click-events-have-key-events.md + 'jsx-a11y/click-events-have-key-events': 'error', - // only allow to have the "scope" attr - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/scope.md - 'jsx-a11y/scope': 'error', + // Enforce that DOM elements without semantic behavior not have interaction handlers + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md + 'jsx-a11y/no-static-element-interactions': [ + 'error', + { + handlers: ['onClick', 'onMouseDown', 'onMouseUp', 'onKeyPress', 'onKeyDown', 'onKeyUp'], + }, + ], - // require onClick be accompanied by onKeyUp/onKeyDown/onKeyPress - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/click-events-have-key-events.md - 'jsx-a11y/click-events-have-key-events': 'error', + // A non-interactive element does not support event handlers (mouse and key handlers) + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-interactions.md + 'jsx-a11y/no-noninteractive-element-interactions': [ + 'error', + { + handlers: ['onClick', 'onMouseDown', 'onMouseUp', 'onKeyPress', 'onKeyDown', 'onKeyUp'], + }, + ], - // Enforce that DOM elements without semantic behavior not have interaction handlers - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md - 'jsx-a11y/no-static-element-interactions': [ - 'error', - { - handlers: ['onClick', 'onMouseDown', 'onMouseUp', 'onKeyPress', 'onKeyDown', 'onKeyUp'], - }, - ], + // ensure emoji are accessible + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/accessible-emoji.md + 'jsx-a11y/accessible-emoji': 'error', - // A non-interactive element does not support event handlers (mouse and key handlers) - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-interactions.md - 'jsx-a11y/no-noninteractive-element-interactions': [ - 'error', - { - handlers: ['onClick', 'onMouseDown', 'onMouseUp', 'onKeyPress', 'onKeyDown', 'onKeyUp'], - }, - ], + // elements with aria-activedescendant must be tabbable + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-activedescendant-has-tabindex.md + 'jsx-a11y/aria-activedescendant-has-tabindex': 'error', - // ensure emoji are accessible - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/accessible-emoji.md - 'jsx-a11y/accessible-emoji': 'error', + // ensure iframe elements have a unique title + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/iframe-has-title.md + 'jsx-a11y/iframe-has-title': 'error', - // elements with aria-activedescendant must be tabbable - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-activedescendant-has-tabindex.md - 'jsx-a11y/aria-activedescendant-has-tabindex': 'error', + // prohibit autoFocus prop + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-autofocus.md + 'jsx-a11y/no-autofocus': ['error', { ignoreNonDOM: true }], - // ensure iframe elements have a unique title - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/iframe-has-title.md - 'jsx-a11y/iframe-has-title': 'error', + // ensure HTML elements do not specify redundant ARIA roles + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-redundant-roles.md + 'jsx-a11y/no-redundant-roles': 'error', - // prohibit autoFocus prop - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-autofocus.md - 'jsx-a11y/no-autofocus': ['error', { ignoreNonDOM: true }], + // media elements must have captions + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/media-has-caption.md + 'jsx-a11y/media-has-caption': [ + 'error', + { + audio: [], + video: [], + track: [], + }, + ], - // ensure HTML elements do not specify redundant ARIA roles - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-redundant-roles.md - 'jsx-a11y/no-redundant-roles': 'error', + // WAI-ARIA roles should not be used to convert an interactive element to non-interactive + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-interactive-element-to-noninteractive-role.md + 'jsx-a11y/no-interactive-element-to-noninteractive-role': [ + 'error', + { + tr: ['none', 'presentation'], + }, + ], - // media elements must have captions - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/media-has-caption.md - 'jsx-a11y/media-has-caption': [ - 'error', - { - audio: [], - video: [], - track: [], - }, - ], + // WAI-ARIA roles should not be used to convert a non-interactive element to interactive + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-to-interactive-role.md + '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'], + }, + ], - // WAI-ARIA roles should not be used to convert an interactive element to non-interactive - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-interactive-element-to-noninteractive-role.md - 'jsx-a11y/no-interactive-element-to-noninteractive-role': [ - 'error', - { - tr: ['none', 'presentation'], - }, - ], + // Tab key navigation should be limited to elements on the page that can be interacted with. + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-tabindex.md + 'jsx-a11y/no-noninteractive-tabindex': [ + 'error', + { + tags: [], + roles: ['tabpanel'], + }, + ], - // WAI-ARIA roles should not be used to convert a non-interactive element to interactive - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-to-interactive-role.md - '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'], - }, - ], - - // Tab key navigation should be limited to elements on the page that can be interacted with. - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-tabindex.md - 'jsx-a11y/no-noninteractive-tabindex': [ - 'error', - { - tags: [], - roles: ['tabpanel'], - }, - ], - - // ensure tags are valid - // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/0745af376cdc8686d85a361ce36952b1fb1ccf6e/docs/rules/anchor-is-valid.md - 'jsx-a11y/anchor-is-valid': [ - 'error', - { - components: ['Link'], - specialLink: ['to'], - aspects: ['noHref', 'invalidHref', 'preferButton'], - }, - ], - }, + // ensure tags are valid + // https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/0745af376cdc8686d85a361ce36952b1fb1ccf6e/docs/rules/anchor-is-valid.md + 'jsx-a11y/anchor-is-valid': [ + 'error', + { + components: ['Link'], + specialLink: ['to'], + aspects: ['noHref', 'invalidHref', 'preferButton'], + }, + ], } export default index diff --git a/packages/eslint-config/configs/react/rules/react.mjs b/packages/eslint-config/configs/react/rules/react.mjs index d8a1ca474..8e8d32e95 100644 --- a/packages/eslint-config/configs/react/rules/react.mjs +++ b/packages/eslint-config/configs/react/rules/react.mjs @@ -1,549 +1,18 @@ /** @type {import('eslint').Linter.FlatConfig} */ export const index = { - rules: { - // View link below for react rules documentation - // https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules - - // Specify whether double or single quotes should be used in JSX attributes - // https://eslint.org/docs/rules/jsx-quotes - 'jsx-quotes': ['error', 'prefer-double'], - - 'class-methods-use-this': [ - 'error', - { - exceptMethods: [ - 'render', - 'getInitialState', - 'getDefaultProps', - 'getChildContext', - 'componentWillMount', - 'UNSAFE_componentWillMount', - 'componentDidMount', - 'componentWillReceiveProps', - 'UNSAFE_componentWillReceiveProps', - 'shouldComponentUpdate', - 'componentWillUpdate', - 'UNSAFE_componentWillUpdate', - 'componentDidUpdate', - 'componentWillUnmount', - 'componentDidCatch', - 'getSnapshotBeforeUpdate', - ], - }, - ], - - // Prevent missing displayName in a React component definition - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/display-name.md - 'react/display-name': ['off', { ignoreTranspilerName: false }], - - // Forbid certain propTypes (any, array, object) - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/forbid-prop-types.md - 'react/forbid-prop-types': [ - 'error', - { - forbid: ['any', 'array', 'object'], - checkContextTypes: true, - checkChildContextTypes: true, - }, - ], - - // Forbid certain props on DOM Nodes - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/forbid-dom-props.md - 'react/forbid-dom-props': ['off', { forbid: [] }], - - // Enforce boolean attributes notation in JSX - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md - 'react/jsx-boolean-value': ['error', 'never', { always: [] }], - - // Validate closing bracket location in JSX - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md - 'react/jsx-closing-bracket-location': ['error', 'line-aligned'], - - // Validate closing tag location in JSX - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-tag-location.md - 'react/jsx-closing-tag-location': 'error', - - // Enforce or disallow spaces inside of curly braces in JSX attributes - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md - 'react/jsx-curly-spacing': ['error', 'never', { allowMultiline: true }], - - // Enforce event handler naming conventions in JSX - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md - 'react/jsx-handler-names': [ - 'off', - { - eventHandlerPrefix: 'handle', - eventHandlerPropPrefix: 'on', - }, - ], - - // Validate props indentation in JSX - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent-props.md - 'react/jsx-indent-props': ['error', 2], - - // Validate JSX has key prop when in array or iterator - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-key.md - 'react/jsx-key': 'off', - - // Limit maximum of props on a single line in JSX - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-max-props-per-line.md - 'react/jsx-max-props-per-line': ['error', { maximum: 1 }], - - // Prevent usage of .bind() in JSX props - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md - 'react/jsx-no-bind': [ - 'error', - { - ignoreRefs: true, - allowArrowFunctions: true, - allowFunctions: false, - allowBind: false, - ignoreDOMComponents: true, - }, - ], - - // Prevent duplicate props in JSX - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md - 'react/jsx-no-duplicate-props': ['error', { ignoreCase: true }], - - // Prevent usage of unwrapped JSX strings - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md - 'react/jsx-no-literals': ['off', { noStrings: true }], - - // Disallow undeclared variables in JSX - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md - 'react/jsx-no-undef': 'error', - - // Enforce PascalCase for user-defined JSX components - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md - 'react/jsx-pascal-case': [ - 'error', - { - allowAllCaps: true, - ignore: [], - }, - ], - - // Enforce propTypes declarations alphabetical sorting - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-prop-types.md - 'react/sort-prop-types': [ - 'off', - { - ignoreCase: true, - callbacksLast: false, - requiredFirst: false, - sortShapeProp: true, - }, - ], - - // Deprecated in favor of react/jsx-sort-props - 'react/jsx-sort-prop-types': 'off', - - // Enforce props alphabetical sorting - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md - 'react/jsx-sort-props': [ - 'off', - { - ignoreCase: true, - callbacksLast: false, - shorthandFirst: false, - shorthandLast: false, - noSortAlphabetically: false, - reservedFirst: true, - }, - ], - - // Enforce defaultProps declarations alphabetical sorting - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-sort-default-props.md - 'react/jsx-sort-default-props': [ - 'off', - { - ignoreCase: true, - }, - ], - - // Prevent React to be incorrectly marked as unused - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md - 'react/jsx-uses-react': ['error'], - - // Prevent variables used in JSX to be incorrectly marked as unused - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md - 'react/jsx-uses-vars': 'error', - - // Prevent usage of dangerous JSX properties - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger.md - 'react/no-danger': 'off', - - // Prevent usage of deprecated methods - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md - 'react/no-deprecated': ['error'], - - // Prevent usage of setState in componentDidMount - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md - // this is necessary for server-rendering - 'react/no-did-mount-set-state': 'off', - - // Prevent usage of setState in componentDidUpdate - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md - 'react/no-did-update-set-state': 'off', - - // Prevent usage of setState in componentWillUpdate - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-will-update-set-state.md - 'react/no-will-update-set-state': 'error', - - // Prevent direct mutation of this.state - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md - 'react/no-direct-mutation-state': 'off', - - // Prevent usage of isMounted - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md - 'react/no-is-mounted': 'error', - - // Prevent multiple component definition per file - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md - 'react/no-multi-comp': 'off', - - // Prevent usage of setState - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-set-state.md - 'react/no-set-state': 'off', - - // Prevent using string references - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md - 'react/no-string-refs': 'error', - - // Prevent usage of unknown DOM property - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md - 'react/no-unknown-property': 'error', - - // Require ES6 class declarations over React.createClass - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md - 'react/prefer-es6-class': ['error', 'always'], - - // Require stateless functions when not using lifecycle methods, setState or ref - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md - 'react/prefer-stateless-function': ['error', { ignorePureComponents: true }], - - // Prevent missing props validation in a React component definition - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md - 'react/prop-types': [ - 'error', - { - ignore: [], - customValidators: [], - skipUndeclared: false, - }, - ], - - // Prevent missing React when using JSX - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md - 'react/react-in-jsx-scope': 'error', - - // Require render() methods to return something - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-render-return.md - 'react/require-render-return': 'error', - - // Prevent extra closing tags for components without children - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md - 'react/self-closing-comp': 'error', - - // Enforce component methods order - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/sort-comp.md - 'react/sort-comp': [ - 'error', - { - order: [ - 'static-variables', - 'static-methods', - 'instance-variables', - 'lifecycle', - '/^on.+$/', - 'getters', - 'setters', - '/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/', - 'instance-methods', - 'everything-else', - 'rendering', - ], - groups: { - lifecycle: [ - 'displayName', - 'propTypes', - 'contextTypes', - 'childContextTypes', - 'mixins', - 'statics', - 'defaultProps', - 'constructor', - 'getDefaultProps', - 'getInitialState', - 'state', - 'getChildContext', - 'getDerivedStateFromProps', - 'componentWillMount', - 'UNSAFE_componentWillMount', - 'componentDidMount', - 'componentWillReceiveProps', - 'UNSAFE_componentWillReceiveProps', - 'shouldComponentUpdate', - 'componentWillUpdate', - 'UNSAFE_componentWillUpdate', - 'getSnapshotBeforeUpdate', - 'componentDidUpdate', - 'componentDidCatch', - 'componentWillUnmount', - ], - rendering: ['/^render.+$/', 'render'], - }, - }, - ], - - // Prevent missing parentheses around multilines JSX - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-wrap-multilines.md - 'react/jsx-wrap-multilines': [ - 'error', - { - declaration: 'parens-new-line', - assignment: 'parens-new-line', - return: 'parens-new-line', - arrow: 'parens-new-line', - condition: 'parens-new-line', - logical: 'parens-new-line', - prop: 'parens-new-line', - }, - ], - - // Require that the first prop in a JSX element be on a new line when the element is multiline - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-first-prop-new-line.md - 'react/jsx-first-prop-new-line': ['error', 'multiline-multiprop'], - - // Enforce spacing around jsx equals signs - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-equals-spacing.md - 'react/jsx-equals-spacing': ['error', 'never'], - - // Enforce JSX indentation - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent.md - 'react/jsx-indent': ['error', 2], - - // Disallow target="_blank" on links - // https://github.com/yannickcr/eslint-plugin-react/blob/ac102885765be5ff37847a871f239c6703e1c7cc/docs/rules/jsx-no-target-blank.md - 'react/jsx-no-target-blank': ['error', { enforceDynamicLinks: 'always' }], - - // only .jsx files may have JSX - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md - 'react/jsx-filename-extension': ['error', { extensions: ['.js', '.jsx', '.ts', '.tsx'] }], - - // prevent accidental JS comments from being injected into JSX as text - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md - 'react/jsx-no-comment-textnodes': 'error', - - // disallow using React.render/ReactDOM.render's return value - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-render-return-value.md - 'react/no-render-return-value': 'error', - - // require a shouldComponentUpdate method, or PureRenderMixin - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/require-optimization.md - 'react/require-optimization': ['off', { allowDecorators: [] }], - - // warn against using findDOMNode() - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md - 'react/no-find-dom-node': 'error', - - // Forbid certain props on Components - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-component-props.md - 'react/forbid-component-props': ['off', { forbid: [] }], - - // Forbid certain elements - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-elements.md - 'react/forbid-elements': ['off', { forbid: [] }], - - // Prevent problem with children and props.dangerouslySetInnerHTML - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md - 'react/no-danger-with-children': 'error', - - // Prevent unused propType definitions - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-prop-types.md - 'react/no-unused-prop-types': [ - 'error', - { - customValidators: [], - skipShapeProps: true, - }, - ], - - // Require style prop value be an object or var - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/style-prop-object.md - 'react/style-prop-object': 'error', - - // Prevent invalid characters from appearing in markup - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md - 'react/no-unescaped-entities': 'error', - - // Prevent passing of children as props - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md - 'react/no-children-prop': 'error', - - // Validate whitespace in and around the JSX opening and closing brackets - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-tag-spacing.md - 'react/jsx-tag-spacing': [ - 'error', - { - closingSlash: 'never', - beforeSelfClosing: 'always', - afterOpening: 'never', - beforeClosing: 'never', - }, - ], - - // Enforce spaces before the closing bracket of self-closing JSX elements - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md - // Deprecated in favor of jsx-tag-spacing - 'react/jsx-space-before-closing': ['off', 'always'], - - // Prevent usage of Array index in keys - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md - 'react/no-array-index-key': 'off', - - // Enforce a defaultProps definition for every prop that is not a required prop - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/require-default-props.md - 'react/require-default-props': [ - 'error', - { - forbidDefaultForRequired: true, - }, - ], - - // Forbids using non-exported propTypes - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-foreign-prop-types.md - // this is intentionally set to "warn". it would be "error", - // but it's only critical if you're stripping propTypes in production. - 'react/forbid-foreign-prop-types': ['warn', { allowInPropTypes: true }], - - // Prevent void DOM elements from receiving children - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md - 'react/void-dom-elements-no-children': 'error', - - // Enforce all defaultProps have a corresponding non-required PropType - // https://github.com/yannickcr/eslint-plugin-react/blob/9e13ae2c51e44872b45cc15bf1ac3a72105bdd0e/docs/rules/default-props-match-prop-types.md - 'react/default-props-match-prop-types': ['error', { allowRequiredDefaults: false }], - - // Prevent usage of shouldComponentUpdate when extending React.PureComponent - // https://github.com/yannickcr/eslint-plugin-react/blob/9e13ae2c51e44872b45cc15bf1ac3a72105bdd0e/docs/rules/no-redundant-should-component-update.md - 'react/no-redundant-should-component-update': 'error', - - // Prevent unused state values - // https://github.com/yannickcr/eslint-plugin-react/pull/1103/ - 'react/no-unused-state': 'error', - - // Enforces consistent naming for boolean props - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/boolean-prop-naming.md - 'react/boolean-prop-naming': [ - 'off', - { - propTypeNames: ['bool', 'mutuallyExclusiveTrueProps'], - rule: '^(is|has)[A-Z]([A-Za-z0-9]?)+', - message: '', - }, - ], - - // Prevents common casing typos - // https://github.com/yannickcr/eslint-plugin-react/blob/73abadb697034b5ccb514d79fb4689836fe61f91/docs/rules/no-typos.md - 'react/no-typos': 'error', - - // Enforce curly braces or disallow unnecessary curly braces in JSX props and/or children - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md - 'react/jsx-curly-brace-presence': ['error', { props: 'never', children: 'never' }], - - // One JSX Element Per Line - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-one-expression-per-line.md - 'react/jsx-one-expression-per-line': ['error', { allow: 'single-child' }], - - // Enforce consistent usage of destructuring assignment of props, state, and context - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/destructuring-assignment.md - 'react/destructuring-assignment': ['error', 'always'], - - // Prevent using this.state within a this.setState - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/no-access-state-in-setstate.md - 'react/no-access-state-in-setstate': 'error', - - // Prevent usage of button elements without an explicit type attribute - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/button-has-type.md - 'react/button-has-type': [ - 'error', - { - button: true, - submit: true, - reset: false, - }, - ], - - // Ensures inline tags are not rendered without spaces between them - 'react/jsx-child-element-spacing': 'off', - - // Prevent this from being used in stateless functional components - // https://github.com/yannickcr/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/no-this-in-sfc.md - 'react/no-this-in-sfc': 'error', - - // Validate JSX maximum depth - // https://github.com/yannickcr/eslint-plugin-react/blob/abe8381c0d6748047224c430ce47f02e40160ed0/docs/rules/jsx-max-depth.md - 'react/jsx-max-depth': 'off', - - // Disallow multiple spaces between inline JSX props - // https://github.com/yannickcr/eslint-plugin-react/blob/ac102885765be5ff37847a871f239c6703e1c7cc/docs/rules/jsx-props-no-multi-spaces.md - 'react/jsx-props-no-multi-spaces': 'error', - - // Prevent usage of UNSAFE_ methods - // https://github.com/yannickcr/eslint-plugin-react/blob/157cc932be2cfaa56b3f5b45df6f6d4322a2f660/docs/rules/no-unsafe.md - 'react/no-unsafe': 'off', - - // Enforce shorthand or standard form for React fragments - // https://github.com/yannickcr/eslint-plugin-react/blob/bc976b837abeab1dffd90ac6168b746a83fc83cc/docs/rules/jsx-fragments.md - 'react/jsx-fragments': ['error', 'element'], - - // Enforce linebreaks in curly braces in JSX attributes and expressions. - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-newline.md - 'react/jsx-curly-newline': [ - 'error', - { - multiline: 'consistent', - singleline: 'consistent', - }, - ], - - // Enforce state initialization style - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/state-in-constructor.md - // TODO: set to "never" once babel-preset-airbnb supports public class fields - 'react/state-in-constructor': ['error', 'always'], - - // Enforces where React component static properties should be positioned - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/static-property-placement.md - // TODO: set to "static public field" once babel-preset-airbnb supports public class fields - 'react/static-property-placement': ['error', 'property assignment'], - - // Disallow JSX props spreading - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md - 'react/jsx-props-no-spreading': 'off', - - // Enforce that props are read-only - // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-read-only-props.md - 'react/prefer-read-only-props': 'off', - }, - - settings: { - 'import/resolver': { - node: { - extensions: ['.js', '.jsx', '.json'], - }, - }, - react: { - pragma: 'React', - version: 'detect', - }, - propWrapperFunctions: [ - 'forbidExtraProps', // https://www.npmjs.com/package/airbnb-prop-types - 'exact', // https://www.npmjs.com/package/prop-types-exact - 'Object.freeze', // https://tc39.github.io/ecma262/#sec-object.freeze - ], - }, + '@eslint-react/dom/no-dangerously-set-innerhtml': 'off', + '@eslint-react/dom/no-dangerously-set-innerhtml-with-children': 'off', + '@eslint-react/no-unsafe-component-will-mount': 'off', + '@eslint-react/no-unsafe-component-will-receive-props': 'off', + '@eslint-react/no-unsafe-component-will-update': 'off', + '@eslint-react/no-set-state-in-component-did-mount': 'off', + '@eslint-react/no-set-state-in-component-did-update': 'off', + '@eslint-react/no-set-state-in-component-will-update': 'off', + '@eslint-react/no-missing-component-display-name': 'off', + '@eslint-react/no-direct-mutation-state': 'off', + '@eslint-react/no-array-index-key': 'off', + '@eslint-react/no-unstable-default-props': 'off', // TODO: Evaluate enabling this + '@eslint-react/no-unstable-context-value': 'off', // TODO: Evaluate enabling this } export default index diff --git a/packages/eslint-config/index.mjs b/packages/eslint-config/index.mjs index 9658b0aa7..5c9da8cf2 100644 --- a/packages/eslint-config/index.mjs +++ b/packages/eslint-config/index.mjs @@ -52,12 +52,7 @@ const baseRules = { 'payload/no-jsx-import-statements': 'error', } -const reactRules = { - 'react/no-unused-prop-types': 'off', - 'react/prop-types': 'off', - 'react/require-default-props': 'off', - 'react/destructuring-assignment': 'warn', - 'react/no-unescaped-entities': 'warn', +const reactA11yRules = { 'jsx-a11y/anchor-is-valid': 'warn', 'jsx-a11y/control-has-associated-label': 'warn', 'jsx-a11y/no-static-element-interactions': 'warn', @@ -169,7 +164,7 @@ export const rootEslintConfig = [ rules: { ...baseRules, ...typescriptRules, - ...reactRules, + ...reactA11yRules, }, } ), diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index 6248d0046..4468a23ef 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -17,24 +17,23 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": { - "@eslint/compat": "1.1.0", + "@eslint-react/eslint-plugin": "1.5.25-next.4", "@eslint/js": "9.6.0", "@payloadcms/eslint-plugin": "workspace:*", "@types/eslint": "8.56.10", "@types/eslint__js": "8.42.3", - "@typescript-eslint/parser": "7.15.0", + "@typescript-eslint/parser": "7.16.0", "eslint": "9.6.0", "eslint-config-prettier": "9.1.0", - "eslint-plugin-import-x": "0.5.3", + "eslint-plugin-import-x": "3.0.0", "eslint-plugin-jest": "28.6.0", "eslint-plugin-jest-dom": "5.4.0", "eslint-plugin-jsx-a11y": "6.9.0", "eslint-plugin-perfectionist": "2.11.0", - "eslint-plugin-react": "7.34.3", - "eslint-plugin-react-hooks": "5.1.0-rc-f38c22b244-20240704", + "eslint-plugin-react-hooks": "5.1.0-rc-85acf2d195-20240711", "eslint-plugin-regexp": "2.6.0", "globals": "15.8.0", "typescript": "5.5.3", - "typescript-eslint": "7.15.0" + "typescript-eslint": "7.16.0" } } diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index bdc889ede..fab59b4a6 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -17,23 +17,22 @@ "test": "echo \"Error: no test specified\" && exit 1" }, "dependencies": { - "@eslint/compat": "1.1.0", + "@eslint-react/eslint-plugin": "1.5.25-next.4", "@eslint/js": "9.6.0", "@types/eslint": "8.56.10", "@types/eslint__js": "8.42.3", - "@typescript-eslint/parser": "7.15.0", + "@typescript-eslint/parser": "7.16.0", "eslint": "9.6.0", "eslint-config-prettier": "9.1.0", - "eslint-plugin-import-x": "0.5.3", + "eslint-plugin-import-x": "3.0.0", "eslint-plugin-jest": "28.6.0", "eslint-plugin-jest-dom": "5.4.0", "eslint-plugin-jsx-a11y": "6.9.0", "eslint-plugin-perfectionist": "2.11.0", - "eslint-plugin-react": "7.34.3", - "eslint-plugin-react-hooks": "5.1.0-rc-f38c22b244-20240704", + "eslint-plugin-react-hooks": "5.1.0-rc-85acf2d195-20240711", "eslint-plugin-regexp": "2.6.0", "globals": "15.8.0", "typescript": "5.5.3", - "typescript-eslint": "7.15.0" + "typescript-eslint": "7.16.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 73a66b39b..663beceb3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -366,9 +366,9 @@ importers: packages/eslint-config: dependencies: - '@eslint/compat': - specifier: 1.1.0 - version: 1.1.0 + '@eslint-react/eslint-plugin': + specifier: 1.5.25-next.4 + version: 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) '@eslint/js': specifier: 9.6.0 version: 9.6.0 @@ -382,8 +382,8 @@ importers: specifier: 8.42.3 version: 8.42.3 '@typescript-eslint/parser': - specifier: 7.15.0 - version: 7.15.0(eslint@9.6.0)(typescript@5.5.3) + specifier: 7.16.0 + version: 7.16.0(eslint@9.6.0)(typescript@5.5.3) eslint: specifier: 9.6.0 version: 9.6.0 @@ -391,8 +391,8 @@ importers: specifier: 9.1.0 version: 9.1.0(eslint@9.6.0) eslint-plugin-import-x: - specifier: 0.5.3 - version: 0.5.3(eslint@9.6.0)(typescript@5.5.3) + specifier: 3.0.0 + version: 3.0.0(eslint@9.6.0)(typescript@5.5.3) eslint-plugin-jest: specifier: 28.6.0 version: 28.6.0(eslint@9.6.0)(jest@29.7.0)(typescript@5.5.3) @@ -405,12 +405,9 @@ importers: eslint-plugin-perfectionist: specifier: 2.11.0 version: 2.11.0(eslint@9.6.0)(typescript@5.5.3) - eslint-plugin-react: - specifier: 7.34.3 - version: 7.34.3(eslint@9.6.0) eslint-plugin-react-hooks: - specifier: 5.1.0-rc-f38c22b244-20240704 - version: 5.1.0-rc-f38c22b244-20240704(eslint@9.6.0) + specifier: 5.1.0-rc-85acf2d195-20240711 + version: 5.1.0-rc-85acf2d195-20240711(eslint@9.6.0) eslint-plugin-regexp: specifier: 2.6.0 version: 2.6.0(eslint@9.6.0) @@ -421,14 +418,14 @@ importers: specifier: 5.5.3 version: 5.5.3 typescript-eslint: - specifier: 7.15.0 - version: 7.15.0(eslint@9.6.0)(typescript@5.5.3) + specifier: 7.16.0 + version: 7.16.0(eslint@9.6.0)(typescript@5.5.3) packages/eslint-plugin: dependencies: - '@eslint/compat': - specifier: 1.1.0 - version: 1.1.0 + '@eslint-react/eslint-plugin': + specifier: 1.5.25-next.4 + version: 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) '@eslint/js': specifier: 9.6.0 version: 9.6.0 @@ -439,8 +436,8 @@ importers: specifier: 8.42.3 version: 8.42.3 '@typescript-eslint/parser': - specifier: 7.15.0 - version: 7.15.0(eslint@9.6.0)(typescript@5.5.3) + specifier: 7.16.0 + version: 7.16.0(eslint@9.6.0)(typescript@5.5.3) eslint: specifier: 9.6.0 version: 9.6.0 @@ -448,8 +445,8 @@ importers: specifier: 9.1.0 version: 9.1.0(eslint@9.6.0) eslint-plugin-import-x: - specifier: 0.5.3 - version: 0.5.3(eslint@9.6.0)(typescript@5.5.3) + specifier: 3.0.0 + version: 3.0.0(eslint@9.6.0)(typescript@5.5.3) eslint-plugin-jest: specifier: 28.6.0 version: 28.6.0(eslint@9.6.0)(jest@29.7.0)(typescript@5.5.3) @@ -462,12 +459,9 @@ importers: eslint-plugin-perfectionist: specifier: 2.11.0 version: 2.11.0(eslint@9.6.0)(typescript@5.5.3) - eslint-plugin-react: - specifier: 7.34.3 - version: 7.34.3(eslint@9.6.0) eslint-plugin-react-hooks: - specifier: 5.1.0-rc-f38c22b244-20240704 - version: 5.1.0-rc-f38c22b244-20240704(eslint@9.6.0) + specifier: 5.1.0-rc-85acf2d195-20240711 + version: 5.1.0-rc-85acf2d195-20240711(eslint@9.6.0) eslint-plugin-regexp: specifier: 2.6.0 version: 2.6.0(eslint@9.6.0) @@ -478,8 +472,8 @@ importers: specifier: 5.5.3 version: 5.5.3 typescript-eslint: - specifier: 7.15.0 - version: 7.15.0(eslint@9.6.0)(typescript@5.5.3) + specifier: 7.16.0 + version: 7.16.0(eslint@9.6.0)(typescript@5.5.3) packages/graphql: dependencies: @@ -4860,9 +4854,124 @@ packages: resolution: {integrity: sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - /@eslint/compat@1.1.0: - resolution: {integrity: sha512-s9Wi/p25+KbzxKlDm3VshQdImhWk+cbdblhwGNnyCU5lpSwtWa4v7VQCxSki0FAUrGA3s8nCWgYzAH41mwQVKQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + /@eslint-react/ast@1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3): + resolution: {integrity: sha512-9VKkiR/p3O2+BZpzh5OX1qodH+gZ9HSbdcQYmGaXAy1CPVByBX925cE/BQu2qjkclDklKvx6322ASuyPwlejnw==} + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.6.0) + '@eslint-react/tools': 1.5.25-next.4 + '@eslint-react/types': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/scope-manager': 7.16.0 + '@typescript-eslint/types': 7.16.0 + '@typescript-eslint/utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + transitivePeerDependencies: + - eslint + - supports-color + - typescript + dev: false + + /@eslint-react/core@1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3): + resolution: {integrity: sha512-dtdQiQyFEyE37qmf42Q9Ltw6v1k8mrxgana56LQQJzJuyWpM7hjgFJvSMWJB4AewHyuTADLj4OHkRpfc/WTtig==} + dependencies: + '@eslint-react/ast': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/jsx': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/shared': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/tools': 1.5.25-next.4 + '@eslint-react/types': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/var': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/scope-manager': 7.16.0 + '@typescript-eslint/type-utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/types': 7.16.0 + '@typescript-eslint/utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + transitivePeerDependencies: + - eslint + - supports-color + - typescript + dev: false + + /@eslint-react/eslint-plugin@1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3): + resolution: {integrity: sha512-BNftQDh68rRotygErpZ4EIjPx+UNRICzlHdAYw1kmXE2YTBvzbkZIY0kUQtePRgaa3esvTohk0J3HjRpOFQ31g==} + engines: {bun: '>=1.0.15', node: '>=18.18.0'} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: 5.5.3 + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-react/shared': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/tools': 1.5.25-next.4 + '@eslint-react/types': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/scope-manager': 7.16.0 + '@typescript-eslint/type-utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/types': 7.16.0 + '@typescript-eslint/utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + eslint: 9.6.0 + eslint-plugin-react-debug: 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + eslint-plugin-react-dom: 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + eslint-plugin-react-hooks-extra: 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + eslint-plugin-react-naming-convention: 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + eslint-plugin-react-x: 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + typescript: 5.5.3 + transitivePeerDependencies: + - supports-color + dev: false + + /@eslint-react/jsx@1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3): + resolution: {integrity: sha512-BpiL8C4YKBhOqwG2TkNT8H8wvC+rWY2jZSOb5ykrhG05fXufIpiNR3iG/XyQxuVn0oC9iWVVoJ3K3qiqlPDOcg==} + dependencies: + '@eslint-react/ast': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/tools': 1.5.25-next.4 + '@eslint-react/types': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/var': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/scope-manager': 7.16.0 + '@typescript-eslint/types': 7.16.0 + '@typescript-eslint/utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + transitivePeerDependencies: + - eslint + - supports-color + - typescript + dev: false + + /@eslint-react/shared@1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3): + resolution: {integrity: sha512-2QeA5AuM7HVmZ1Zd5QP8idrNcv5a+dcgT43CFuNFkpMBXlcYluiE/kb/m8YXCkFavCWsAV1df8QEvh9XHD3FdQ==} + dependencies: + '@typescript-eslint/utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + valibot: 0.36.0 + transitivePeerDependencies: + - eslint + - supports-color + - typescript + dev: false + + /@eslint-react/tools@1.5.25-next.4: + resolution: {integrity: sha512-jFwkbc7p6OEoLLWUIUcUJuLxZJuZSpGeoa4TWaukePhyupkrke8x92Nf7+9HM4vms7c/u8FEir4sTLXMskACLA==} + dev: false + + /@eslint-react/types@1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3): + resolution: {integrity: sha512-XwIs8nfGg3MoohJmw9+TM0DXHNVMhufmqc9YsLgPcbZ3DNBkTiuEbdoZlMbhvzYyxcIy2ocVqc+gIu03xlN8dw==} + dependencies: + '@eslint-react/tools': 1.5.25-next.4 + '@typescript-eslint/types': 7.16.0 + '@typescript-eslint/utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + transitivePeerDependencies: + - eslint + - supports-color + - typescript + dev: false + + /@eslint-react/var@1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3): + resolution: {integrity: sha512-n7ZqKf7a0msz2xrqhncA4l+YVw+eF6Uk5PaCYnJVy7dRE8lWDHGL6U/wvVfm/Hyllh6tjUORRR7SV5yURXGoHw==} + dependencies: + '@eslint-react/ast': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/tools': 1.5.25-next.4 + '@eslint-react/types': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/scope-manager': 7.16.0 + '@typescript-eslint/types': 7.16.0 + '@typescript-eslint/utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + transitivePeerDependencies: + - eslint + - supports-color + - typescript dev: false /@eslint/config-array@0.17.0: @@ -7129,8 +7238,8 @@ packages: dependencies: '@types/yargs-parser': 21.0.3 - /@typescript-eslint/eslint-plugin@7.15.0(@typescript-eslint/parser@7.15.0)(eslint@9.6.0)(typescript@5.5.3): - resolution: {integrity: sha512-uiNHpyjZtFrLwLDpHnzaDlP3Tt6sGMqTCiqmxaN4n4RP0EfYZDODJyddiFDF44Hjwxr5xAcaYxVKm9QKQFJFLA==} + /@typescript-eslint/eslint-plugin@7.16.0(@typescript-eslint/parser@7.16.0)(eslint@9.6.0)(typescript@5.5.3): + resolution: {integrity: sha512-py1miT6iQpJcs1BiJjm54AMzeuMPBSPuKPlnT8HlfudbcS5rYeX5jajpLf3mrdRh9dA/Ec2FVUY0ifeVNDIhZw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -7141,11 +7250,11 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 7.15.0(eslint@9.6.0)(typescript@5.5.3) - '@typescript-eslint/scope-manager': 7.15.0 - '@typescript-eslint/type-utils': 7.15.0(eslint@9.6.0)(typescript@5.5.3) - '@typescript-eslint/utils': 7.15.0(eslint@9.6.0)(typescript@5.5.3) - '@typescript-eslint/visitor-keys': 7.15.0 + '@typescript-eslint/parser': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/scope-manager': 7.16.0 + '@typescript-eslint/type-utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/visitor-keys': 7.16.0 eslint: 9.6.0 graphemer: 1.4.0 ignore: 5.3.1 @@ -7156,8 +7265,8 @@ packages: - supports-color dev: false - /@typescript-eslint/parser@7.15.0(eslint@9.6.0)(typescript@5.5.3): - resolution: {integrity: sha512-k9fYuQNnypLFcqORNClRykkGOMOj+pV6V91R4GO/l1FDGwpqmSwoOQrOHo3cGaH63e+D3ZiCAOsuS/D2c99j/A==} + /@typescript-eslint/parser@7.16.0(eslint@9.6.0)(typescript@5.5.3): + resolution: {integrity: sha512-ar9E+k7CU8rWi2e5ErzQiC93KKEFAXA2Kky0scAlPcxYblLt8+XZuHUZwlyfXILyQa95P6lQg+eZgh/dDs3+Vw==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -7166,10 +7275,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 7.15.0 - '@typescript-eslint/types': 7.15.0 - '@typescript-eslint/typescript-estree': 7.15.0(typescript@5.5.3) - '@typescript-eslint/visitor-keys': 7.15.0 + '@typescript-eslint/scope-manager': 7.16.0 + '@typescript-eslint/types': 7.16.0 + '@typescript-eslint/typescript-estree': 7.16.0(typescript@5.5.3) + '@typescript-eslint/visitor-keys': 7.16.0 debug: 4.3.5(supports-color@5.5.0) eslint: 9.6.0 typescript: 5.5.3 @@ -7177,14 +7286,6 @@ packages: - supports-color dev: false - /@typescript-eslint/scope-manager@7.15.0: - resolution: {integrity: sha512-Q/1yrF/XbxOTvttNVPihxh1b9fxamjEoz2Os/Pe38OHwxC24CyCqXxGTOdpb4lt6HYtqw9HetA/Rf6gDGaMPlw==} - engines: {node: ^18.18.0 || >=20.0.0} - dependencies: - '@typescript-eslint/types': 7.15.0 - '@typescript-eslint/visitor-keys': 7.15.0 - dev: false - /@typescript-eslint/scope-manager@7.16.0: resolution: {integrity: sha512-8gVv3kW6n01Q6TrI1cmTZ9YMFi3ucDT7i7aI5lEikk2ebk1AEjrwX8MDTdaX5D7fPXMBLvnsaa0IFTAu+jcfOw==} engines: {node: ^18.18.0 || >=20.0.0} @@ -7193,8 +7294,8 @@ packages: '@typescript-eslint/visitor-keys': 7.16.0 dev: false - /@typescript-eslint/type-utils@7.15.0(eslint@9.6.0)(typescript@5.5.3): - resolution: {integrity: sha512-SkgriaeV6PDvpA6253PDVep0qCqgbO1IOBiycjnXsszNTVQe5flN5wR5jiczoEoDEnAqYFSFFc9al9BSGVltkg==} + /@typescript-eslint/type-utils@7.16.0(eslint@9.6.0)(typescript@5.5.3): + resolution: {integrity: sha512-j0fuUswUjDHfqV/UdW6mLtOQQseORqfdmoBNDFOqs9rvNVR2e+cmu6zJu/Ku4SDuqiJko6YnhwcL8x45r8Oqxg==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -7203,8 +7304,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 7.15.0(typescript@5.5.3) - '@typescript-eslint/utils': 7.15.0(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/typescript-estree': 7.16.0(typescript@5.5.3) + '@typescript-eslint/utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) debug: 4.3.5(supports-color@5.5.0) eslint: 9.6.0 ts-api-utils: 1.3.0(typescript@5.5.3) @@ -7213,38 +7314,11 @@ packages: - supports-color dev: false - /@typescript-eslint/types@7.15.0: - resolution: {integrity: sha512-aV1+B1+ySXbQH0pLK0rx66I3IkiZNidYobyfn0WFsdGhSXw+P3YOqeTq5GED458SfB24tg+ux3S+9g118hjlTw==} - engines: {node: ^18.18.0 || >=20.0.0} - dev: false - /@typescript-eslint/types@7.16.0: resolution: {integrity: sha512-fecuH15Y+TzlUutvUl9Cc2XJxqdLr7+93SQIbcZfd4XRGGKoxyljK27b+kxKamjRkU7FYC6RrbSCg0ALcZn/xw==} engines: {node: ^18.18.0 || >=20.0.0} dev: false - /@typescript-eslint/typescript-estree@7.15.0(typescript@5.5.3): - resolution: {integrity: sha512-gjyB/rHAopL/XxfmYThQbXbzRMGhZzGw6KpcMbfe8Q3nNQKStpxnUKeXb0KiN/fFDR42Z43szs6rY7eHk0zdGQ==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 7.15.0 - '@typescript-eslint/visitor-keys': 7.15.0 - debug: 4.3.5(supports-color@5.5.0) - globby: 11.1.0 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.2 - ts-api-utils: 1.3.0(typescript@5.5.3) - typescript: 5.5.3 - transitivePeerDependencies: - - supports-color - dev: false - /@typescript-eslint/typescript-estree@7.16.0(typescript@5.5.3): resolution: {integrity: sha512-a5NTvk51ZndFuOLCh5OaJBELYc2O3Zqxfl3Js78VFE1zE46J2AaVuW+rEbVkQznjkmlzWsUI15BG5tQMixzZLw==} engines: {node: ^18.18.0 || >=20.0.0} @@ -7267,22 +7341,6 @@ packages: - supports-color dev: false - /@typescript-eslint/utils@7.15.0(eslint@9.6.0)(typescript@5.5.3): - resolution: {integrity: sha512-hfDMDqaqOqsUVGiEPSMLR/AjTSCsmJwjpKkYQRo1FNbmW4tBwBspYDwO9eh7sKSTwMQgBw9/T4DHudPaqshRWA==} - engines: {node: ^18.18.0 || >=20.0.0} - peerDependencies: - eslint: ^8.56.0 - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.6.0) - '@typescript-eslint/scope-manager': 7.15.0 - '@typescript-eslint/types': 7.15.0 - '@typescript-eslint/typescript-estree': 7.15.0(typescript@5.5.3) - eslint: 9.6.0 - transitivePeerDependencies: - - supports-color - - typescript - dev: false - /@typescript-eslint/utils@7.16.0(eslint@9.6.0)(typescript@5.5.3): resolution: {integrity: sha512-PqP4kP3hb4r7Jav+NiRCntlVzhxBNWq6ZQ+zQwII1y/G/1gdIPeYDCKr2+dH6049yJQsWZiHU6RlwvIFBXXGNA==} engines: {node: ^18.18.0 || >=20.0.0} @@ -7299,14 +7357,6 @@ packages: - typescript dev: false - /@typescript-eslint/visitor-keys@7.15.0: - resolution: {integrity: sha512-Hqgy/ETgpt2L5xueA/zHHIl4fJI2O4XUE9l4+OIfbJIRSnTJb/QscncdqqZzofQegIJugRIF57OJea1khw2SDw==} - engines: {node: ^18.18.0 || >=20.0.0} - dependencies: - '@typescript-eslint/types': 7.15.0 - eslint-visitor-keys: 3.4.3 - dev: false - /@typescript-eslint/visitor-keys@7.16.0: resolution: {integrity: sha512-rMo01uPy9C7XxG7AFsxa8zLnWXTF8N3PYclekWSrurvhwiw1eW88mrKiAYe6s53AUY57nTRz8dJsuuXdkAhzCg==} engines: {node: ^18.18.0 || >=20.0.0} @@ -7629,18 +7679,6 @@ packages: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} - /array.prototype.findlast@1.2.5: - resolution: {integrity: sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-errors: 1.3.0 - es-object-atoms: 1.0.0 - es-shim-unscopables: 1.0.2 - dev: false - /array.prototype.flat@1.3.2: resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} engines: {node: '>= 0.4'} @@ -7661,26 +7699,6 @@ packages: es-shim-unscopables: 1.0.2 dev: false - /array.prototype.toreversed@1.1.2: - resolution: {integrity: sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA==} - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-shim-unscopables: 1.0.2 - dev: false - - /array.prototype.tosorted@1.1.4: - resolution: {integrity: sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-errors: 1.3.0 - es-shim-unscopables: 1.0.2 - dev: false - /arraybuffer.prototype.slice@1.0.3: resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} engines: {node: '>= 0.4'} @@ -8981,13 +8999,6 @@ packages: hasBin: true dev: false - /doctrine@2.1.0: - resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} - engines: {node: '>=0.10.0'} - dependencies: - esutils: 2.0.3 - dev: false - /doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} engines: {node: '>=6.0.0'} @@ -9600,8 +9611,8 @@ packages: - supports-color dev: false - /eslint-plugin-import-x@0.5.3(eslint@9.6.0)(typescript@5.5.3): - resolution: {integrity: sha512-hJ/wkMcsLQXAZL3+txXIDpbW5cqwdm1rLTqV4VRY03aIbzE3zWE7rPZKW6Gzf7xyl1u3V1iYC6tOG77d9NF4GQ==} + /eslint-plugin-import-x@3.0.0(eslint@9.6.0)(typescript@5.5.3): + resolution: {integrity: sha512-zk3QklFELk7mrSlhP9C27NpKx86G5YtIEvDV1dIJRS3VOIm5tCHQCln2JkwbO5lpYOvyYSoro35PCAAVG9lY8w==} engines: {node: '>=16'} peerDependencies: eslint: ^8.56.0 || ^9.0.0-0 @@ -9724,8 +9735,88 @@ packages: globals: 13.24.0 dev: true - /eslint-plugin-react-hooks@5.1.0-rc-f38c22b244-20240704(eslint@9.6.0): - resolution: {integrity: sha512-2AFn/7KOJFx6RGA+7d8VluRqhB31bay0binwDJZeYJCdvrNeDQS3SmKv1/7SExyexEHBZZE/0hy6P6IQIaIZkg==} + /eslint-plugin-react-debug@1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3): + resolution: {integrity: sha512-xdv36T0Fyh1mlLrE8k+Mw+6wq/YTowuI45lGqKySKQEuQ1IhNu/LmBpf9K/OW9FU7tOPaTvK4RYl+QBT0zuJHg==} + engines: {bun: '>=1.0.15', node: '>=18.18.0'} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: 5.5.3 + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-react/ast': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/core': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/jsx': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/shared': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/tools': 1.5.25-next.4 + '@eslint-react/types': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/scope-manager': 7.16.0 + '@typescript-eslint/type-utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/types': 7.16.0 + '@typescript-eslint/utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + eslint: 9.6.0 + string-ts: 2.2.0 + typescript: 5.5.3 + transitivePeerDependencies: + - supports-color + dev: false + + /eslint-plugin-react-dom@1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3): + resolution: {integrity: sha512-Lejg6y1YUPHTD1v4uag/n+iaHCeKSmATgTDT/EE4X0mmfSskh4a6hr2zYQdI57kMO6baWJ20l4nenipRwt+aLQ==} + engines: {bun: '>=1.0.15', node: '>=18.18.0'} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: 5.5.3 + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-react/ast': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/core': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/jsx': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/shared': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/tools': 1.5.25-next.4 + '@eslint-react/types': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/var': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/scope-manager': 7.16.0 + '@typescript-eslint/types': 7.16.0 + '@typescript-eslint/utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + eslint: 9.6.0 + typescript: 5.5.3 + transitivePeerDependencies: + - supports-color + dev: false + + /eslint-plugin-react-hooks-extra@1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3): + resolution: {integrity: sha512-HTS/MYSR/XXyqTamZQ2X/qUtmNctUhP0FeNrCW35scHGV2wB9FmlESo3YKmF50nYrJEJU/IMnhVlbzVAuK5R/Q==} + engines: {bun: '>=1.0.15', node: '>=18.18.0'} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: 5.5.3 + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-react/ast': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/core': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/jsx': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/shared': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/tools': 1.5.25-next.4 + '@eslint-react/types': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/var': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/scope-manager': 7.16.0 + '@typescript-eslint/type-utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/types': 7.16.0 + '@typescript-eslint/utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + eslint: 9.6.0 + typescript: 5.5.3 + transitivePeerDependencies: + - supports-color + dev: false + + /eslint-plugin-react-hooks@5.1.0-rc-85acf2d195-20240711(eslint@9.6.0): + resolution: {integrity: sha512-akG0N/HBM7XOIMbHLjSev2vV7ch2L+alWT3bdQ3sRzmXH6czIPRcDoS3ejowNxwE7TRAzNdQHPs0G4R5aDOVRw==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 @@ -9733,31 +9824,58 @@ packages: eslint: 9.6.0 dev: false - /eslint-plugin-react@7.34.3(eslint@9.6.0): - resolution: {integrity: sha512-aoW4MV891jkUulwDApQbPYTVZmeuSyFrudpbTAQuj5Fv8VL+o6df2xIGpw8B0hPjAaih1/Fb0om9grCdyFYemA==} - engines: {node: '>=4'} + /eslint-plugin-react-naming-convention@1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3): + resolution: {integrity: sha512-3NSX/dPftjAw8Y/j6udilCgkV8caKlwIG0VIJzMytGVs/7rfsnG4sx0i0eKH/GL83oQtbGEg8dvDeIfTEnEMDA==} + engines: {bun: '>=1.0.15', node: '>=18.18.0'} peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + eslint: ^8.57.0 || ^9.0.0 + typescript: 5.5.3 + peerDependenciesMeta: + typescript: + optional: true dependencies: - array-includes: 3.1.8 - array.prototype.findlast: 1.2.5 - array.prototype.flatmap: 1.3.2 - array.prototype.toreversed: 1.1.2 - array.prototype.tosorted: 1.1.4 - doctrine: 2.1.0 - es-iterator-helpers: 1.0.19 + '@eslint-react/ast': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/core': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/jsx': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/shared': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/tools': 1.5.25-next.4 + '@eslint-react/types': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/scope-manager': 7.16.0 + '@typescript-eslint/type-utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/types': 7.16.0 + '@typescript-eslint/utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) eslint: 9.6.0 - estraverse: 5.3.0 - jsx-ast-utils: 3.3.5 - minimatch: 3.1.2 - object.entries: 1.1.8 - object.fromentries: 2.0.8 - object.hasown: 1.1.4 - object.values: 1.2.0 - prop-types: 15.8.1 - resolve: 2.0.0-next.5 - semver: 6.3.1 - string.prototype.matchall: 4.0.11 + typescript: 5.5.3 + transitivePeerDependencies: + - supports-color + dev: false + + /eslint-plugin-react-x@1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3): + resolution: {integrity: sha512-sQl/YScM/xOwawSmWzKKOHuhq3qHQoDCIO04wflHZ0s0ullVwIYEJfI8j/RSjy3l6TUh5IeAttsiEUFXob7LmA==} + engines: {bun: '>=1.0.15', node: '>=18.18.0'} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: 5.5.3 + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-react/ast': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/core': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/jsx': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/shared': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/tools': 1.5.25-next.4 + '@eslint-react/types': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@eslint-react/var': 1.5.25-next.4(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/scope-manager': 7.16.0 + '@typescript-eslint/type-utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/types': 7.16.0 + '@typescript-eslint/utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + eslint: 9.6.0 + is-immutable-type: 4.0.0(eslint@9.6.0)(typescript@5.5.3) + typescript: 5.5.3 + transitivePeerDependencies: + - supports-color dev: false /eslint-plugin-regexp@2.6.0(eslint@9.6.0): @@ -11208,6 +11326,21 @@ packages: resolution: {integrity: sha512-UknnZK4RakDmTgz4PI1wIph5yxSs/mvChWs9ifnlXsKuXgWmOkY/hAE0H/k2MIqH0RlRye0i1oC07MCRSD28Mw==} dev: false + /is-immutable-type@4.0.0(eslint@9.6.0)(typescript@5.5.3): + resolution: {integrity: sha512-gyFBCXv+NikTs8/PGZhgjbMmFZQ5jvHGZIsVu6+/9Bk4K7imlWBIDN7hTr9fNioGzFg71I4YM3z8f0aKXarTAw==} + peerDependencies: + eslint: '*' + typescript: 5.5.3 + dependencies: + '@typescript-eslint/type-utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + eslint: 9.6.0 + ts-api-utils: 1.3.0(typescript@5.5.3) + ts-declaration-location: 1.0.2(typescript@5.5.3) + typescript: 5.5.3 + transitivePeerDependencies: + - supports-color + dev: false + /is-inside-container@1.0.0: resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} engines: {node: '>=14.16'} @@ -13033,15 +13166,6 @@ packages: object-keys: 1.1.1 dev: false - /object.entries@1.1.8: - resolution: {integrity: sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-object-atoms: 1.0.0 - dev: false - /object.fromentries@2.0.8: resolution: {integrity: sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==} engines: {node: '>= 0.4'} @@ -13052,15 +13176,6 @@ packages: es-object-atoms: 1.0.0 dev: false - /object.hasown@1.1.4: - resolution: {integrity: sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg==} - engines: {node: '>= 0.4'} - dependencies: - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-object-atoms: 1.0.0 - dev: false - /object.values@1.2.0: resolution: {integrity: sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==} engines: {node: '>= 0.4'} @@ -14154,15 +14269,6 @@ packages: path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - /resolve@2.0.0-next.5: - resolution: {integrity: sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==} - hasBin: true - dependencies: - is-core-module: 2.14.0 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - dev: false - /responselike@2.0.1: resolution: {integrity: sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==} dependencies: @@ -15002,6 +15108,10 @@ packages: char-regex: 1.0.2 strip-ansi: 6.0.1 + /string-ts@2.2.0: + resolution: {integrity: sha512-VTP0LLZo4Jp9Gz5IiDVMS9WyLx/3IeYh0PXUn0NdPqusUFNgkHPWiEdbB9TU2Iv3myUskraD5WtYEdHUrQEIlQ==} + dev: false + /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -15034,24 +15144,6 @@ packages: es-abstract: 1.23.3 dev: false - /string.prototype.matchall@4.0.11: - resolution: {integrity: sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-errors: 1.3.0 - es-object-atoms: 1.0.0 - get-intrinsic: 1.2.4 - gopd: 1.0.1 - has-symbols: 1.0.3 - internal-slot: 1.0.7 - regexp.prototype.flags: 1.5.2 - set-function-name: 2.0.2 - side-channel: 1.0.6 - dev: false - /string.prototype.trim@1.2.9: resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==} engines: {node: '>= 0.4'} @@ -15476,6 +15568,15 @@ packages: typescript: 5.5.3 dev: false + /ts-declaration-location@1.0.2(typescript@5.5.3): + resolution: {integrity: sha512-F7+4QiD/WguzLqviTNu+4tgR5SJtW4orC9RDCYzkwbeyHNq7hfGpq4Y8odaf0w9Z6orH+y98jgUdVaUFOPNRhg==} + peerDependencies: + typescript: 5.5.3 + dependencies: + minimatch: 9.0.5 + typescript: 5.5.3 + dev: false + /ts-essentials@7.0.3(typescript@5.5.3): resolution: {integrity: sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ==} peerDependencies: @@ -15706,8 +15807,8 @@ packages: dependencies: csstype: 3.1.3 - /typescript-eslint@7.15.0(eslint@9.6.0)(typescript@5.5.3): - resolution: {integrity: sha512-Ta40FhMXBCwHura4X4fncaCVkVcnJ9jnOq5+Lp4lN8F4DzHZtOwZdRvVBiNUGznUDHPwdGnrnwxmUOU2fFQqFA==} + /typescript-eslint@7.16.0(eslint@9.6.0)(typescript@5.5.3): + resolution: {integrity: sha512-kaVRivQjOzuoCXU6+hLnjo3/baxyzWVO5GrnExkFzETRYJKVHYkrJglOu2OCm8Hi9RPDWX1PTNNTpU5KRV0+RA==} engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 @@ -15716,9 +15817,9 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 7.15.0(@typescript-eslint/parser@7.15.0)(eslint@9.6.0)(typescript@5.5.3) - '@typescript-eslint/parser': 7.15.0(eslint@9.6.0)(typescript@5.5.3) - '@typescript-eslint/utils': 7.15.0(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/eslint-plugin': 7.16.0(@typescript-eslint/parser@7.16.0)(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/parser': 7.16.0(eslint@9.6.0)(typescript@5.5.3) + '@typescript-eslint/utils': 7.16.0(eslint@9.6.0)(typescript@5.5.3) eslint: 9.6.0 typescript: 5.5.3 transitivePeerDependencies: @@ -15928,6 +16029,10 @@ packages: '@types/istanbul-lib-coverage': 2.0.6 convert-source-map: 2.0.0 + /valibot@0.36.0: + resolution: {integrity: sha512-CjF1XN4sUce8sBK9TixrDqFM7RwNkuXdJu174/AwmQUB62QbCQADg5lLe8ldBalFgtj1uKj+pKwDJiNo4Mn+eQ==} + dev: false + /varint@6.0.0: resolution: {integrity: sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==} dev: true