Skip to content

Commit 4e644fd

Browse files
committed
chore:format
1 parent 30fd505 commit 4e644fd

30 files changed

Lines changed: 8881 additions & 4872 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ body:
6161
- type: input
6262
id: reproducible-example
6363
attributes:
64-
label: Reproducible example repository
64+
label: Reproducible example repository
6565
description: Please provide a link to a repository on GitHub with a reproducible example.
6666
validations:
6767
required: true

.watchmanconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{}
1+
{}

CODE_OF_CONDUCT.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Contributor Covenant Code of Conduct
32

43
## Our Pledge
@@ -18,23 +17,23 @@ diverse, inclusive, and healthy community.
1817
Examples of behavior that contributes to a positive environment for our
1918
community include:
2019

21-
* Demonstrating empathy and kindness toward other people
22-
* Being respectful of differing opinions, viewpoints, and experiences
23-
* Giving and gracefully accepting constructive feedback
24-
* Accepting responsibility and apologizing to those affected by our mistakes,
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
2524
and learning from the experience
26-
* Focusing on what is best not just for us as individuals, but for the overall
25+
- Focusing on what is best not just for us as individuals, but for the overall
2726
community
2827

2928
Examples of unacceptable behavior include:
3029

31-
* The use of sexualized language or imagery, and sexual attention or advances of
30+
- The use of sexualized language or imagery, and sexual attention or advances of
3231
any kind
33-
* Trolling, insulting or derogatory comments, and personal or political attacks
34-
* Public or private harassment
35-
* Publishing others' private information, such as a physical or email address,
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email address,
3635
without their explicit permission
37-
* Other conduct which could reasonably be considered inappropriate in a
36+
- Other conduct which could reasonably be considered inappropriate in a
3837
professional setting
3938

4039
## Enforcement Responsibilities

