Skip to content

Commit

Permalink
test to make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinoooo committed Jul 13, 2024
1 parent 877074c commit 9b698c3
Showing 1 changed file with 21 additions and 24 deletions.
45 changes: 21 additions & 24 deletions src/util/prop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,18 @@ export const makePropWatcher = <T, E>(
propertyPath: string,
newPlainObjectFunction: () => E & { dispose?: () => void },
watchOptions: WatchOptions = {},
) =>
watch(propGetter, (newValue) => {
if (!target.value) { return }
) => watch(propGetter, (newValue) => {
if (!target.value) { return }

Check failure on line 23 in src/util/prop.ts

View workflow job for this annotation

GitHub Actions / Lint (20)

Expected indentation of 2 spaces but found 4

if (newValue === undefined) {
const plainObject = newPlainObjectFunction()
if (newValue === undefined) {

Check failure on line 25 in src/util/prop.ts

View workflow job for this annotation

GitHub Actions / Lint (20)

Expected indentation of 2 spaces but found 4
const plainObject = newPlainObjectFunction()

Check failure on line 26 in src/util/prop.ts

View workflow job for this annotation

GitHub Actions / Lint (20)

Expected indentation of 4 spaces but found 6

set(target.value, propertyPath, get(plainObject, propertyPath))
set(target.value, propertyPath, get(plainObject, propertyPath))

Check failure on line 28 in src/util/prop.ts

View workflow job for this annotation

GitHub Actions / Lint (20)

Expected indentation of 4 spaces but found 6

plainObject.dispose?.()
}
else { set(target.value, propertyPath, propGetter()) }
}, watchOptions)
plainObject.dispose?.()

Check failure on line 30 in src/util/prop.ts

View workflow job for this annotation

GitHub Actions / Lint (20)

Expected indentation of 4 spaces but found 6
}

Check failure on line 31 in src/util/prop.ts

View workflow job for this annotation

GitHub Actions / Lint (20)

Expected indentation of 2 spaces but found 4
else { set(target.value, propertyPath, propGetter()) }

Check failure on line 32 in src/util/prop.ts

View workflow job for this annotation

GitHub Actions / Lint (20)

Expected indentation of 2 spaces but found 4
}, watchOptions)

Check failure on line 33 in src/util/prop.ts

View workflow job for this annotation

GitHub Actions / Lint (20)

Expected indentation of 0 spaces but found 2

/**
* Creates multiple prop watchers for monitoring changes to multiple properties and updating a target object.
Expand All @@ -46,13 +45,12 @@ export const makePropWatchers = <E>(
propGettersAndPropertyPaths: (string | (() => any))[][],
target: Ref<E>,
newPlainObjectFunction: () => E & { dispose?: () => void },
) =>
propGettersAndPropertyPaths.map(([propGetterFn, path]) => makePropWatcher(
propGetterFn as () => any,
target,
path as string,
newPlainObjectFunction,
))
) => propGettersAndPropertyPaths.map(([propGetterFn, path]) => makePropWatcher(
propGetterFn as () => any,

Check failure on line 49 in src/util/prop.ts

View workflow job for this annotation

GitHub Actions / Lint (20)

Expected indentation of 2 spaces but found 4
target,
path as string,
newPlainObjectFunction,
))

/**
* Creates multiple prop watchers via the props object for monitoring changes to multiple properties and updating a target object.
Expand All @@ -66,10 +64,9 @@ export const makePropWatchersUsingAllProps = <E>(
props: { [key: string]: any },
target: Ref<E>,
newPlainObjectFunction: () => E & { dispose?: () => void },
) =>
Object.keys(props).map(key => makePropWatcher(
() => props[key],
target,
key,
newPlainObjectFunction,
))
) => Object.keys(props).map(key => makePropWatcher(
() => props[key],
target,
key,
newPlainObjectFunction,
))

0 comments on commit 9b698c3

Please sign in to comment.