mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-12 14:40:22 +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
-1
@@ -1,5 +1,5 @@
|
||||
/* auto-generated by NAPI-RS */
|
||||
/* eslint-disable */
|
||||
/* oxlint-disable */
|
||||
|
||||
declare const _default: typeof import('./index')
|
||||
export default _default
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
/* auto-generated by NAPI-RS */
|
||||
/* eslint-disable */
|
||||
/* oxlint-disable */
|
||||
|
||||
declare const _default: typeof import('./index')
|
||||
export default _default
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* eslint-disable */
|
||||
/* oxlint-disable */
|
||||
import '../src/prelude';
|
||||
import '../src/app.module';
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ export class AuthGuard implements CanActivate, OnModuleInit {
|
||||
|
||||
private getVersionRange(versionRange: string): semver.Range | null {
|
||||
if (this.cachedVersionRange.has(versionRange)) {
|
||||
// oxlint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
// oxlint-disable-next-line typescript/no-non-null-assertion
|
||||
return this.cachedVersionRange.get(versionRange)!;
|
||||
}
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ export class AuthService implements OnApplicationBootstrap {
|
||||
// fallback to the first valid session if user provided userId is invalid
|
||||
if (!userSession) {
|
||||
// checked
|
||||
// oxlint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
// oxlint-disable-next-line typescript/no-non-null-assertion
|
||||
userSession = sessions.at(-1)!;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ export class Lock {
|
||||
private release: () => void = () => {};
|
||||
|
||||
async acquire() {
|
||||
// oxlint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
// oxlint-disable-next-line typescript/no-non-null-assertion
|
||||
let release: () => void = null!;
|
||||
const nextLock = new Promise<void>(resolve => {
|
||||
release = resolve;
|
||||
|
||||
@@ -35,7 +35,7 @@ export class DocID {
|
||||
return this.variant === DocVariant.Workspace
|
||||
? this.workspace
|
||||
: // sub is always truthy when variant is not workspace
|
||||
// oxlint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
// oxlint-disable-next-line typescript/no-non-null-assertion
|
||||
this.sub!;
|
||||
}
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ function fetchContent(
|
||||
|
||||
if (Array.isArray(content.props.children)) {
|
||||
return content.props.children.map((child, i) => {
|
||||
/* oxlint-disable-next-line eslint-plugin-react/no-array-index-key */
|
||||
/* oxlint-disable-next-line react/no-array-index-key */
|
||||
return <Row key={i}>{child}</Row>;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -351,7 +351,7 @@ export class CopilotTranscriptionResolver {
|
||||
user.id,
|
||||
workspaceId,
|
||||
blobId,
|
||||
// oxlint-disable-next-line @typescript-eslint/await-thenable
|
||||
// oxlint-disable-next-line typescript/await-thenable
|
||||
await Promise.all(allBlobs),
|
||||
input ?? undefined
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user