From 3db97212e45e18b0cd21c7ec15d072a0661a0e44 Mon Sep 17 00:00:00 2001 From: Reid Barber Date: Mon, 15 Jun 2026 10:56:28 -0500 Subject: [PATCH 1/6] update oxlint to 1.70.0 and enable react/react-compiler --- .oxlintrc.json | 18 +---- package.json | 3 +- yarn.lock | 215 +++++++++++++++++++------------------------------ 3 files changed, 87 insertions(+), 149 deletions(-) diff --git a/.oxlintrc.json b/.oxlintrc.json index 3fd5d986cac..c290fdafef1 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -6,10 +6,6 @@ { "name": "monorepo", "specifier": "@jdb8/eslint-plugin-monorepo" - }, - { - "name": "react-hooks-js", - "specifier": "eslint-plugin-react-hooks" } ], "categories": { @@ -169,19 +165,7 @@ "react/rules-of-hooks": "error", "react/exhaustive-deps": "warn", - // React Compiler rules - "react-hooks-js/config": "error", - "react-hooks-js/error-boundaries": "error", - "react-hooks-js/component-hook-factories": "error", - "react-hooks-js/gating": "error", - "react-hooks-js/globals": "error", - "react-hooks-js/purity": "error", - "react-hooks-js/set-state-in-effect": "warn", - "react-hooks-js/set-state-in-render": "error", - "react-hooks-js/static-components": "error", - "react-hooks-js/unsupported-syntax": "warn", - "react-hooks-js/use-memo": "error", - "react-hooks-js/incompatible-library": "warn", + "react/react-compiler": "error", "rsp-rules/no-react-key": ["error"], "rsp-rules/sort-imports": ["error"], diff --git a/package.json b/package.json index 792f717e23a..e30bdda9f25 100644 --- a/package.json +++ b/package.json @@ -153,7 +153,6 @@ "diff": "^5.1.0", "eslint-import-resolver-node": "^0.3.10", "eslint-plugin-jest": "29.15.2", - "eslint-plugin-react-hooks": "^7.0.0", "exceljs": "^4.4.0", "fast-check": "^2.19.0", "fast-glob": "^3.1.0", @@ -175,7 +174,7 @@ "motion": "^12.23.6", "npm-cli-login": "^1.0.0", "oxfmt": "^0.48.0", - "oxlint": "^1.63.0", + "oxlint": "^1.70.0", "parcel": "^2.16.3", "parcel-optimizer-strict-mode": "workspace:^", "patch-package": "^6.2.0", diff --git a/yarn.lock b/yarn.lock index 56aa899f231..b64124f4958 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4847,135 +4847,135 @@ __metadata: languageName: node linkType: hard -"@oxlint/binding-android-arm-eabi@npm:1.63.0": - version: 1.63.0 - resolution: "@oxlint/binding-android-arm-eabi@npm:1.63.0" +"@oxlint/binding-android-arm-eabi@npm:1.70.0": + version: 1.70.0 + resolution: "@oxlint/binding-android-arm-eabi@npm:1.70.0" conditions: os=android & cpu=arm languageName: node linkType: hard -"@oxlint/binding-android-arm64@npm:1.63.0": - version: 1.63.0 - resolution: "@oxlint/binding-android-arm64@npm:1.63.0" +"@oxlint/binding-android-arm64@npm:1.70.0": + version: 1.70.0 + resolution: "@oxlint/binding-android-arm64@npm:1.70.0" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@oxlint/binding-darwin-arm64@npm:1.63.0": - version: 1.63.0 - resolution: "@oxlint/binding-darwin-arm64@npm:1.63.0" +"@oxlint/binding-darwin-arm64@npm:1.70.0": + version: 1.70.0 + resolution: "@oxlint/binding-darwin-arm64@npm:1.70.0" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@oxlint/binding-darwin-x64@npm:1.63.0": - version: 1.63.0 - resolution: "@oxlint/binding-darwin-x64@npm:1.63.0" +"@oxlint/binding-darwin-x64@npm:1.70.0": + version: 1.70.0 + resolution: "@oxlint/binding-darwin-x64@npm:1.70.0" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@oxlint/binding-freebsd-x64@npm:1.63.0": - version: 1.63.0 - resolution: "@oxlint/binding-freebsd-x64@npm:1.63.0" +"@oxlint/binding-freebsd-x64@npm:1.70.0": + version: 1.70.0 + resolution: "@oxlint/binding-freebsd-x64@npm:1.70.0" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@oxlint/binding-linux-arm-gnueabihf@npm:1.63.0": - version: 1.63.0 - resolution: "@oxlint/binding-linux-arm-gnueabihf@npm:1.63.0" +"@oxlint/binding-linux-arm-gnueabihf@npm:1.70.0": + version: 1.70.0 + resolution: "@oxlint/binding-linux-arm-gnueabihf@npm:1.70.0" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@oxlint/binding-linux-arm-musleabihf@npm:1.63.0": - version: 1.63.0 - resolution: "@oxlint/binding-linux-arm-musleabihf@npm:1.63.0" +"@oxlint/binding-linux-arm-musleabihf@npm:1.70.0": + version: 1.70.0 + resolution: "@oxlint/binding-linux-arm-musleabihf@npm:1.70.0" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@oxlint/binding-linux-arm64-gnu@npm:1.63.0": - version: 1.63.0 - resolution: "@oxlint/binding-linux-arm64-gnu@npm:1.63.0" +"@oxlint/binding-linux-arm64-gnu@npm:1.70.0": + version: 1.70.0 + resolution: "@oxlint/binding-linux-arm64-gnu@npm:1.70.0" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@oxlint/binding-linux-arm64-musl@npm:1.63.0": - version: 1.63.0 - resolution: "@oxlint/binding-linux-arm64-musl@npm:1.63.0" +"@oxlint/binding-linux-arm64-musl@npm:1.70.0": + version: 1.70.0 + resolution: "@oxlint/binding-linux-arm64-musl@npm:1.70.0" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@oxlint/binding-linux-ppc64-gnu@npm:1.63.0": - version: 1.63.0 - resolution: "@oxlint/binding-linux-ppc64-gnu@npm:1.63.0" +"@oxlint/binding-linux-ppc64-gnu@npm:1.70.0": + version: 1.70.0 + resolution: "@oxlint/binding-linux-ppc64-gnu@npm:1.70.0" conditions: os=linux & cpu=ppc64 & libc=glibc languageName: node linkType: hard -"@oxlint/binding-linux-riscv64-gnu@npm:1.63.0": - version: 1.63.0 - resolution: "@oxlint/binding-linux-riscv64-gnu@npm:1.63.0" +"@oxlint/binding-linux-riscv64-gnu@npm:1.70.0": + version: 1.70.0 + resolution: "@oxlint/binding-linux-riscv64-gnu@npm:1.70.0" conditions: os=linux & cpu=riscv64 & libc=glibc languageName: node linkType: hard -"@oxlint/binding-linux-riscv64-musl@npm:1.63.0": - version: 1.63.0 - resolution: "@oxlint/binding-linux-riscv64-musl@npm:1.63.0" +"@oxlint/binding-linux-riscv64-musl@npm:1.70.0": + version: 1.70.0 + resolution: "@oxlint/binding-linux-riscv64-musl@npm:1.70.0" conditions: os=linux & cpu=riscv64 & libc=musl languageName: node linkType: hard -"@oxlint/binding-linux-s390x-gnu@npm:1.63.0": - version: 1.63.0 - resolution: "@oxlint/binding-linux-s390x-gnu@npm:1.63.0" +"@oxlint/binding-linux-s390x-gnu@npm:1.70.0": + version: 1.70.0 + resolution: "@oxlint/binding-linux-s390x-gnu@npm:1.70.0" conditions: os=linux & cpu=s390x & libc=glibc languageName: node linkType: hard -"@oxlint/binding-linux-x64-gnu@npm:1.63.0": - version: 1.63.0 - resolution: "@oxlint/binding-linux-x64-gnu@npm:1.63.0" +"@oxlint/binding-linux-x64-gnu@npm:1.70.0": + version: 1.70.0 + resolution: "@oxlint/binding-linux-x64-gnu@npm:1.70.0" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@oxlint/binding-linux-x64-musl@npm:1.63.0": - version: 1.63.0 - resolution: "@oxlint/binding-linux-x64-musl@npm:1.63.0" +"@oxlint/binding-linux-x64-musl@npm:1.70.0": + version: 1.70.0 + resolution: "@oxlint/binding-linux-x64-musl@npm:1.70.0" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@oxlint/binding-openharmony-arm64@npm:1.63.0": - version: 1.63.0 - resolution: "@oxlint/binding-openharmony-arm64@npm:1.63.0" +"@oxlint/binding-openharmony-arm64@npm:1.70.0": + version: 1.70.0 + resolution: "@oxlint/binding-openharmony-arm64@npm:1.70.0" conditions: os=openharmony & cpu=arm64 languageName: node linkType: hard -"@oxlint/binding-win32-arm64-msvc@npm:1.63.0": - version: 1.63.0 - resolution: "@oxlint/binding-win32-arm64-msvc@npm:1.63.0" +"@oxlint/binding-win32-arm64-msvc@npm:1.70.0": + version: 1.70.0 + resolution: "@oxlint/binding-win32-arm64-msvc@npm:1.70.0" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@oxlint/binding-win32-ia32-msvc@npm:1.63.0": - version: 1.63.0 - resolution: "@oxlint/binding-win32-ia32-msvc@npm:1.63.0" +"@oxlint/binding-win32-ia32-msvc@npm:1.70.0": + version: 1.70.0 + resolution: "@oxlint/binding-win32-ia32-msvc@npm:1.70.0" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@oxlint/binding-win32-x64-msvc@npm:1.63.0": - version: 1.63.0 - resolution: "@oxlint/binding-win32-x64-msvc@npm:1.63.0" +"@oxlint/binding-win32-x64-msvc@npm:1.70.0": + version: 1.70.0 + resolution: "@oxlint/binding-win32-x64-msvc@npm:1.70.0" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -16543,21 +16543,6 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react-hooks@npm:^7.0.0": - version: 7.0.0 - resolution: "eslint-plugin-react-hooks@npm:7.0.0" - dependencies: - "@babel/core": "npm:^7.24.4" - "@babel/parser": "npm:^7.24.4" - hermes-parser: "npm:^0.25.1" - zod: "npm:^3.22.4 || ^4.0.0" - zod-validation-error: "npm:^3.0.3 || ^4.0.0" - peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 || ^9.0.0 - checksum: 10c0/911c9efdd9b102ce2eabac247dff8c217ecb8d6972aaf3b7eecfb1cfc293d4d902766355993ff7a37a33c0abde3e76971f43bc1c8ff36d6c123310e5680d0423 - languageName: node - linkType: hard - "eslint-plugin-rsp-rules@workspace:packages/dev/eslint-plugin-rsp-rules": version: 0.0.0-use.local resolution: "eslint-plugin-rsp-rules@workspace:packages/dev/eslint-plugin-rsp-rules" @@ -18888,22 +18873,6 @@ __metadata: languageName: node linkType: hard -"hermes-estree@npm:0.25.1": - version: 0.25.1 - resolution: "hermes-estree@npm:0.25.1" - checksum: 10c0/48be3b2fa37a0cbc77a112a89096fa212f25d06de92781b163d67853d210a8a5c3784fac23d7d48335058f7ed283115c87b4332c2a2abaaccc76d0ead1a282ac - languageName: node - linkType: hard - -"hermes-parser@npm:^0.25.1": - version: 0.25.1 - resolution: "hermes-parser@npm:0.25.1" - dependencies: - hermes-estree: "npm:0.25.1" - checksum: 10c0/3abaa4c6f1bcc25273f267297a89a4904963ea29af19b8e4f6eabe04f1c2c7e9abd7bfc4730ddb1d58f2ea04b6fee74053d8bddb5656ec6ebf6c79cc8d14202c - languageName: node - linkType: hard - "hex-rgb@npm:^4.1.0": version: 4.3.0 resolution: "hex-rgb@npm:4.3.0" @@ -24867,31 +24836,32 @@ __metadata: languageName: node linkType: hard -"oxlint@npm:^1.63.0": - version: 1.63.0 - resolution: "oxlint@npm:1.63.0" - dependencies: - "@oxlint/binding-android-arm-eabi": "npm:1.63.0" - "@oxlint/binding-android-arm64": "npm:1.63.0" - "@oxlint/binding-darwin-arm64": "npm:1.63.0" - "@oxlint/binding-darwin-x64": "npm:1.63.0" - "@oxlint/binding-freebsd-x64": "npm:1.63.0" - "@oxlint/binding-linux-arm-gnueabihf": "npm:1.63.0" - "@oxlint/binding-linux-arm-musleabihf": "npm:1.63.0" - "@oxlint/binding-linux-arm64-gnu": "npm:1.63.0" - "@oxlint/binding-linux-arm64-musl": "npm:1.63.0" - "@oxlint/binding-linux-ppc64-gnu": "npm:1.63.0" - "@oxlint/binding-linux-riscv64-gnu": "npm:1.63.0" - "@oxlint/binding-linux-riscv64-musl": "npm:1.63.0" - "@oxlint/binding-linux-s390x-gnu": "npm:1.63.0" - "@oxlint/binding-linux-x64-gnu": "npm:1.63.0" - "@oxlint/binding-linux-x64-musl": "npm:1.63.0" - "@oxlint/binding-openharmony-arm64": "npm:1.63.0" - "@oxlint/binding-win32-arm64-msvc": "npm:1.63.0" - "@oxlint/binding-win32-ia32-msvc": "npm:1.63.0" - "@oxlint/binding-win32-x64-msvc": "npm:1.63.0" +"oxlint@npm:^1.70.0": + version: 1.70.0 + resolution: "oxlint@npm:1.70.0" + dependencies: + "@oxlint/binding-android-arm-eabi": "npm:1.70.0" + "@oxlint/binding-android-arm64": "npm:1.70.0" + "@oxlint/binding-darwin-arm64": "npm:1.70.0" + "@oxlint/binding-darwin-x64": "npm:1.70.0" + "@oxlint/binding-freebsd-x64": "npm:1.70.0" + "@oxlint/binding-linux-arm-gnueabihf": "npm:1.70.0" + "@oxlint/binding-linux-arm-musleabihf": "npm:1.70.0" + "@oxlint/binding-linux-arm64-gnu": "npm:1.70.0" + "@oxlint/binding-linux-arm64-musl": "npm:1.70.0" + "@oxlint/binding-linux-ppc64-gnu": "npm:1.70.0" + "@oxlint/binding-linux-riscv64-gnu": "npm:1.70.0" + "@oxlint/binding-linux-riscv64-musl": "npm:1.70.0" + "@oxlint/binding-linux-s390x-gnu": "npm:1.70.0" + "@oxlint/binding-linux-x64-gnu": "npm:1.70.0" + "@oxlint/binding-linux-x64-musl": "npm:1.70.0" + "@oxlint/binding-openharmony-arm64": "npm:1.70.0" + "@oxlint/binding-win32-arm64-msvc": "npm:1.70.0" + "@oxlint/binding-win32-ia32-msvc": "npm:1.70.0" + "@oxlint/binding-win32-x64-msvc": "npm:1.70.0" peerDependencies: oxlint-tsgolint: ">=0.22.1" + vite-plus: "*" dependenciesMeta: "@oxlint/binding-android-arm-eabi": optional: true @@ -24934,9 +24904,11 @@ __metadata: peerDependenciesMeta: oxlint-tsgolint: optional: true + vite-plus: + optional: true bin: oxlint: bin/oxlint - checksum: 10c0/ca3e0c36eb02be68494b900cf34242a4d5917a2f63e0bf7833aa017223f9768fa053228483dcb0b86eb077641e60b7c2e5960a3f5d0fa03145b4ee29748b44c6 + checksum: 10c0/e28c359a26a739f30e07eb259a6de116bb0b931f3915e00f0ce20c71b594af629fb2a22c501e21690141ce9ac3045fb33ffca26cd0c321d7a34b8b07904bb133 languageName: node linkType: hard @@ -26627,7 +26599,6 @@ __metadata: diff: "npm:^5.1.0" eslint-import-resolver-node: "npm:^0.3.10" eslint-plugin-jest: "npm:29.15.2" - eslint-plugin-react-hooks: "npm:^7.0.0" exceljs: "npm:^4.4.0" fast-check: "npm:^2.19.0" fast-glob: "npm:^3.1.0" @@ -26649,7 +26620,7 @@ __metadata: motion: "npm:^12.23.6" npm-cli-login: "npm:^1.0.0" oxfmt: "npm:^0.48.0" - oxlint: "npm:^1.63.0" + oxlint: "npm:^1.70.0" parcel: "npm:^2.16.3" parcel-optimizer-strict-mode: "workspace:^" patch-package: "npm:^6.2.0" @@ -32335,22 +32306,6 @@ __metadata: languageName: node linkType: hard -"zod-validation-error@npm:^3.0.3 || ^4.0.0": - version: 4.0.2 - resolution: "zod-validation-error@npm:4.0.2" - peerDependencies: - zod: ^3.25.0 || ^4.0.0 - checksum: 10c0/0ccfec48c46de1be440b719cd02044d4abb89ed0e14c13e637cd55bf29102f67ccdba373f25def0fc7130e5f15025be4d557a7edcc95d5a3811599aade689e1b - languageName: node - linkType: hard - -"zod@npm:^3.22.4 || ^4.0.0": - version: 4.1.12 - resolution: "zod@npm:4.1.12" - checksum: 10c0/b64c1feb19e99d77075261eaf613e0b2be4dfcd3551eff65ad8b4f2a079b61e379854d066f7d447491fcf193f45babd8095551a9d47973d30b46b6d8e2c46774 - languageName: node - linkType: hard - "zod@npm:^3.23.8": version: 3.25.76 resolution: "zod@npm:3.25.76" From d6f37deda60e47f2c636d21b906ac1ed57b1815e Mon Sep 17 00:00:00 2001 From: Reid Barber Date: Mon, 15 Jun 2026 11:04:33 -0500 Subject: [PATCH 2/6] suppress existing warnings/errors --- .../chromatic/provider/Provider.stories.tsx | 4 + .../src/actiongroup/ActionGroup.tsx | 4 + .../autocomplete/MobileSearchAutocomplete.tsx | 6 ++ .../src/autocomplete/SearchAutocomplete.tsx | 1 + .../react-spectrum/src/button/Button.tsx | 1 + .../react-spectrum/src/button/ClearButton.tsx | 1 + .../src/buttongroup/ButtonGroup.tsx | 6 +- .../react-spectrum/src/card/CardBase.tsx | 1 + .../react-spectrum/src/card/CardView.tsx | 3 + .../react-spectrum/src/checkbox/Checkbox.tsx | 2 + .../react-spectrum/src/color/ColorField.tsx | 1 + .../react-spectrum/src/color/ColorPicker.tsx | 1 + .../react-spectrum/src/color/ColorSwatch.tsx | 1 + .../src/color/ColorSwatchPicker.tsx | 1 + .../react-spectrum/src/color/ColorWheel.tsx | 1 + .../react-spectrum/src/combobox/ComboBox.tsx | 1 + .../src/combobox/MobileComboBox.tsx | 8 ++ .../src/datepicker/DateField.tsx | 1 + .../src/datepicker/DatePicker.tsx | 1 + .../src/datepicker/DateRangePicker.tsx | 1 + .../react-spectrum/src/dialog/Dialog.tsx | 5 ++ .../react-spectrum/src/dnd/useDragAndDrop.ts | 7 ++ .../@adobe/react-spectrum/src/icon/Icon.tsx | 1 + .../@adobe/react-spectrum/src/icon/UIIcon.tsx | 1 + .../@adobe/react-spectrum/src/label/Field.tsx | 1 + .../@adobe/react-spectrum/src/layout/Grid.tsx | 1 + .../@adobe/react-spectrum/src/link/Link.tsx | 3 + .../src/list/InsertionIndicator.tsx | 1 + .../react-spectrum/src/list/ListView.tsx | 5 ++ .../react-spectrum/src/list/ListViewItem.tsx | 2 + .../src/list/RootDropIndicator.tsx | 1 + .../src/menu/ContextualHelpTrigger.tsx | 6 ++ .../react-spectrum/src/menu/MenuItem.tsx | 2 + .../react-spectrum/src/menu/MenuTrigger.tsx | 1 + .../src/menu/SubmenuTrigger.tsx | 5 ++ .../react-spectrum/src/slider/Slider.tsx | 2 + .../src/table/InsertionIndicator.tsx | 1 + .../src/table/RootDropIndicator.tsx | 1 + .../src/table/TableViewBase.tsx | 8 ++ .../src/table/TreeGridTableView.tsx | 1 + .../@adobe/react-spectrum/src/tabs/Tabs.tsx | 2 + .../react-spectrum/src/tag/TagGroup.tsx | 2 + .../react-spectrum/src/textfield/TextArea.tsx | 2 + .../src/textfield/TextField.tsx | 1 + .../src/textfield/TextFieldBase.tsx | 1 + .../@adobe/react-spectrum/src/utils/Slots.tsx | 1 + .../stories/card/GalleryCardView.stories.tsx | 1 + .../card/WaterfallCardView.stories.tsx | 1 + .../stories/combobox/ComboBox.stories.tsx | 1 + .../stories/form/Form.stories.tsx | 4 + .../stories/list/ListView.stories.tsx | 2 + .../stories/provider/Provider.stories.tsx | 4 + .../stories/table/ControllingResize.tsx | 1 + .../stories/toast/Toast.stories.tsx | 2 + .../@react-spectrum/ai/src/AttachmentList.tsx | 2 + .../@react-spectrum/ai/src/HorizontalCard.tsx | 2 + .../ai/src/MessageSuggestion.tsx | 2 + .../@react-spectrum/s2/src/ActionButton.tsx | 2 + packages/@react-spectrum/s2/src/Button.tsx | 7 ++ .../@react-spectrum/s2/src/ButtonGroup.tsx | 6 +- packages/@react-spectrum/s2/src/Calendar.tsx | 2 + packages/@react-spectrum/s2/src/Card.tsx | 4 + .../@react-spectrum/s2/src/CheckboxGroup.tsx | 1 + .../@react-spectrum/s2/src/ClearButton.tsx | 2 + .../@react-spectrum/s2/src/CloseButton.tsx | 3 + packages/@react-spectrum/s2/src/CoachMark.tsx | 2 + .../@react-spectrum/s2/src/ColorField.tsx | 1 + .../@react-spectrum/s2/src/ColorSlider.tsx | 1 + .../@react-spectrum/s2/src/ColorSwatch.tsx | 1 + .../s2/src/ColorSwatchPicker.tsx | 1 + packages/@react-spectrum/s2/src/ComboBox.tsx | 3 + .../@react-spectrum/s2/src/ContextualHelp.tsx | 1 + .../@react-spectrum/s2/src/DatePicker.tsx | 2 + packages/@react-spectrum/s2/src/DropZone.tsx | 1 + packages/@react-spectrum/s2/src/Form.tsx | 2 + packages/@react-spectrum/s2/src/Menu.tsx | 2 + packages/@react-spectrum/s2/src/Modal.tsx | 1 + .../@react-spectrum/s2/src/NumberField.tsx | 1 + packages/@react-spectrum/s2/src/Picker.tsx | 2 + .../@react-spectrum/s2/src/ProgressBar.tsx | 1 + .../@react-spectrum/s2/src/ProgressCircle.tsx | 1 + .../@react-spectrum/s2/src/RadioGroup.tsx | 1 + .../@react-spectrum/s2/src/RangeSlider.tsx | 1 + .../@react-spectrum/s2/src/SearchField.tsx | 1 + .../s2/src/SegmentedControl.tsx | 1 + .../@react-spectrum/s2/src/SelectBoxGroup.tsx | 2 + packages/@react-spectrum/s2/src/Slider.tsx | 4 + packages/@react-spectrum/s2/src/Switch.tsx | 1 + packages/@react-spectrum/s2/src/TableView.tsx | 3 + packages/@react-spectrum/s2/src/Tabs.tsx | 1 + .../@react-spectrum/s2/src/TabsPicker.tsx | 2 + packages/@react-spectrum/s2/src/TextField.tsx | 1 + .../@react-spectrum/s2/src/ToggleButton.tsx | 3 + packages/@react-spectrum/s2/src/Tooltip.tsx | 1 + .../s2/stories/CardView.stories.tsx | 3 + .../s2/stories/TableView.stories.tsx | 2 + .../s2/test/TreeView.browser.test.tsx | 1 + .../dev/docs/pages/react-aria/home/Styles.tsx | 2 + packages/dev/docs/src/types.js | 2 + packages/dev/s2-docs/src/CodePlatter.tsx | 1 + packages/dev/s2-docs/src/ColorSearchView.tsx | 2 + packages/dev/s2-docs/src/DisclosureRow.tsx | 1 + packages/dev/s2-docs/src/Header.tsx | 1 + packages/dev/s2-docs/src/IconPicker.tsx | 2 + packages/dev/s2-docs/src/IconSearchView.tsx | 2 + .../dev/s2-docs/src/IllustrationCards.tsx | 2 + packages/dev/s2-docs/src/Link.tsx | 2 + packages/dev/s2-docs/src/MobileHeader.tsx | 1 + packages/dev/s2-docs/src/Nav.tsx | 2 + .../dev/s2-docs/src/TypographySearchView.tsx | 1 + packages/dev/s2-docs/src/types.tsx | 73 ++++++++++++++++++- .../react-aria-components/src/Checkbox.tsx | 2 + .../react-aria-components/src/ComboBox.tsx | 1 + packages/react-aria-components/src/Dialog.tsx | 2 + .../react-aria-components/src/DragAndDrop.tsx | 1 + .../react-aria-components/src/DropZone.tsx | 1 + .../react-aria-components/src/GridList.tsx | 8 ++ .../react-aria-components/src/ListBox.tsx | 8 ++ packages/react-aria-components/src/Menu.tsx | 1 + packages/react-aria-components/src/Modal.tsx | 2 + .../react-aria-components/src/Popover.tsx | 19 +++++ packages/react-aria-components/src/Table.tsx | 12 +++ .../react-aria-components/src/TagGroup.tsx | 1 + .../react-aria-components/src/Tooltip.tsx | 2 + packages/react-aria-components/src/Tree.tsx | 6 ++ .../react-aria-components/src/Virtualizer.tsx | 2 + .../src/useDragAndDrop.tsx | 7 ++ .../stories/Button.stories.tsx | 1 + .../stories/Table.stories.tsx | 1 + .../test/Treeble.test.js | 1 + .../src/actiongroup/useActionGroup.ts | 1 + .../src/autocomplete/useAutocomplete.ts | 1 + .../src/breadcrumbs/useBreadcrumbItem.ts | 2 + packages/react-aria/src/button/useButton.ts | 1 + .../src/button/useToggleButtonGroup.ts | 3 + .../src/calendar/useCalendarCell.ts | 3 + .../src/calendar/useRangeCalendar.ts | 1 + .../src/collections/CollectionBuilder.tsx | 6 ++ .../react-aria/src/collections/Hidden.tsx | 1 + .../src/collections/useCachedChildren.ts | 1 + packages/react-aria/src/color/useColorArea.ts | 3 + .../react-aria/src/color/useColorSlider.ts | 2 + .../react-aria/src/color/useColorWheel.ts | 2 + .../react-aria/src/combobox/useComboBox.ts | 4 +- .../react-aria/src/datepicker/useDateField.ts | 1 + .../src/datepicker/useDatePickerGroup.ts | 2 + .../src/datepicker/useDateSegment.ts | 1 + packages/react-aria/src/dnd/useAutoScroll.ts | 2 + packages/react-aria/src/dnd/useDrag.ts | 1 + .../react-aria/src/dnd/useDraggableItem.ts | 4 + .../src/dnd/useDroppableCollection.ts | 4 + packages/react-aria/src/focus/FocusScope.tsx | 2 + packages/react-aria/src/focus/useFocusRing.ts | 1 + .../react-aria/src/form/useFormValidation.ts | 1 + packages/react-aria/src/grid/useGridCell.ts | 1 + .../src/gridlist/useGridListItem.ts | 1 + .../src/interactions/PressResponder.tsx | 1 + .../react-aria/src/interactions/Pressable.tsx | 1 + .../src/interactions/useFocusable.tsx | 1 + .../react-aria/src/interactions/useHover.ts | 1 + .../react-aria/src/interactions/useMove.ts | 1 + .../react-aria/src/interactions/usePress.ts | 2 + packages/react-aria/src/menu/useMenuItem.ts | 1 + .../react-aria/src/menu/useMenuTrigger.ts | 1 + .../src/numberfield/useNumberField.ts | 2 + .../src/overlays/useOverlayPosition.ts | 6 ++ .../src/searchfield/useSearchField.ts | 1 + packages/react-aria/src/select/useSelect.ts | 2 + .../src/selection/useSelectableCollection.ts | 2 + .../src/selection/useSelectableItem.ts | 11 +++ packages/react-aria/src/slider/useSlider.ts | 1 + .../react-aria/src/slider/useSliderThumb.ts | 1 + .../src/spinbutton/useSpinButton.ts | 2 + packages/react-aria/src/ssr/SSRProvider.tsx | 11 +++ packages/react-aria/src/table/useTable.ts | 3 + packages/react-aria/src/table/useTableCell.ts | 2 + .../src/table/useTableColumnResize.ts | 2 + packages/react-aria/src/table/useTableRow.ts | 2 + .../src/textfield/useFormattedTextField.ts | 1 + .../react-aria/src/toast/useToastRegion.ts | 5 ++ packages/react-aria/src/toggle/useToggle.ts | 1 + packages/react-aria/src/toolbar/useToolbar.ts | 1 + .../src/tooltip/useTooltipTrigger.ts | 1 + packages/react-aria/src/tree/useTree.ts | 1 + packages/react-aria/src/utils/openLink.tsx | 2 + packages/react-aria/src/utils/useDeepMemo.ts | 3 + packages/react-aria/src/utils/useDrag1D.ts | 2 + packages/react-aria/src/utils/useId.ts | 5 ++ packages/react-aria/src/utils/useObjectRef.ts | 2 + packages/react-aria/src/utils/useSyncRef.ts | 2 + .../react-aria/src/virtualizer/ScrollView.tsx | 2 + .../src/visually-hidden/VisuallyHidden.tsx | 1 + .../react-aria/stories/dnd/dnd.stories.tsx | 1 + .../interactions/useFocusRing.stories.tsx | 2 + .../stories/landmark/Landmark.stories.tsx | 1 + .../react-aria/stories/table/example-docs.tsx | 3 + .../stories/table/useTable.stories.tsx | 3 + .../src/combobox/useComboBoxState.ts | 1 + .../react-stately/src/data/useTreeData.ts | 1 + .../src/datepicker/useDateRangePickerState.ts | 1 + .../src/form/useFormValidationState.ts | 1 + .../react-stately/src/grid/useGridState.ts | 2 + .../src/select/useSelectState.ts | 3 + .../src/slider/useSliderState.ts | 1 + .../react-stately/src/table/useTableState.ts | 1 + .../src/virtualizer/useVirtualizerState.ts | 1 + .../stories/tree/useTreeState.stories.tsx | 2 + 207 files changed, 538 insertions(+), 6 deletions(-) diff --git a/packages/@adobe/react-spectrum/chromatic/provider/Provider.stories.tsx b/packages/@adobe/react-spectrum/chromatic/provider/Provider.stories.tsx index 6ed3aa4a157..ace9894d002 100644 --- a/packages/@adobe/react-spectrum/chromatic/provider/Provider.stories.tsx +++ b/packages/@adobe/react-spectrum/chromatic/provider/Provider.stories.tsx @@ -127,6 +127,7 @@ const ResponsiveStyleTemplate = (props: ProviderProps): JSX.Element => ( const CustomResponsivStylePropsTemplate = (props: ProviderProps): JSX.Element => { let Breakpoint = () => { + // oxlint-disable-next-line react/react-compiler let {matchedBreakpoints} = useBreakpoint()!; let breakpoint = matchedBreakpoints[0]; let width = { @@ -149,6 +150,7 @@ const CustomResponsivStylePropsTemplate = (props: ProviderProps): JSX.Element => }; return ( + {/* oxlint-disable-next-line react/react-compiler */} ); @@ -156,6 +158,7 @@ const CustomResponsivStylePropsTemplate = (props: ProviderProps): JSX.Element => const BreakpointOmittedTemplate = (props: ProviderProps): JSX.Element => { let Breakpoint = () => { + // oxlint-disable-next-line react/react-compiler let {matchedBreakpoints} = useBreakpoint()!; let breakpoint = matchedBreakpoints[0]; let width = {base: 'size-1600', S: 'size-2400', L: 'size-3400'}; @@ -170,6 +173,7 @@ const BreakpointOmittedTemplate = (props: ProviderProps): JSX.Element => { }; return ( + {/* oxlint-disable-next-line react/react-compiler */} ); diff --git a/packages/@adobe/react-spectrum/src/actiongroup/ActionGroup.tsx b/packages/@adobe/react-spectrum/src/actiongroup/ActionGroup.tsx index f5c9a9755c4..877afc6e041 100644 --- a/packages/@adobe/react-spectrum/src/actiongroup/ActionGroup.tsx +++ b/packages/@adobe/react-spectrum/src/actiongroup/ActionGroup.tsx @@ -260,6 +260,7 @@ export const ActionGroup = forwardRef(function ActionGroup( return wrapperRef.current?.parentElement; } }), + // oxlint-disable-next-line react/react-compiler [wrapperRef] ); useResizeObserver({ @@ -484,8 +485,11 @@ function ActionGroupMenu({ let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/actiongroup'); // The menu button shouldn't act like an actual action group item. + // oxlint-disable-next-line react/react-compiler delete buttonProps.onPress; + // oxlint-disable-next-line react/react-compiler delete buttonProps.role; + // oxlint-disable-next-line react/react-compiler delete buttonProps['aria-checked']; let {hoverProps, isHovered} = useHover({isDisabled}); diff --git a/packages/@adobe/react-spectrum/src/autocomplete/MobileSearchAutocomplete.tsx b/packages/@adobe/react-spectrum/src/autocomplete/MobileSearchAutocomplete.tsx index a7091a283f6..0a7f20505b3 100644 --- a/packages/@adobe/react-spectrum/src/autocomplete/MobileSearchAutocomplete.tsx +++ b/packages/@adobe/react-spectrum/src/autocomplete/MobileSearchAutocomplete.tsx @@ -63,6 +63,7 @@ function ForwardMobileSearchAutocomplete( props: SpectrumSearchAutocompleteProps, ref: FocusableRef ) { + // oxlint-disable-next-line react/react-compiler props = useProviderProps(props); let { @@ -117,6 +118,7 @@ function ForwardMobileSearchAutocomplete( }); // Focus the button and show focus ring when clicking on the label + // oxlint-disable-next-line react/react-compiler labelProps.onClick = () => { if (!props.isDisabled && buttonRef.current) { buttonRef.current.focus(); @@ -417,8 +419,11 @@ function SearchAutocompleteTray(props: SearchAutocompleteTrayProps) { // VoiceOver on iOS reads "double tap to collapse" when focused on the input rather than // "double tap to edit text", as with a textbox or searchbox. We'd like double tapping to // open the virtual keyboard rather than closing the tray. + // oxlint-disable-next-line react/react-compiler inputProps.role = 'searchbox'; + // oxlint-disable-next-line react/react-compiler inputProps['aria-haspopup'] = 'listbox'; + // oxlint-disable-next-line react/react-compiler delete inputProps.onTouchEnd; let clearButton = ( @@ -486,6 +491,7 @@ function SearchAutocompleteTray(props: SearchAutocompleteTrayProps) { } } else if (loadingState !== 'filtering') { // If loading is no longer happening, clear any timers and hide the loading circle + // oxlint-disable-next-line react/react-compiler setShowLoading(false); if (timeout.current !== null) { clearTimeout(timeout.current); diff --git a/packages/@adobe/react-spectrum/src/autocomplete/SearchAutocomplete.tsx b/packages/@adobe/react-spectrum/src/autocomplete/SearchAutocomplete.tsx index 2332bc16a56..421f7693a0b 100644 --- a/packages/@adobe/react-spectrum/src/autocomplete/SearchAutocomplete.tsx +++ b/packages/@adobe/react-spectrum/src/autocomplete/SearchAutocomplete.tsx @@ -120,6 +120,7 @@ function SearchAutocomplete( props: SpectrumSearchAutocompleteProps, ref: FocusableRef ) { + // oxlint-disable-next-line react/react-compiler props = useProviderProps(props); props = useFormProps(props); diff --git a/packages/@adobe/react-spectrum/src/button/Button.tsx b/packages/@adobe/react-spectrum/src/button/Button.tsx index 2c3ae7da72f..39f6d340c98 100644 --- a/packages/@adobe/react-spectrum/src/button/Button.tsx +++ b/packages/@adobe/react-spectrum/src/button/Button.tsx @@ -120,6 +120,7 @@ export const Button = React.forwardRef(function Button { let computeHasOverflow = () => { if (domRef.current && orientation === 'horizontal') { @@ -86,8 +87,8 @@ export const ButtonGroup = React.forwardRef(function ButtonGroup( yield computeHasOverflow(); }); } - // eslint-disable-next-line react-hooks/exhaustive-deps }, [domRef, orientation, scale, setHasOverflow, children]); + // oxlint-enable react/react-compiler, react-hooks/exhaustive-deps // There are two main reasons we need to remeasure: // 1. Internal changes: Check for initial overflow or when orientation/scale/children change (from checkForOverflow dep array) @@ -97,12 +98,13 @@ export const ButtonGroup = React.forwardRef(function ButtonGroup( // 2. External changes: buttongroup won't change size due to any parents changing size, so listen to its container for size changes to figure out if we should remeasure let parent = useRef(undefined); + // oxlint-disable react/react-compiler, react-hooks/exhaustive-deps useLayoutEffect(() => { if (domRef.current) { parent.current = domRef.current.parentElement as HTMLElement; } - // eslint-disable-next-line react-hooks/exhaustive-deps }, [domRef.current]); + // oxlint-enable react/react-compiler, react-hooks/exhaustive-deps useResizeObserver({ref: parent, onResize: checkForOverflow}); return ( diff --git a/packages/@adobe/react-spectrum/src/card/CardBase.tsx b/packages/@adobe/react-spectrum/src/card/CardBase.tsx index 9ac3f1ff7a5..e79c82496d9 100644 --- a/packages/@adobe/react-spectrum/src/card/CardBase.tsx +++ b/packages/@adobe/react-spectrum/src/card/CardBase.tsx @@ -111,6 +111,7 @@ export const CardBase = React.forwardRef(function CardBase( UNSAFE_className: classNames(styles, 'spectrum-Card-image'), objectFit: orientation === 'horizontal' ? 'cover' : 'contain', alt: '', + // oxlint-disable-next-line react/react-compiler ...aspectRatioEnforce }, illustration: { diff --git a/packages/@adobe/react-spectrum/src/card/CardView.tsx b/packages/@adobe/react-spectrum/src/card/CardView.tsx index d037b4a5c24..0b3a63c4b3a 100644 --- a/packages/@adobe/react-spectrum/src/card/CardView.tsx +++ b/packages/@adobe/react-spectrum/src/card/CardView.tsx @@ -100,7 +100,9 @@ export const CardView = React.forwardRef(function CardView( focusMode: 'cell' }); + // oxlint-disable-next-line react/react-compiler cardViewLayout.collection = gridCollection; + // oxlint-disable-next-line react/react-compiler cardViewLayout.disabledKeys = state.disabledKeys; let {gridProps} = useGrid( @@ -263,6 +265,7 @@ function InternalCard(props) { // We don't want to focus the checkbox (or any other focusable elements) within the Card // when pressing the arrow keys so we delete the key down handler here. Arrow key navigation between // the cards in the CardView is handled by useGrid => useSelectableCollection instead. + // oxlint-disable-next-line react/react-compiler delete gridCellProps.onKeyDownCapture; return (
diff --git a/packages/@adobe/react-spectrum/src/checkbox/Checkbox.tsx b/packages/@adobe/react-spectrum/src/checkbox/Checkbox.tsx index a70606c6ede..f621476656e 100644 --- a/packages/@adobe/react-spectrum/src/checkbox/Checkbox.tsx +++ b/packages/@adobe/react-spectrum/src/checkbox/Checkbox.tsx @@ -69,6 +69,7 @@ export const Checkbox = forwardRef(function Checkbox( let groupState = useContext(CheckboxGroupContext); let {labelProps, inputProps, isInvalid, isDisabled} = groupState ? // eslint-disable-next-line react-hooks/rules-of-hooks + // oxlint-disable-next-line react/react-compiler, react-hooks/rules-of-hooks useCheckboxGroupItem( { ...props, @@ -86,6 +87,7 @@ export const Checkbox = forwardRef(function Checkbox( inputRef ) : // eslint-disable-next-line react-hooks/rules-of-hooks + // oxlint-disable-next-line react/react-compiler, react-hooks/rules-of-hooks useCheckbox(props, useToggleState(props), inputRef); let {hoverProps, isHovered} = useHover({isDisabled}); diff --git a/packages/@adobe/react-spectrum/src/color/ColorField.tsx b/packages/@adobe/react-spectrum/src/color/ColorField.tsx index c67be312688..e83b1cf5ab6 100644 --- a/packages/@adobe/react-spectrum/src/color/ColorField.tsx +++ b/packages/@adobe/react-spectrum/src/color/ColorField.tsx @@ -59,6 +59,7 @@ export const ColorField = React.forwardRef(function ColorField( props: SpectrumColorFieldProps, ref: Ref ) { + // oxlint-disable-next-line react/react-compiler props = useProviderProps(props); props = useFormProps(props); [props] = useContextProps(props, null, ColorFieldContext); diff --git a/packages/@adobe/react-spectrum/src/color/ColorPicker.tsx b/packages/@adobe/react-spectrum/src/color/ColorPicker.tsx index 515c24da863..032b980e4e9 100644 --- a/packages/@adobe/react-spectrum/src/color/ColorPicker.tsx +++ b/packages/@adobe/react-spectrum/src/color/ColorPicker.tsx @@ -56,6 +56,7 @@ export const ColorPicker = React.forwardRef(function ColorPicker( let labelId = useId(); return ( + {/* oxlint-disable-next-line react/react-compiler */}