Skip to content

Commit

Permalink
fix: Code formatting issues (#8)
Browse files Browse the repository at this point in the history
* Fix formatting issues

* Improve code quality checking github action
  • Loading branch information
MatiPl01 authored Jul 26, 2024
1 parent 3777579 commit 5d05fc0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 18 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'yarn'

- name: 📦 Install dependencies
run: yarn install --frozen-lockfile
run: yarn install --immutable

- name: 🔎 Run typecheck
run: yarn typecheck
Expand Down
5 changes: 1 addition & 4 deletions example/app/src/examples/AnimatedInterval.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ import Animated, {
withSpring
} from 'react-native-reanimated';
import type { AnimatedIntervalID } from 'reanimated-utils';
import {
clearAnimatedInterval,
setAnimatedInterval
} from 'reanimated-utils';
import { clearAnimatedInterval, setAnimatedInterval } from 'reanimated-utils';

export default function AnimatedIntervalExample() {
const scale = useSharedValue(1);
Expand Down
5 changes: 1 addition & 4 deletions example/app/src/examples/AnimatedTimeout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ import Animated, {
withSpring,
withTiming
} from 'react-native-reanimated';
import {
clearAnimatedTimeout,
setAnimatedTimeout
} from 'reanimated-utils';
import { clearAnimatedTimeout, setAnimatedTimeout } from 'reanimated-utils';

export default function AnimatedTimeoutExample() {

Check warning on line 13 in example/app/src/examples/AnimatedTimeout.tsx

View workflow job for this annotation

GitHub Actions / 🔍 Code Quality Checks

exported declaration 'default' not used within other modules
const counter = useSharedValue(0);
Expand Down
4 changes: 1 addition & 3 deletions example/app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
"baseUrl": ".",
"paths": {
"@/*": ["src/*"],
"reanimated-utils": [
"../../packages/reanimated-utils/src"
]
"reanimated-utils": ["../../packages/reanimated-utils/src"]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,7 @@ function traverseObject<V>(obj: V, callback: (value: any) => boolean): void {
const traverse = (value: any, depth: number) => {
'worklet';
if (depth > MAX_TRAVERSE_DEPTH) {
throw new Error(
'[reanimated-utils] traverseObject: Max depth reached'
);
throw new Error('[reanimated-utils] traverseObject: Max depth reached');
}

// stop traversing if callback returns false
Expand Down Expand Up @@ -188,9 +186,7 @@ function traverseWithDepthCheck<V>(
): any {
'worklet';
if (depth > MAX_TRAVERSE_DEPTH) {
throw new Error(
'[reanimated-utils] traverse: Max depth reached'
);
throw new Error('[reanimated-utils] traverse: Max depth reached');
}

const schemaType = resolveSchemaType(schemaValue);
Expand Down

0 comments on commit 5d05fc0

Please sign in to comment.