From 566ff7470e80c386da5ad1e5ce7f1a44f65fb57b Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Mon, 16 Jun 2025 15:20:48 +0800
Subject: [PATCH] chore: bump up oxlint version to v1.1.0 (#12509)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [oxlint](https://oxc.rs)
([source](https://redirect.github.com/oxc-project/oxc/tree/HEAD/npm/oxlint))
| [`0.16.11` ->
`0.18.1`](https://renovatebot.com/diffs/npm/oxlint/0.16.11/0.18.1) |
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
[](https://docs.renovatebot.com/merge-confidence/)
|
---
### Release Notes
oxc-project/oxc (oxlint)
###
[`v0.18.1`](https://redirect.github.com/oxc-project/oxc/releases/tag/oxlint_v0.18.1):
oxlint v0.18.1
[Compare
Source](https://redirect.github.com/oxc-project/oxc/compare/oxlint_v0.18.0...oxlint_v0.18.1)
#### \[0.18.1] - 2025-06-09
##### π Bug Fixes
-
[`6d68568`](https://redirect.github.com/oxc-project/oxc/commit/6d68568)
linter: False negative in typescript/array-type
([#11574](https://redirect.github.com/oxc-project/oxc/issues/11574))
(camc314)
-
[`6a856a0`](https://redirect.github.com/oxc-project/oxc/commit/6a856a0)
linter/no-magic-numbers: Fix typo in error message
([#11560](https://redirect.github.com/oxc-project/oxc/issues/11560))
(overlookmotel)
-
[`3952e01`](https://redirect.github.com/oxc-project/oxc/commit/3952e01)
linter: False negative in jsx-a11y/aria-role
([#11547](https://redirect.github.com/oxc-project/oxc/issues/11547))
(camc314)
-
[`b0e3e08`](https://redirect.github.com/oxc-project/oxc/commit/b0e3e08)
linter: Misplaced quote in jsx-curly-brace-presence test case
([#11546](https://redirect.github.com/oxc-project/oxc/issues/11546))
(camc314)
-
[`a833ed1`](https://redirect.github.com/oxc-project/oxc/commit/a833ed1)
linter: Misplaced quote in anchor-is-valid test case
([#11545](https://redirect.github.com/oxc-project/oxc/issues/11545))
(camc314)
-
[`4e53b80`](https://redirect.github.com/oxc-project/oxc/commit/4e53b80)
linter: Misplaced backtick in exhaustive-deps test case
([#11544](https://redirect.github.com/oxc-project/oxc/issues/11544))
(camc314)
-
[`e8a04b6`](https://redirect.github.com/oxc-project/oxc/commit/e8a04b6)
linter: Misplaced backtick in no-object-constructor test case
([#11543](https://redirect.github.com/oxc-project/oxc/issues/11543))
(camc314)
-
[`65311d0`](https://redirect.github.com/oxc-project/oxc/commit/65311d0)
linter: Remove duplicate rule/scope from diagnostic
([#11531](https://redirect.github.com/oxc-project/oxc/issues/11531))
(camc314)
##### π Refactor
-
[`7ab84c2`](https://redirect.github.com/oxc-project/oxc/commit/7ab84c2)
editor: Use pattern for textDocument filter
([#11559](https://redirect.github.com/oxc-project/oxc/issues/11559))
(Sysix)
-
[`9b475ad`](https://redirect.github.com/oxc-project/oxc/commit/9b475ad)
linter: Use one instance of rope per file
([#11552](https://redirect.github.com/oxc-project/oxc/issues/11552))
(Sysix)
##### π Documentation
-
[`e13ed51`](https://redirect.github.com/oxc-project/oxc/commit/e13ed51)
editor/vscode: Fix typo in README
([#11572](https://redirect.github.com/oxc-project/oxc/issues/11572))
(David)
-
[`fa924ab`](https://redirect.github.com/oxc-project/oxc/commit/fa924ab)
linter: Cleanup docs for multiple linter rules
([#11551](https://redirect.github.com/oxc-project/oxc/issues/11551))
(Ulrich Stark)
##### β‘ Performance
-
[`7bf25cb`](https://redirect.github.com/oxc-project/oxc/commit/7bf25cb)
language_server: Transform `MessageWithPosition` to `Diagnostic` with
less allocations
([#11561](https://redirect.github.com/oxc-project/oxc/issues/11561))
(Sysix)
###
[`v0.18.0`](https://redirect.github.com/oxc-project/oxc/releases/tag/oxlint_v0.18.0):
oxlint v0.18.0
[Compare
Source](https://redirect.github.com/oxc-project/oxc/compare/oxlint_v0.17.0...oxlint_v0.18.0)
#### \[0.18.0] - 2025-06-06
-
[`bd9dd88`](https://redirect.github.com/oxc-project/oxc/commit/bd9dd88)
linter: \[**BREAKING**] Add more info to json reporter
([#11524](https://redirect.github.com/oxc-project/oxc/issues/11524))
(camc314)
##### Features
-
[`825d40c`](https://redirect.github.com/oxc-project/oxc/commit/825d40c)
linter: Fix casing in unicorn/no-useless-promise-resolve-reject
([#11528](https://redirect.github.com/oxc-project/oxc/issues/11528))
(camc314)
-
[`2faee3d`](https://redirect.github.com/oxc-project/oxc/commit/2faee3d)
linter: Fix grammer in react/exhaustive-deps
([#11527](https://redirect.github.com/oxc-project/oxc/issues/11527))
(camc314)
##### Bug Fixes
-
[`1a71d7c`](https://redirect.github.com/oxc-project/oxc/commit/1a71d7c)
linter: Misplaced backtick in unicorn/no-array-for-each diagnostic
([#11529](https://redirect.github.com/oxc-project/oxc/issues/11529))
(camc314)
-
[`7430b14`](https://redirect.github.com/oxc-project/oxc/commit/7430b14)
linter: Grammer in jest/valid-expect diagnostic
([#11522](https://redirect.github.com/oxc-project/oxc/issues/11522))
(camc314)
-
[`b92ac41`](https://redirect.github.com/oxc-project/oxc/commit/b92ac41)
linter: Grammer in eslint/no-redeclare diagnostic
([#11521](https://redirect.github.com/oxc-project/oxc/issues/11521))
(camc314)
-
[`17883e3`](https://redirect.github.com/oxc-project/oxc/commit/17883e3)
linter: Improve eslint/no-unsafe-negation diagnostic
([#11520](https://redirect.github.com/oxc-project/oxc/issues/11520))
(camc314)
-
[`8c89937`](https://redirect.github.com/oxc-project/oxc/commit/8c89937)
linter: Improve eslint/no-shadow-restricted-names diagnostic
([#11519](https://redirect.github.com/oxc-project/oxc/issues/11519))
(camc314)
-
[`3f0d889`](https://redirect.github.com/oxc-project/oxc/commit/3f0d889)
linter: Add missing article to oxc/bad-array-method-on-arguments
diagnostic
([#11518](https://redirect.github.com/oxc-project/oxc/issues/11518))
(camc314)
-
[`cf0c24c`](https://redirect.github.com/oxc-project/oxc/commit/cf0c24c)
linter: Improve message in react/prefer-es6-class diagnostic
([#11516](https://redirect.github.com/oxc-project/oxc/issues/11516))
(camc314)
-
[`91855df`](https://redirect.github.com/oxc-project/oxc/commit/91855df)
linter: Fix message in react/rules-of-hooks diagnostic
([#11515](https://redirect.github.com/oxc-project/oxc/issues/11515))
(camc314)
-
[`b272194`](https://redirect.github.com/oxc-project/oxc/commit/b272194)
linter: Misplaced backtick in jest/no-conditional-expect diagnostic
([#11514](https://redirect.github.com/oxc-project/oxc/issues/11514))
(camc314)
-
[`3403303`](https://redirect.github.com/oxc-project/oxc/commit/3403303)
linter: Misplaced backtick in unicorn/prefer-dom-node-dataset diagnostic
([#11513](https://redirect.github.com/oxc-project/oxc/issues/11513))
(camc314)
-
[`d5ca872`](https://redirect.github.com/oxc-project/oxc/commit/d5ca872)
linter: Misplaced backtick in eslint/radix diagnostic
([#11512](https://redirect.github.com/oxc-project/oxc/issues/11512))
(camc314)
-
[`2dcf8be`](https://redirect.github.com/oxc-project/oxc/commit/2dcf8be)
linter: Improve diagnostic message when function name is referenced
([#11509](https://redirect.github.com/oxc-project/oxc/issues/11509))
(camc314)
-
[`0de0c9c`](https://redirect.github.com/oxc-project/oxc/commit/0de0c9c)
linter: Improve diagnostic message for no-unsafe-declaration-merging
([#11508](https://redirect.github.com/oxc-project/oxc/issues/11508))
(camc314)
-
[`0946dac`](https://redirect.github.com/oxc-project/oxc/commit/0946dac)
linter: Correctly inherit categories when plugins are enabled
([#11353](https://redirect.github.com/oxc-project/oxc/issues/11353))
(Cameron)
-
[`510c1c6`](https://redirect.github.com/oxc-project/oxc/commit/510c1c6)
linter: Add missing `allowArrowFunctions` option for eslint/func-style
([#11455](https://redirect.github.com/oxc-project/oxc/issues/11455))
(yefan)
-
[`c77787c`](https://redirect.github.com/oxc-project/oxc/commit/c77787c)
linter: Improve `eslint/no-loss-of-precision`
([#11437](https://redirect.github.com/oxc-project/oxc/issues/11437))
(magic-akari)
-
[`11d4523`](https://redirect.github.com/oxc-project/oxc/commit/11d4523)
linter: False positive in react/exhaustive-deps
([#11438](https://redirect.github.com/oxc-project/oxc/issues/11438))
(camc314)
-
[`616b613`](https://redirect.github.com/oxc-project/oxc/commit/616b613)
linter/switch-case-braces: Align the logic with `unicorn`
([#11405](https://redirect.github.com/oxc-project/oxc/issues/11405))
(shulaoda)
##### Refactor
-
[`db0b099`](https://redirect.github.com/oxc-project/oxc/commit/db0b099)
language_server: Convert only once uri to path when creating
`ServerLinter`
([#11503](https://redirect.github.com/oxc-project/oxc/issues/11503))
(Sysix)
-
[`ccceb52`](https://redirect.github.com/oxc-project/oxc/commit/ccceb52)
language_server: Simplify `workspace/didChangeConfiguration` call
([#11462](https://redirect.github.com/oxc-project/oxc/issues/11462))
(Sysix)
-
[`0fdc51e`](https://redirect.github.com/oxc-project/oxc/commit/0fdc51e)
linter: Simplify `OxlintRules::override_rules`
([#11510](https://redirect.github.com/oxc-project/oxc/issues/11510))
(camc314)
##### Testing
-
[`2ba2893`](https://redirect.github.com/oxc-project/oxc/commit/2ba2893)
editor: Fix test for auto `fixAll` on save
([#11448](https://redirect.github.com/oxc-project/oxc/issues/11448))
(Sysix)
###
[`v0.17.0`](https://redirect.github.com/oxc-project/oxc/releases/tag/oxlint_v0.17.0):
oxlint v0.17.0
[Compare
Source](https://redirect.github.com/oxc-project/oxc/compare/oxlint_v0.16.12...oxlint_v0.17.0)
#### \[0.17.0] - 2025-05-30
-
[`ead5309`](https://redirect.github.com/oxc-project/oxc/commit/ead5309)
linter: \[**BREAKING**] Remove react from default plugin set
([#11382](https://redirect.github.com/oxc-project/oxc/issues/11382))
(camc314)
##### Features
-
[`2d25bd8`](https://redirect.github.com/oxc-project/oxc/commit/2d25bd8)
linter: Remove `unicorn/no-for-loop` over `typescript/prefer-for-of`
([#11354](https://redirect.github.com/oxc-project/oxc/issues/11354))
(camc314)
-
[`bbb7eb1`](https://redirect.github.com/oxc-project/oxc/commit/bbb7eb1)
linter: Add auto-fix to react/forward-ref-uses-ref
([#11342](https://redirect.github.com/oxc-project/oxc/issues/11342))
(yefan)
-
[`590c27b`](https://redirect.github.com/oxc-project/oxc/commit/590c27b)
linter: Add auto-fix to unicorn/no-await-expression-member
([#11306](https://redirect.github.com/oxc-project/oxc/issues/11306))
(yefan)
-
[`7824f01`](https://redirect.github.com/oxc-project/oxc/commit/7824f01)
linter: Implement suggestion for `jsx/no-useless-fragment`
([#10800](https://redirect.github.com/oxc-project/oxc/issues/10800))
(Cam McHenry)
-
[`2083d33`](https://redirect.github.com/oxc-project/oxc/commit/2083d33)
linter/language_server: Add second editor suggestion for
`react/forward-ref-uses-ref`
([#11375](https://redirect.github.com/oxc-project/oxc/issues/11375))
(Sysix)
##### Bug Fixes
-
[`f6424dd`](https://redirect.github.com/oxc-project/oxc/commit/f6424dd)
linter: Reflect react plugin is disabled by default in cli
([#11397](https://redirect.github.com/oxc-project/oxc/issues/11397))
(camc314)
-
[`25ecbfe`](https://redirect.github.com/oxc-project/oxc/commit/25ecbfe)
linter: Remove use of `FrameworkFlags::React` to decide whether rules
should run
([#11383](https://redirect.github.com/oxc-project/oxc/issues/11383))
(camc314)
-
[`0d240e4`](https://redirect.github.com/oxc-project/oxc/commit/0d240e4)
linter: False positive in react/exhaustive-deps with default formal
parameter
([#11395](https://redirect.github.com/oxc-project/oxc/issues/11395))
(camc314)
-
[`c91697e`](https://redirect.github.com/oxc-project/oxc/commit/c91697e)
linter: Fix panic in multi byte char in `TryFrom` aria
([#11350](https://redirect.github.com/oxc-project/oxc/issues/11350))
(camc314)
-
[`9798ef1`](https://redirect.github.com/oxc-project/oxc/commit/9798ef1)
linter: Stack overflow in no-async-endpoint-handlers
([#11317](https://redirect.github.com/oxc-project/oxc/issues/11317))
(camc314)
-
[`348ad97`](https://redirect.github.com/oxc-project/oxc/commit/348ad97)
linter: Skip no-unused-vars on astro files
([#11303](https://redirect.github.com/oxc-project/oxc/issues/11303))
(camc314)
-
[`183d7f0`](https://redirect.github.com/oxc-project/oxc/commit/183d7f0)
linter: Make `jest/no-large-snapshots` error easier to comprehend
([#11294](https://redirect.github.com/oxc-project/oxc/issues/11294))
(Ulrich Stark)
-
[`4e606a5`](https://redirect.github.com/oxc-project/oxc/commit/4e606a5)
linter: Improve `jest/no-large-snapshots`
([#11291](https://redirect.github.com/oxc-project/oxc/issues/11291))
(Ulrich Stark)
-
[`14f790f`](https://redirect.github.com/oxc-project/oxc/commit/14f790f)
linter: Improve `jest/no-restricted-matchers`
([#11292](https://redirect.github.com/oxc-project/oxc/issues/11292))
(Ulrich Stark)
-
[`a2c82be`](https://redirect.github.com/oxc-project/oxc/commit/a2c82be)
linter/block-scoped-var: Better diagnostic messages
([#11290](https://redirect.github.com/oxc-project/oxc/issues/11290))
(DonIsaac)
-
[`19772e5`](https://redirect.github.com/oxc-project/oxc/commit/19772e5)
linter/no-unused-vars: Panic when variable is redeclared as function in
same scope
([#11280](https://redirect.github.com/oxc-project/oxc/issues/11280))
(Dunqing)
-
[`7af5bb1`](https://redirect.github.com/oxc-project/oxc/commit/7af5bb1)
oxc_language_server: Include save option for text document sync
capability
([#11297](https://redirect.github.com/oxc-project/oxc/issues/11297))
(Nicholas Rayburn)
##### Performance
-
[`0ed6c1a`](https://redirect.github.com/oxc-project/oxc/commit/0ed6c1a)
language_server: Use `Arc` instead of `Mutex` for workspace
workers
([#11328](https://redirect.github.com/oxc-project/oxc/issues/11328))
(Sysix)
-
[`a0ee946`](https://redirect.github.com/oxc-project/oxc/commit/a0ee946)
linter: Reduce code size in `globals`
([#11333](https://redirect.github.com/oxc-project/oxc/issues/11333))
(shulaoda)
-
[`c90c5e9`](https://redirect.github.com/oxc-project/oxc/commit/c90c5e9)
linter/no-unused-vars: Simplify checking self call usage
([#11281](https://redirect.github.com/oxc-project/oxc/issues/11281))
(Dunqing)
##### Documentation
-
[`eae51ca`](https://redirect.github.com/oxc-project/oxc/commit/eae51ca)
linter: Clarify jsdoc/check-tag-names configuration
([#11394](https://redirect.github.com/oxc-project/oxc/issues/11394))
(RΓ€gnar O'ock)
-
[`cd354d4`](https://redirect.github.com/oxc-project/oxc/commit/cd354d4)
oxlint: Remove incorrect doc comment
([#11326](https://redirect.github.com/oxc-project/oxc/issues/11326))
(camc314)
##### Refactor
-
[`42738f0`](https://redirect.github.com/oxc-project/oxc/commit/42738f0)
linter: Shorten code of match arms
([#11389](https://redirect.github.com/oxc-project/oxc/issues/11389))
(Ulrich Stark)
-
[`8a34447`](https://redirect.github.com/oxc-project/oxc/commit/8a34447)
linter: Improve `unicorn/text-encoding-identifier-case`
([#11386](https://redirect.github.com/oxc-project/oxc/issues/11386))
(shulaoda)
-
[`eaa605e`](https://redirect.github.com/oxc-project/oxc/commit/eaa605e)
linter: Avoid some `Arc::clone` in linter runtime
([#11388](https://redirect.github.com/oxc-project/oxc/issues/11388))
(Boshen)
-
[`1cd8b9c`](https://redirect.github.com/oxc-project/oxc/commit/1cd8b9c)
linter: Fixes in `react/forward-ref-uses-ref` are suggestions
([#11376](https://redirect.github.com/oxc-project/oxc/issues/11376))
(Sysix)
-
[`50ef691`](https://redirect.github.com/oxc-project/oxc/commit/50ef691)
linter: Add `diagnostics_with_multiple_fixes` to `LintContext`
([#11357](https://redirect.github.com/oxc-project/oxc/issues/11357))
(Sysix)
-
[`606bb34`](https://redirect.github.com/oxc-project/oxc/commit/606bb34)
linter: Accept `PossibleFixes` instead of `Fix` for `Messages`
([#11295](https://redirect.github.com/oxc-project/oxc/issues/11295))
(Sysix)
-
[`042a3f3`](https://redirect.github.com/oxc-project/oxc/commit/042a3f3)
linter: Use `PossibleFixes` instead of `Option`
([#11284](https://redirect.github.com/oxc-project/oxc/issues/11284))
(Sysix)
-
[`ffcfb46`](https://redirect.github.com/oxc-project/oxc/commit/ffcfb46)
linter: Improve `unicorn/throw-new-error`
([#11364](https://redirect.github.com/oxc-project/oxc/issues/11364))
(shulaoda)
-
[`8fb55c3`](https://redirect.github.com/oxc-project/oxc/commit/8fb55c3)
linter: Cleanup docs and simplify code of `eslint/no-fallthrough`
([#11331](https://redirect.github.com/oxc-project/oxc/issues/11331))
(Ulrich Stark)
-
[`e2f0f0a`](https://redirect.github.com/oxc-project/oxc/commit/e2f0f0a)
linter: Improve docs and simplify code of `eslint/no-duplicate-imports`
([#11320](https://redirect.github.com/oxc-project/oxc/issues/11320))
(Ulrich Stark)
-
[`b53b053`](https://redirect.github.com/oxc-project/oxc/commit/b53b053)
linter: Simplify accessing span of NameSpan
([#11305](https://redirect.github.com/oxc-project/oxc/issues/11305))
(Ulrich Stark)
-
[`4bc2650`](https://redirect.github.com/oxc-project/oxc/commit/4bc2650)
linter: Improve `eslint/no-void`
([#11285](https://redirect.github.com/oxc-project/oxc/issues/11285))
(shulaoda)
##### Styling
-
[`49b664c`](https://redirect.github.com/oxc-project/oxc/commit/49b664c)
linter: Remove needless newline in `declare_oxc_lint`
([#11400](https://redirect.github.com/oxc-project/oxc/issues/11400))
(camc314)
##### Testing
-
[`c4f64aa`](https://redirect.github.com/oxc-project/oxc/commit/c4f64aa)
linter: Explicitly disable correctness for clarity
([#11327](https://redirect.github.com/oxc-project/oxc/issues/11327))
(camc314)
-
[`a404b2c`](https://redirect.github.com/oxc-project/oxc/commit/a404b2c)
linter: `eslint/no-duplicate-imports` shouldn't report the same span
([#11324](https://redirect.github.com/oxc-project/oxc/issues/11324))
(Ulrich Stark)
###
[`v0.16.12`](https://redirect.github.com/oxc-project/oxc/blob/HEAD/npm/oxlint/CHANGELOG.md#01612---2025-05-25)
[Compare
Source](https://redirect.github.com/oxc-project/oxc/compare/oxlint_v0.16.11...oxlint_v0.16.12)
##### Features
-
[`6a7018e`](https://redirect.github.com/oxc-project/oxc/commit/6a7018e)
linter: Generate stricter json schema for lint plugins
([#11219](https://redirect.github.com/oxc-project/oxc/issues/11219))
(camc314)
##### Bug Fixes
-
[`e8470d9`](https://redirect.github.com/oxc-project/oxc/commit/e8470d9)
linter: Delay merging of oxlintrc configs
([#10835](https://redirect.github.com/oxc-project/oxc/issues/10835))
(camc314)
---
### Configuration
π
**Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).
π¦ **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
β» **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
π **Ignore**: Close this PR and you won't be reminded about this update
again.
---
- [ ] If you want to rebase/retry this PR, check
this box
---
This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/toeverything/AFFiNE).
## Summary by CodeRabbit
- **Refactor**
- Simplified array element retrieval across multiple components and
utilities by replacing `.filter(...)[0]` with `.find(...)` or
`.findLast(...)`, improving code readability and efficiency.
- Improved JSX structure in the audio player component by nesting
elements directly rather than using a `children` prop.
- Enhanced code organization in the modal container by repositioning
functions and updating dependency arrays for better maintainability.
- Added a comment to disable a specific lint rule in a React hook for
clarity.
- **Chores**
- Updated the `oxlint` development dependency to allow for newer
compatible versions.
- **Tests**
- Refactored test setup logic for more direct and clear retrieval of
test data.
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: LongYinan
---
.../affine/blocks/frame/src/frame-toolbar.ts | 12 ++-
.../src/property-presets/select/define.ts | 2 +-
.../affine/gfx/group/src/toolbar/config.ts | 12 ++-
.../selection/get-surface-selection.ts | 2 +-
package.json | 2 +-
.../src/plugins/copilot/providers/fal.ts | 2 +-
.../component/src/hooks/use-disposable.ts | 1 +
.../src/ui/audio-player/audio-player.tsx | 11 ++-
.../ai/components/playground/content.ts | 4 +-
.../ai/mini-mindmap/mindmap-preview.ts | 6 +-
.../core/src/modules/dnd/services/index.ts | 2 +-
.../peek-view/view/modal-container.tsx | 61 ++++++++-------
.../src/modules/tag/view/delete-tag-modal.tsx | 4 +-
.../edgeless/group/group-and-ungroup.spec.ts | 4 +-
.../blocksuite/e2e/embed-synced-doc/utils.ts | 4 +-
yarn.lock | 74 +++++++++----------
16 files changed, 97 insertions(+), 106 deletions(-)
diff --git a/blocksuite/affine/blocks/frame/src/frame-toolbar.ts b/blocksuite/affine/blocks/frame/src/frame-toolbar.ts
index d42e3e11b7..2f5f777fad 100644
--- a/blocksuite/affine/blocks/frame/src/frame-toolbar.ts
+++ b/blocksuite/affine/blocks/frame/src/frame-toolbar.ts
@@ -62,13 +62,11 @@ const builtinSurfaceToolbarConfig = {
if (!rootModel) return;
const { id: frameId, xywh } = model;
- let lastNoteId = rootModel.children
- .filter(
- note =>
- matchModels(note, [NoteBlockModel]) &&
- note.props.displayMode !== NoteDisplayMode.EdgelessOnly
- )
- .pop()?.id;
+ let lastNoteId = rootModel.children.findLast(
+ note =>
+ matchModels(note, [NoteBlockModel]) &&
+ note.props.displayMode !== NoteDisplayMode.EdgelessOnly
+ )?.id;
if (!lastNoteId) {
const bounds = Bound.deserialize(xywh);
diff --git a/blocksuite/affine/data-view/src/property-presets/select/define.ts b/blocksuite/affine/data-view/src/property-presets/select/define.ts
index d4036b0a1f..b86d604672 100644
--- a/blocksuite/affine/data-view/src/property-presets/select/define.ts
+++ b/blocksuite/affine/data-view/src/property-presets/select/define.ts
@@ -35,7 +35,7 @@ export const selectPropertyModelConfig = selectPropertyType.modelConfig({
const name = oldValue
.split(',')
.map(v => v.trim())
- .filter(v => v)[0];
+ .find(v => v);
if (!name) {
return { value: null, data: data };
}
diff --git a/blocksuite/affine/gfx/group/src/toolbar/config.ts b/blocksuite/affine/gfx/group/src/toolbar/config.ts
index ec59ae50e2..7d65769330 100644
--- a/blocksuite/affine/gfx/group/src/toolbar/config.ts
+++ b/blocksuite/affine/gfx/group/src/toolbar/config.ts
@@ -40,13 +40,11 @@ export const groupToolbarConfig = {
if (!rootModel) return;
const { id: groupId, xywh } = model;
- let lastNoteId = rootModel.children
- .filter(
- note =>
- matchModels(note, [NoteBlockModel]) &&
- note.props.displayMode !== NoteDisplayMode.EdgelessOnly
- )
- .pop()?.id;
+ let lastNoteId = rootModel.children.findLast(
+ note =>
+ matchModels(note, [NoteBlockModel]) &&
+ note.props.displayMode !== NoteDisplayMode.EdgelessOnly
+ )?.id;
if (!lastNoteId) {
const bounds = Bound.deserialize(xywh);
diff --git a/blocksuite/affine/shared/src/commands/selection/get-surface-selection.ts b/blocksuite/affine/shared/src/commands/selection/get-surface-selection.ts
index 5814dfab63..770d1908e7 100644
--- a/blocksuite/affine/shared/src/commands/selection/get-surface-selection.ts
+++ b/blocksuite/affine/shared/src/commands/selection/get-surface-selection.ts
@@ -3,7 +3,7 @@ import { SurfaceSelection } from '@blocksuite/std';
import type { GetSelectionCommand } from './types';
export const getSurfaceSelectionCommand: GetSelectionCommand = (ctx, next) => {
- const currentSurfaceSelection = ctx.std.selection.filter(SurfaceSelection)[0];
+ const currentSurfaceSelection = ctx.std.selection.find(SurfaceSelection);
if (!currentSurfaceSelection) return;
next({ currentSurfaceSelection });
diff --git a/package.json b/package.json
index 77dc6a0922..e9bfd1341d 100644
--- a/package.json
+++ b/package.json
@@ -82,7 +82,7 @@
"husky": "^9.1.7",
"lint-staged": "^16.0.0",
"msw": "^2.6.8",
- "oxlint": "0.16.11",
+ "oxlint": "^1.1.0",
"prettier": "^3.4.2",
"semver": "^7.6.3",
"serve": "^14.2.4",
diff --git a/packages/backend/server/src/plugins/copilot/providers/fal.ts b/packages/backend/server/src/plugins/copilot/providers/fal.ts
index bbeb3d6053..537feb7fd9 100644
--- a/packages/backend/server/src/plugins/copilot/providers/fal.ts
+++ b/packages/backend/server/src/plugins/copilot/providers/fal.ts
@@ -180,7 +180,7 @@ export class FalProvider extends CopilotProvider {
? v.attachment
: undefined
)
- .filter(v => !!v)[0],
+ .find(v => !!v),
prompt: content.trim(),
loras: lora.length ? lora : undefined,
controlnets: controlnets.length ? controlnets : undefined,
diff --git a/packages/frontend/component/src/hooks/use-disposable.ts b/packages/frontend/component/src/hooks/use-disposable.ts
index 491c965f8c..08b929d693 100644
--- a/packages/frontend/component/src/hooks/use-disposable.ts
+++ b/packages/frontend/component/src/hooks/use-disposable.ts
@@ -24,6 +24,7 @@ export function useDisposable(
error: null,
});
+ // oxlint-disable-next-line react-hooks/exhaustive-deps
useEffect(() => {
const abortController = new AbortController();
let _data: T | null = null;
diff --git a/packages/frontend/component/src/ui/audio-player/audio-player.tsx b/packages/frontend/component/src/ui/audio-player/audio-player.tsx
index 1b92a9c08f..dba76ad6fe 100644
--- a/packages/frontend/component/src/ui/audio-player/audio-player.tsx
+++ b/packages/frontend/component/src/ui/audio-player/audio-player.tsx
@@ -113,11 +113,6 @@ export const AudioPlayer = ({
{notesEntry}
!session.parentSessionId)
- .at(-1);
+ const rootSession = sessions?.findLast(session => !session.parentSessionId);
if (!rootSession) {
// Create a new session
const rootSessionId = await AIProvider.session?.createSession({
diff --git a/packages/frontend/core/src/blocksuite/ai/mini-mindmap/mindmap-preview.ts b/packages/frontend/core/src/blocksuite/ai/mini-mindmap/mindmap-preview.ts
index b46775305d..6cdf6ac8d4 100644
--- a/packages/frontend/core/src/blocksuite/ai/mini-mindmap/mindmap-preview.ts
+++ b/packages/frontend/core/src/blocksuite/ai/mini-mindmap/mindmap-preview.ts
@@ -250,12 +250,12 @@ export const markdownToMindmap = (
switch (markdownNode.type) {
case 'list':
{
- const listItems = markdownNode.children
+ const listItem = markdownNode.children
.map(child => traverse(child))
- .filter(val => val);
+ .find(val => val);
if (firstLevel) {
- return listItems[0];
+ return listItem ?? null;
}
}
break;
diff --git a/packages/frontend/core/src/modules/dnd/services/index.ts b/packages/frontend/core/src/modules/dnd/services/index.ts
index f81032d5c1..376ca7894d 100644
--- a/packages/frontend/core/src/modules/dnd/services/index.ts
+++ b/packages/frontend/core/src/modules/dnd/services/index.ts
@@ -275,7 +275,7 @@ export class DndService extends Service {
// only deal with the first url
const url = urls
?.split('\n')
- .filter(u => u.trim() && !u.trim().startsWith('#'))[0];
+ .find(u => u.trim() && !u.trim().startsWith('#'));
if (url) {
const maybeDocLink = resolveLinkToDoc(url);
diff --git a/packages/frontend/core/src/modules/peek-view/view/modal-container.tsx b/packages/frontend/core/src/modules/peek-view/view/modal-container.tsx
index ddc7a95056..415cc411c6 100644
--- a/packages/frontend/core/src/modules/peek-view/view/modal-container.tsx
+++ b/packages/frontend/core/src/modules/peek-view/view/modal-container.tsx
@@ -107,6 +107,35 @@ export const PeekViewModalContainer = forwardRef<
duration: 230,
});
}, []);
+ const animateFade = useCallback(
+ (animateIn: boolean) => {
+ setAnimeState('animating');
+ onAnimationStart?.();
+ return new Promise(resolve => {
+ if (animateIn) setVtOpen(true);
+ setTimeout(() => {
+ const overlay = overlayRef.current;
+ const contentClip = contentClipRef.current;
+ if (!overlay || !contentClip) {
+ resolve();
+ return;
+ }
+ waapi.animate([overlay, contentClip], {
+ opacity: animateIn ? [0, 1] : [1, 0],
+ ease: eases.inOutSine,
+ duration: 230,
+ onComplete: () => {
+ if (!animateIn) setVtOpen(false);
+ setAnimeState('idle');
+ onAnimationEnd?.();
+ resolve();
+ },
+ });
+ });
+ });
+ },
+ [onAnimationEnd, onAnimationStart]
+ );
const zoomAnimate = useCallback(
async (
zoomIn?: boolean,
@@ -220,7 +249,7 @@ export const PeekViewModalContainer = forwardRef<
};
});
},
- [target]
+ [target, animateFade, onAnimationEnd]
);
/**
* ### Animation timeline:
@@ -277,36 +306,6 @@ export const PeekViewModalContainer = forwardRef<
.catch(console.error);
}, [animateControls, onAnimationStart, zoomAnimate]);
- const animateFade = useCallback(
- (animateIn: boolean) => {
- setAnimeState('animating');
- onAnimationStart?.();
- return new Promise(resolve => {
- if (animateIn) setVtOpen(true);
- setTimeout(() => {
- const overlay = overlayRef.current;
- const contentClip = contentClipRef.current;
- if (!overlay || !contentClip) {
- resolve();
- return;
- }
- waapi.animate([overlay, contentClip], {
- opacity: animateIn ? [0, 1] : [1, 0],
- ease: eases.inOutSine,
- duration: 230,
- onComplete: () => {
- if (!animateIn) setVtOpen(false);
- setAnimeState('idle');
- onAnimationEnd?.();
- resolve();
- },
- });
- });
- });
- },
- [onAnimationEnd, onAnimationStart]
- );
-
const animateFadeBottom = useCallback(
(animateIn: boolean) => {
setAnimeState('animating');
diff --git a/packages/frontend/core/src/modules/tag/view/delete-tag-modal.tsx b/packages/frontend/core/src/modules/tag/view/delete-tag-modal.tsx
index a452e016c5..2136b133f8 100644
--- a/packages/frontend/core/src/modules/tag/view/delete-tag-modal.tsx
+++ b/packages/frontend/core/src/modules/tag/view/delete-tag-modal.tsx
@@ -19,8 +19,8 @@ export const useDeleteTagConfirmModal = () => {
(tagIdsToDelete: string[]) => {
let closed = false;
const { resolve, promise } = Promise.withResolvers();
- const tagsToDelete = tags.filter(tag => tagIdsToDelete.includes(tag.id));
- const tagName = tagsToDelete[0]?.value$.value;
+ const tagToDelete = tags.find(tag => tagIdsToDelete.includes(tag.id));
+ const tagName = tagToDelete?.value$.value;
const handleClose = (state: boolean) => {
if (!closed) {
closed = true;
diff --git a/tests/blocksuite/e2e/edgeless/group/group-and-ungroup.spec.ts b/tests/blocksuite/e2e/edgeless/group/group-and-ungroup.spec.ts
index cd18fe9229..9ecac3bfec 100644
--- a/tests/blocksuite/e2e/edgeless/group/group-and-ungroup.spec.ts
+++ b/tests/blocksuite/e2e/edgeless/group/group-and-ungroup.spec.ts
@@ -38,9 +38,7 @@ test.describe('group and ungroup in group', () => {
test.beforeEach(async ({ page }) => {
await init(page);
await createShapeElement(page, [200, 0], [300, 100], Shape.Square);
- newAddedShape = (await getIds(page)).filter(
- id => !initShapes.includes(id)
- )[0];
+ newAddedShape = (await getIds(page)).find(id => !initShapes.includes(id))!;
await selectAllByKeyboard(page);
await triggerComponentToolbarAction(page, 'addGroup');
outterGroupId = await getFirstContainerId(page);
diff --git a/tests/blocksuite/e2e/embed-synced-doc/utils.ts b/tests/blocksuite/e2e/embed-synced-doc/utils.ts
index cfcc67b6d7..e7a0ff5a23 100644
--- a/tests/blocksuite/e2e/embed-synced-doc/utils.ts
+++ b/tests/blocksuite/e2e/embed-synced-doc/utils.ts
@@ -60,12 +60,12 @@ export async function initEmbedSyncedDocState(
const getVisibleNote = (store: Store) => {
const note = store
.getModelsByFlavour('affine:note')
- .filter((note): note is NoteBlockModel => {
+ .find((note): note is NoteBlockModel => {
return (
note instanceof NoteBlockModel &&
note.props.displayMode === NoteDisplayMode.DocAndEdgeless
);
- })[0];
+ });
return note ?? null;
};
diff --git a/yarn.lock b/yarn.lock
index 9aff707fe3..52c9276a2f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -786,7 +786,7 @@ __metadata:
husky: "npm:^9.1.7"
lint-staged: "npm:^16.0.0"
msw: "npm:^2.6.8"
- oxlint: "npm:0.16.11"
+ oxlint: "npm:^1.1.0"
prettier: "npm:^3.4.2"
semver: "npm:^7.6.3"
serve: "npm:^14.2.4"
@@ -10593,58 +10593,58 @@ __metadata:
languageName: node
linkType: hard
-"@oxlint/darwin-arm64@npm:0.16.11":
- version: 0.16.11
- resolution: "@oxlint/darwin-arm64@npm:0.16.11"
+"@oxlint/darwin-arm64@npm:1.1.0":
+ version: 1.1.0
+ resolution: "@oxlint/darwin-arm64@npm:1.1.0"
conditions: os=darwin & cpu=arm64
languageName: node
linkType: hard
-"@oxlint/darwin-x64@npm:0.16.11":
- version: 0.16.11
- resolution: "@oxlint/darwin-x64@npm:0.16.11"
+"@oxlint/darwin-x64@npm:1.1.0":
+ version: 1.1.0
+ resolution: "@oxlint/darwin-x64@npm:1.1.0"
conditions: os=darwin & cpu=x64
languageName: node
linkType: hard
-"@oxlint/linux-arm64-gnu@npm:0.16.11":
- version: 0.16.11
- resolution: "@oxlint/linux-arm64-gnu@npm:0.16.11"
+"@oxlint/linux-arm64-gnu@npm:1.1.0":
+ version: 1.1.0
+ resolution: "@oxlint/linux-arm64-gnu@npm:1.1.0"
conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node
linkType: hard
-"@oxlint/linux-arm64-musl@npm:0.16.11":
- version: 0.16.11
- resolution: "@oxlint/linux-arm64-musl@npm:0.16.11"
+"@oxlint/linux-arm64-musl@npm:1.1.0":
+ version: 1.1.0
+ resolution: "@oxlint/linux-arm64-musl@npm:1.1.0"
conditions: os=linux & cpu=arm64 & libc=musl
languageName: node
linkType: hard
-"@oxlint/linux-x64-gnu@npm:0.16.11":
- version: 0.16.11
- resolution: "@oxlint/linux-x64-gnu@npm:0.16.11"
+"@oxlint/linux-x64-gnu@npm:1.1.0":
+ version: 1.1.0
+ resolution: "@oxlint/linux-x64-gnu@npm:1.1.0"
conditions: os=linux & cpu=x64 & libc=glibc
languageName: node
linkType: hard
-"@oxlint/linux-x64-musl@npm:0.16.11":
- version: 0.16.11
- resolution: "@oxlint/linux-x64-musl@npm:0.16.11"
+"@oxlint/linux-x64-musl@npm:1.1.0":
+ version: 1.1.0
+ resolution: "@oxlint/linux-x64-musl@npm:1.1.0"
conditions: os=linux & cpu=x64 & libc=musl
languageName: node
linkType: hard
-"@oxlint/win32-arm64@npm:0.16.11":
- version: 0.16.11
- resolution: "@oxlint/win32-arm64@npm:0.16.11"
+"@oxlint/win32-arm64@npm:1.1.0":
+ version: 1.1.0
+ resolution: "@oxlint/win32-arm64@npm:1.1.0"
conditions: os=win32 & cpu=arm64
languageName: node
linkType: hard
-"@oxlint/win32-x64@npm:0.16.11":
- version: 0.16.11
- resolution: "@oxlint/win32-x64@npm:0.16.11"
+"@oxlint/win32-x64@npm:1.1.0":
+ version: 1.1.0
+ resolution: "@oxlint/win32-x64@npm:1.1.0"
conditions: os=win32 & cpu=x64
languageName: node
linkType: hard
@@ -27734,18 +27734,18 @@ __metadata:
languageName: node
linkType: hard
-"oxlint@npm:0.16.11":
- version: 0.16.11
- resolution: "oxlint@npm:0.16.11"
+"oxlint@npm:^1.1.0":
+ version: 1.1.0
+ resolution: "oxlint@npm:1.1.0"
dependencies:
- "@oxlint/darwin-arm64": "npm:0.16.11"
- "@oxlint/darwin-x64": "npm:0.16.11"
- "@oxlint/linux-arm64-gnu": "npm:0.16.11"
- "@oxlint/linux-arm64-musl": "npm:0.16.11"
- "@oxlint/linux-x64-gnu": "npm:0.16.11"
- "@oxlint/linux-x64-musl": "npm:0.16.11"
- "@oxlint/win32-arm64": "npm:0.16.11"
- "@oxlint/win32-x64": "npm:0.16.11"
+ "@oxlint/darwin-arm64": "npm:1.1.0"
+ "@oxlint/darwin-x64": "npm:1.1.0"
+ "@oxlint/linux-arm64-gnu": "npm:1.1.0"
+ "@oxlint/linux-arm64-musl": "npm:1.1.0"
+ "@oxlint/linux-x64-gnu": "npm:1.1.0"
+ "@oxlint/linux-x64-musl": "npm:1.1.0"
+ "@oxlint/win32-arm64": "npm:1.1.0"
+ "@oxlint/win32-x64": "npm:1.1.0"
dependenciesMeta:
"@oxlint/darwin-arm64":
optional: true
@@ -27766,7 +27766,7 @@ __metadata:
bin:
oxc_language_server: bin/oxc_language_server
oxlint: bin/oxlint
- checksum: 10/cd4f6a9e0682006f0e0dc33ce3b8b03b358d90b70d16eddc10f73bbca56efe466dcacfa9c063981b30a4098cf85cae251b3f60ef3813642914a7ff373726f909
+ checksum: 10/1cd94bc8f7114ad56a22ea8dcb06c505511307bad6dc92283d8fc6c1d408254ccb116ecde7b21dfab0c4bfae7806f7efb2f76560aa6fa42eb1d892c84473c0cb
languageName: node
linkType: hard