-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from HighlanderRobotics/ci
Add linting, formatting, and enforce in CI
- Loading branch information
Showing
79 changed files
with
8,485 additions
and
4,790 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Runs lint and checks prettier formatting | ||
|
||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 22 | ||
- run: npm ci | ||
- run: npm run lint | ||
|
||
prettier: | ||
name: Prettier | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 22 | ||
- run: npm ci | ||
- run: npm run format:check | ||
|
||
tsc: | ||
name: TypeScript | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 22 | ||
- run: npm ci | ||
- run: npm run ts:check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"trailingComma": "all", | ||
"tabWidth": 2, | ||
"semi": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,41 @@ | ||
import { Suspense, useCallback } from 'react'; | ||
import { Game } from '../../lib/collection/ui/Game'; | ||
import { ActivityIndicator, Platform } from 'react-native'; | ||
import * as NavigationBar from 'expo-navigation-bar'; | ||
import { Stack, useFocusEffect } from 'expo-router'; | ||
import { Suspense, useCallback } from "react"; | ||
import { Game } from "../../lib/collection/ui/Game"; | ||
import { ActivityIndicator, Platform } from "react-native"; | ||
import * as NavigationBar from "expo-navigation-bar"; | ||
import { Stack, useFocusEffect } from "expo-router"; | ||
|
||
export default function GamePage() { | ||
useFocusEffect(useCallback(() => { | ||
useFocusEffect( | ||
useCallback(() => { | ||
(async () => { | ||
if (Platform.OS === "android") { | ||
await NavigationBar.setVisibilityAsync("hidden"); | ||
} | ||
})(); | ||
|
||
return () => { | ||
(async () => { | ||
if (Platform.OS === "android") { | ||
await NavigationBar.setVisibilityAsync("hidden"); | ||
} | ||
if (Platform.OS === "android") { | ||
await NavigationBar.setVisibilityAsync("visible"); | ||
} | ||
})(); | ||
}; | ||
}, []), | ||
); | ||
|
||
return () => { | ||
(async () => { | ||
if (Platform.OS === "android") { | ||
await NavigationBar.setVisibilityAsync("visible"); | ||
} | ||
})(); | ||
}; | ||
}, [])); | ||
|
||
return ( | ||
<> | ||
<Stack.Screen options={{ orientation: 'landscape', animationDuration: 0, animationTypeForReplace: "push", animation: "flip" }} /> | ||
<Suspense fallback={<ActivityIndicator />}> | ||
<Game /> | ||
</Suspense> | ||
</> | ||
) | ||
return ( | ||
<> | ||
<Stack.Screen | ||
options={{ | ||
orientation: "landscape", | ||
animationDuration: 0, | ||
animationTypeForReplace: "push", | ||
animation: "flip", | ||
}} | ||
/> | ||
<Suspense fallback={<ActivityIndicator />}> | ||
<Game /> | ||
</Suspense> | ||
</> | ||
); | ||
} | ||
|
||
|
Oops, something went wrong.