README.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,10 @@ export default function RootLayout() {
7171
### Example (Expo Router)
7272

7373
```js
74-
import { useDetourContext } from '@swmansion/react-native-detour';
75-
import * as SplashScreen from 'expo-splash-screen';
76-
import { Stack, usePathname, useRouter } from 'expo-router';
74+
import { Stack, usePathname, useRouter } from "expo-router";
75+
import * as SplashScreen from "expo-splash-screen";
76+
77+
import { useDetourContext } from "@swmansion/react-native-detour";
7778

7879
SplashScreen.preventAutoHideAsync();
7980

@@ -111,11 +112,11 @@ Learn more about usage from our [docs](https://docs.swmansion.com/detour/docs/SD
111112

112113
Use `linkProcessingMode` to control which link sources the SDK listens to:
113114

114-
|Value|Universal/App links|Deferred links|Custom scheme links|
115-
|---|---|---|---|
116-
|`'all'` (default)||||
117-
|`'web-only'`||||
118-
|`'deferred-only'`||||
115+
| Value | Universal/App links | Deferred links | Custom scheme links |
116+
| ----------------- | ------------------- | -------------- | ------------------- |
117+
| `'all'` (default) ||||
118+
| `'web-only'` ||||
119+
| `'deferred-only'` ||||
119120

120121
```js
121122
const config: Config = {
@@ -133,14 +134,14 @@ Use `'deferred-only'` when Expo Router's `+native-intent.tsx` handler is already
133134

134135
All example apps with Detour SDK integrated live in `examples/`:
135136

136-
| Example | Description |
137-
|---|---|
138-
| `examples/expo-router` | Minimal Expo Router example (recommended starting point) |
139-
| `examples/expo-router-native-intent` | Expo Router with `+native-intent` handler |
140-
| `examples/expo-router-advanced` | Expo Router with auth flow and protected routes |
141-
| `examples/expo-bare` | Expo without file-based routing (plain `index.js` entry point) |
142-
| `examples/react-navigation` | React Navigation example |
143-
| `examples/react-navigation-advanced` | React Navigation with auth flow |
137+
| Example | Description |
138+
| ------------------------------------ | -------------------------------------------------------------- |
139+
| `examples/expo-router` | Minimal Expo Router example (recommended starting point) |
140+
| `examples/expo-router-native-intent` | Expo Router with `+native-intent` handler |
141+
| `examples/expo-router-advanced` | Expo Router with auth flow and protected routes |
142+
| `examples/expo-bare` | Expo without file-based routing (plain `index.js` entry point) |
143+
| `examples/react-navigation` | React Navigation example |
144+
| `examples/react-navigation-advanced` | React Navigation with auth flow |
144145

145146
The monorepo uses **pnpm workspaces**. Start by installing all dependencies from the repo root:
146147

@@ -286,4 +287,4 @@ This library is licensed under [The MIT License](./LICENSE).
286287

287288
Since 2012, [Software Mansion](https://swmansion.com) is a software agency with experience in building web and mobile apps. We are Core React Native Contributors and experts in dealing with all kinds of React Native issues. We can help you build your next dream product – [Hire us](https://swmansion.com/contact/projects?utm_source=detour&utm_medium=readme).
288289

289-
[![swm](https://logo.swmansion.com/logo?color=white&variant=desktop&width=150&tag=react-native-executorch-github 'Software Mansion')](https://swmansion.com)
290+
[![swm](https://logo.swmansion.com/logo?color=white&variant=desktop&width=150&tag=react-native-executorch-github "Software Mansion")](https://swmansion.com)

eslint.config.mjs

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { fixupConfigRules } from '@eslint/compat';
2-
import { FlatCompat } from '@eslint/eslintrc';
3-
import js from '@eslint/js';
4-
import prettier from 'eslint-plugin-prettier';
5-
import { defineConfig } from 'eslint/config';
6-
import path from 'node:path';
7-
import { fileURLToPath } from 'node:url';
1+
import { fixupConfigRules } from "@eslint/compat";
2+
import { FlatCompat } from "@eslint/eslintrc";
3+
import js from "@eslint/js";
4+
import prettier from "eslint-plugin-prettier";
5+
import { defineConfig } from "eslint/config";
6+
import path from "node:path";
7+
import { fileURLToPath } from "node:url";
88

99
const __filename = fileURLToPath(import.meta.url);
1010
const __dirname = path.dirname(__filename);
@@ -16,43 +16,43 @@ const compat = new FlatCompat({
1616

1717
export default defineConfig([
1818
{
19-
extends: fixupConfigRules(compat.extends('@react-native', 'prettier')),
19+
extends: fixupConfigRules(compat.extends("@react-native", "prettier")),
2020
plugins: { prettier },
2121
languageOptions: {
2222
parserOptions: {
2323
requireConfigFile: false,
2424
babelOptions: {
25-
presets: ['@babel/preset-env', '@babel/preset-react'],
25+
presets: ["@babel/preset-env", "@babel/preset-react"],
2626
},
2727
},
2828
},
2929
rules: {
30-
'prettier/prettier': 'error',
31-
'react/react-in-jsx-scope': 'off',
32-
'react/jsx-uses-react': 'off',
33-
'react/jsx-boolean-value': 'error',
34-
'react/jsx-curly-brace-presence': 'error',
35-
'react-hooks/rules-of-hooks': 'error',
36-
'react-hooks/exhaustive-deps': 'off',
37-
'react-native/no-inline-styles': 'off',
38-
'no-nested-ternary': 'error',
39-
'object-shorthand': 'warn',
30+
"prettier/prettier": "error",
31+
"react/react-in-jsx-scope": "off",
32+
"react/jsx-uses-react": "off",
33+
"react/jsx-boolean-value": "error",
34+
"react/jsx-curly-brace-presence": "error",
35+
"react-hooks/rules-of-hooks": "error",
36+
"react-hooks/exhaustive-deps": "off",
37+
"react-native/no-inline-styles": "off",
38+
"no-nested-ternary": "error",
39+
"object-shorthand": "warn",
4040
},
4141
},
4242
{
4343
ignores: [
44-
'**/node_modules/**',
45-
'.git/**',
46-
'eslint.config.mjs',
47-
'lib/**',
48-
'packages/**/lib/**',
49-
'coverage/**',
50-
'.expo/**',
51-
'examples/**/android/**',
52-
'examples/**/ios/**',
53-
'examples/**/.expo/**',
54-
'examples/**/dist/**',
55-
'examples/**/build/**',
44+
"**/node_modules/**",
45+
".git/**",
46+
"eslint.config.mjs",
47+
"lib/**",
48+
"packages/**/lib/**",
49+
"coverage/**",
50+
".expo/**",
51+
"examples/**/android/**",
52+
"examples/**/ios/**",
53+
"examples/**/.expo/**",
54+
"examples/**/dist/**",
55+
"examples/**/build/**",
5656
],
5757
},
5858
]);

examples/expo-bare/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ If you need more complex routing flows with a specific navigation library, check
2323

2424
## Test flow
2525

26-
1) Start the app on iOS/Android.
27-
2) Confirm the app renders and `isLinkProcessed` is `false`.
28-
3) Trigger a Detour link.
29-
4) Confirm `isLinkProcessed` flips to `true` and `type`, `url`, and `route` fields are populated on screen.
26+
1. Start the app on iOS/Android.
27+
2. Confirm the app renders and `isLinkProcessed` is `false`.
28+
3. Trigger a Detour link.
29+
4. Confirm `isLinkProcessed` flips to `true` and `type`, `url`, and `route` fields are populated on screen.
3030

3131
## Configuring app.json
3232

examples/expo-bare/app.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
"bundleIdentifier": "detourreactnative.expobare",
1212
"supportsTablet": true,
1313
"icon": "./assets/detour-logo.png",
14-
"associatedDomains": [
15-
"applinks:<your-org>.godetour.link"
16-
]
14+
"associatedDomains": ["applinks:<your-org>.godetour.link"]
1715
},
1816
"android": {
1917
"package": "detourreactnative.expobare",

examples/expo-router-advanced/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ This example uses `src/app/+native-intent.tsx` to:
2121

2222
## Test flow
2323

24-
1) Start the app on iOS/Android.
25-
2) You land on `/` (signed out).
26-
3) Trigger a Detour universal link to `/details` (or any route) while signed out.
24+
1. Start the app on iOS/Android.
25+
2. You land on `/` (signed out).
26+
3. Trigger a Detour universal link to `/details` (or any route) while signed out.
2727
- The link is captured, context is cleared, and the app stays on `/`.
2828
- You should see the pending route displayed on the screen.
29-
4) Tap **Sign in**.
30-
5) The app should now redirect to the deep link route.
31-
6) Return to `/home` - the link should NOT trigger again.
29+
4. Tap **Sign in**.
30+
5. The app should now redirect to the deep link route.
31+
6. Return to `/home` - the link should NOT trigger again.
3232

