mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-21 03:51:45 +08:00
chore: migrate oxlint & oxfmt (#15464)
#### PR Dependency Tree * **PR #15464** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Replaced the project’s formatting and linting workflow with Oxfmt and Oxlint. * Added shared formatting and linting configuration, editor integration, and updated automated checks. * Updated generated files, scripts, and lint guidance to use the new tooling. * **Style** * Reformatted templates, source code, examples, and configuration files for consistent readability. * No user-facing functionality or rendering behavior changed. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
// let '$' stands for unspecific matrix
|
||||
/* eslint-disable rxjs/finnish */
|
||||
|
||||
// SECTION: app events
|
||||
type GeneralEvents = 'openMigrationDataHelp';
|
||||
@@ -92,7 +91,8 @@ type FolderEvents =
|
||||
| 'deleteFolder';
|
||||
type TagEvents = 'createTag' | 'deleteTag' | 'renameTag' | 'tagDoc';
|
||||
type FavoriteEvents = 'toggleFavorite';
|
||||
type OrganizeItemEvents = // doc, link, folder, collection, tag
|
||||
type OrganizeItemEvents =
|
||||
// doc, link, folder, collection, tag
|
||||
| 'createOrganizeItem'
|
||||
| 'renameOrganizeItem'
|
||||
| 'moveOrganizeItem'
|
||||
|
||||
@@ -11,7 +11,9 @@ export type CallableEventsChain = {
|
||||
[Page in keyof Events]: {
|
||||
[Segment in keyof Events[Page]]: {
|
||||
[Module in keyof Events[Page][Segment]]: {
|
||||
[Event in Events[Page][Segment][Module][number]]: Event extends keyof EventArgs
|
||||
[
|
||||
Event in Events[Page][Segment][Module][number]
|
||||
]: Event extends keyof EventArgs
|
||||
? (
|
||||
// we make all args partial to simply satisfies nullish type checking
|
||||
args?: Partial<EventArgs[Event]> & EventPropsOverride
|
||||
@@ -26,8 +28,9 @@ export type EventsUnion = {
|
||||
[Page in keyof Events]: {
|
||||
[Segment in keyof Events[Page]]: {
|
||||
[Module in keyof Events[Page][Segment]]: {
|
||||
// @ts-expect-error ignore `symbol | number` as key
|
||||
[Event in Events[Page][Segment][Module][number]]: `${Page}.${Segment}.${Module}.${Event}`;
|
||||
[
|
||||
Event in Events[Page][Segment][Module][number]
|
||||
]: `${Page & string}.${Segment & string}.${Module & string}.${Event & string}`;
|
||||
}[Events[Page][Segment][Module][number]];
|
||||
}[keyof Events[Page][Segment]];
|
||||
}[keyof Events[Page]];
|
||||
|
||||
Reference in New Issue
Block a user