chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
@@ -44,10 +44,7 @@ export class ConfigIncludeError extends Error {
|
||||
|
||||
export class CircularIncludeError extends ConfigIncludeError {
|
||||
constructor(public readonly chain: string[]) {
|
||||
super(
|
||||
`Circular include detected: ${chain.join(" -> ")}`,
|
||||
chain[chain.length - 1],
|
||||
);
|
||||
super(`Circular include detected: ${chain.join(" -> ")}`, chain[chain.length - 1]);
|
||||
this.name = "CircularIncludeError";
|
||||
}
|
||||
}
|
||||
@@ -73,8 +70,7 @@ export function deepMerge(target: unknown, source: unknown): unknown {
|
||||
if (isPlainObject(target) && isPlainObject(source)) {
|
||||
const result: Record<string, unknown> = { ...target };
|
||||
for (const key of Object.keys(source)) {
|
||||
result[key] =
|
||||
key in result ? deepMerge(result[key], source[key]) : source[key];
|
||||
result[key] = key in result ? deepMerge(result[key], source[key]) : source[key];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -213,11 +209,7 @@ class IncludeProcessor {
|
||||
}
|
||||
}
|
||||
|
||||
private parseFile(
|
||||
includePath: string,
|
||||
resolvedPath: string,
|
||||
raw: string,
|
||||
): unknown {
|
||||
private parseFile(includePath: string, resolvedPath: string, raw: string): unknown {
|
||||
try {
|
||||
return this.resolver.parseJson(raw);
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user