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:
@@ -30,14 +30,21 @@ import type { ConnectionStatus } from '@affine/nbstore';
|
||||
import { IndexedDBDocStorage } from '@affine/nbstore/idb';
|
||||
import { SqliteBlobStorage } from '@affine/nbstore/sqlite';
|
||||
|
||||
const storage = new SpaceStorage([new IndexedDBDocStorage({}), new SqliteBlobStorage({})]);
|
||||
const storage = new SpaceStorage([
|
||||
new IndexedDBDocStorage({}),
|
||||
new SqliteBlobStorage({}),
|
||||
]);
|
||||
|
||||
await storage.connect();
|
||||
storage.on('connection', ({ storage, status, error }) => {
|
||||
ui.show(storage, status, error);
|
||||
});
|
||||
|
||||
await storage.get('doc').pushDocUpdate({ docId: 'my-first-doc', bin: new Uint8Array(), editor: 'me' });
|
||||
await storage.get('doc').pushDocUpdate({
|
||||
docId: 'my-first-doc',
|
||||
bin: new Uint8Array(),
|
||||
editor: 'me',
|
||||
});
|
||||
await storage.tryGet('blob')?.get('img');
|
||||
```
|
||||
|
||||
@@ -61,7 +68,11 @@ client.ob$('connection', ({ storage, status, error }) => {
|
||||
ui.show(storage, status, error);
|
||||
});
|
||||
|
||||
await client.call('pushDocUpdate', { docId: 'my-first-doc', bin: new Uint8Array(), editor: 'me' });
|
||||
await client.call('pushDocUpdate', {
|
||||
docId: 'my-first-doc',
|
||||
bin: new Uint8Array(),
|
||||
editor: 'me',
|
||||
});
|
||||
|
||||
// call unregistered op will leads to Error
|
||||
// Error { message: 'Handler for operation [listHistory] is not registered.' }
|
||||
|
||||
Reference in New Issue
Block a user