mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-19 18:39:20 -05:00
chore: more lint cleanup.
This commit is contained in:
@@ -1,28 +1,23 @@
|
||||
{
|
||||
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
||||
"plugins": [
|
||||
"unicorn",
|
||||
"typescript",
|
||||
"oxc"
|
||||
],
|
||||
"plugins": ["unicorn", "typescript", "oxc"],
|
||||
"categories": {
|
||||
"correctness": "error",
|
||||
"perf": "error",
|
||||
"suspicious": "error",
|
||||
"suspicious": "error"
|
||||
},
|
||||
"rules": {
|
||||
"eslint-plugin-unicorn/prefer-array-find": "off",
|
||||
"eslint/no-await-in-loop": "off",
|
||||
"oxc/no-accumulating-spread": "off",
|
||||
"oxc/no-map-spread": "off",
|
||||
"typescript/no-unsafe-type-assertion": "off",
|
||||
"typescript/no-unnecessary-template-expression": "off",
|
||||
"unicorn/consistent-function-scoping": "off",
|
||||
"unicorn/require-post-message-target-origin": "off",
|
||||
"typescript/no-extraneous-class": "off",
|
||||
"oxc/no-async-endpoint-handlers": "off",
|
||||
"eslint/no-new": "off",
|
||||
"eslint/preserve-caught-error": "off",
|
||||
"oxc/no-accumulating-spread": "off",
|
||||
"oxc/no-async-endpoint-handlers": "off",
|
||||
"oxc/no-map-spread": "off",
|
||||
"typescript/no-extraneous-class": "off",
|
||||
"typescript/no-unnecessary-template-expression": "off",
|
||||
"typescript/no-unsafe-type-assertion": "off",
|
||||
"unicorn/consistent-function-scoping": "off",
|
||||
"unicorn/require-post-message-target-origin": "off"
|
||||
},
|
||||
"ignorePatterns": ["src/canvas-host/a2ui/a2ui.bundle.js"]
|
||||
}
|
||||
|
||||
@@ -419,8 +419,10 @@ export async function autoMigrateLegacyStateDir(params: {
|
||||
}
|
||||
} catch (fallbackErr) {
|
||||
try {
|
||||
if (!legacyDir)
|
||||
throw new Error("Legacy state dir not found", { cause: err }, { cause: fallbackErr });
|
||||
if (!legacyDir) {
|
||||
// oxlint-disable-next-line preserve-caught-error
|
||||
throw new Error("Legacy state dir not found", { cause: fallbackErr });
|
||||
}
|
||||
fs.renameSync(targetDir, legacyDir);
|
||||
warnings.push(
|
||||
`State dir migration rolled back (failed to link legacy path): ${String(fallbackErr)}`,
|
||||
|
||||
@@ -181,9 +181,9 @@ export async function createEmbeddingProvider(
|
||||
fallbackReason: reason,
|
||||
};
|
||||
} catch (fallbackErr) {
|
||||
// oxlint-disable-next-line preserve-caught-error
|
||||
throw new Error(
|
||||
`${reason}\n\nFallback to ${fallback} failed: ${formatError(fallbackErr)}`,
|
||||
{ cause: primaryErr },
|
||||
{ cause: fallbackErr },
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user