3333
Optional custom scheme test:
3434

examples/expo-router-advanced/src/app/(app)/(tabs)/_layout.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { Ionicons } from "@expo/vector-icons";
21
import { Tabs } from "expo-router";
32

3+
import { Ionicons } from "@expo/vector-icons";
4+
45
import { colors } from "../../../styles";
56

67
const tabBarOptions = {
@@ -23,7 +24,10 @@ export default function TabsLayout() {
2324
<Tabs screenOptions={tabBarOptions}>
2425
<Tabs.Screen name="index" options={{ title: "Home", tabBarIcon: tabIcon("home") }} />
2526
<Tabs.Screen name="explore" options={{ title: "Explore", tabBarIcon: tabIcon("compass") }} />
26-
<Tabs.Screen name="settings" options={{ title: "Settings", tabBarIcon: tabIcon("settings") }} />
27+
<Tabs.Screen
28+
name="settings"
29+
options={{ title: "Settings", tabBarIcon: tabIcon("settings") }}
30+
/>
2731
</Tabs>
2832
);
2933
}

examples/expo-router-advanced/src/app/(app)/(tabs)/explore.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export default function ExploreScreen() {
3131

3232
<Text style={styles.sectionHeader}>Custom Scheme</Text>
3333
<Text style={styles.bullet}>
34-
This example also handles custom scheme links alongside Detour. Opening a non-Detour
35-
URL redirects to the Third-party screen. Test with the simulator:
34+
This example also handles custom scheme links alongside Detour. Opening a non-Detour URL
35+
redirects to the Third-party screen. Test with the simulator:
3636
</Text>
3737
<Text style={styles.code}>
3838
npx uri-scheme open {`"detour-expo-router-advanced://app"`} --ios

0 commit comments

Comments
 (0)