chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
This commit is contained in:
@@ -27,11 +27,7 @@ export function parseConfigPath(raw: string): {
|
||||
return { ok: true, path: parts };
|
||||
}
|
||||
|
||||
export function setConfigValueAtPath(
|
||||
root: PathNode,
|
||||
path: string[],
|
||||
value: unknown,
|
||||
): void {
|
||||
export function setConfigValueAtPath(root: PathNode, path: string[], value: unknown): void {
|
||||
let cursor: PathNode = root;
|
||||
for (let idx = 0; idx < path.length - 1; idx += 1) {
|
||||
const key = path[idx];
|
||||
@@ -44,10 +40,7 @@ export function setConfigValueAtPath(
|
||||
cursor[path[path.length - 1]] = value;
|
||||
}
|
||||
|
||||
export function unsetConfigValueAtPath(
|
||||
root: PathNode,
|
||||
path: string[],
|
||||
): boolean {
|
||||
export function unsetConfigValueAtPath(root: PathNode, path: string[]): boolean {
|
||||
const stack: Array<{ node: PathNode; key: string }> = [];
|
||||
let cursor: PathNode = root;
|
||||
for (let idx = 0; idx < path.length - 1; idx += 1) {
|
||||
|
||||
Reference in New Issue
Block a user