Skip to content

Commit f5e1b28

Browse files
chore: eslint->oxlint, prettier->oxfmt
1 parent 9a7aeba commit f5e1b28

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+725
-3060
lines changed

.oxfmtrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"ignorePatterns": [
3+
"routeTree.gen.ts"
4+
]
5+
}

.oxlintrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"$schema": "./tooling/oxlint/node_modules/oxlint/configuration_schema.json",
3+
"extends": ["./tooling/oxlint/base.json"],
4+
"ignorePatterns": ["turbo/generators/**"]
5+
}

.vscode/extensions.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"recommendations": [
3-
"dbaeumer.vscode-eslint",
43
"expo.vscode-expo-tools",
5-
"esbenp.prettier-vscode",
4+
"oxc.oxc-vscode",
65
"yoavbls.pretty-ts-errors",
76
"bradlc.vscode-tailwindcss"
87
]

.vscode/settings.json

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
{
22
"editor.codeActionsOnSave": {
3-
"source.fixAll.eslint": "explicit"
3+
"source.fixAll.oxc": "explicit"
44
},
5-
"editor.defaultFormatter": "esbenp.prettier-vscode",
5+
"oxc.fmt.experimental": true,
6+
"oxc.unusedDisableDirectives": "deny",
7+
"oxc.typeAware": true,
8+
"editor.defaultFormatter": "oxc.oxc-vscode",
69
"[typescript,typescriptreact]": {
7-
"editor.defaultFormatter": "esbenp.prettier-vscode"
10+
"editor.defaultFormatter": "oxc.oxc-vscode"
811
},
912
"editor.formatOnSave": true,
10-
"eslint.rules.customizations": [{ "rule": "*", "severity": "warn" }],
11-
"eslint.runtime": "node",
12-
"eslint.workingDirectories": [
13-
{ "pattern": "apps/*/" },
14-
{ "pattern": "packages/*/" },
15-
{ "pattern": "tooling/*/" }
16-
],
1713
"files.associations": {
1814
"*.css": "tailwindcss"
1915
},
@@ -23,7 +19,6 @@
2319
"files.watcherExclude": {
2420
"**/routeTree.gen.ts": true
2521
},
26-
"prettier.ignorePath": ".gitignore",
2722
"tailwindCSS.classFunctions": ["cva", "cx", "cn"],
2823
"typescript.enablePromptUseWorkspaceTsdk": true,
2924
"typescript.preferences.autoImportFileExcludePatterns": [

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,8 @@ packages
5959
└─ ui
6060
└─ Start of a UI package for the webapp using shadcn-ui
6161
tooling
62-
├─ eslint
63-
│ └─ shared, fine-grained, eslint presets
64-
├─ prettier
65-
│ └─ shared prettier configuration
62+
├─ oxlint
63+
│ └─ shared, fine-grained, oxlint presets
6664
├─ tailwind
6765
│ └─ shared tailwind theme and configuration
6866
└─ typescript

apps/expo/.oxlintrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": [
3+
"./node_modules/@acme/oxlint-config/base.json",
4+
"./node_modules/@acme/oxlint-config/react.json"
5+
],
6+
"ignorePatterns": ["*.config.js"]
7+
}

apps/expo/eslint.config.mts

Lines changed: 0 additions & 12 deletions
This file was deleted.

apps/expo/package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
"dev:ios": "expo start --ios",
1010
"android": "expo run:android",
1111
"ios": "expo run:ios",
12-
"format": "prettier --check . --ignore-path ../../.gitignore --ignore-path .prettierignore",
13-
"lint": "eslint --flag unstable_native_nodejs_ts_config",
1412
"typecheck": "tsc --noEmit"
1513
},
1614
"dependencies": {
@@ -45,15 +43,11 @@
4543
},
4644
"devDependencies": {
4745
"@acme/api": "workspace:*",
48-
"@acme/eslint-config": "workspace:*",
49-
"@acme/prettier-config": "workspace:*",
46+
"@acme/oxlint-config": "workspace:*",
5047
"@acme/tailwind-config": "workspace:*",
5148
"@acme/tsconfig": "workspace:*",
5249
"@types/react": "catalog:react19",
53-
"eslint": "catalog:",
54-
"prettier": "catalog:",
5550
"tailwindcss": "catalog:",
5651
"typescript": "catalog:"
57-
},
58-
"prettier": "@acme/prettier-config"
52+
}
5953
}

apps/expo/postcss.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
// oxlint-disable no-require-imports
12
module.exports = require("@acme/tailwind-config/postcss-config");

apps/expo/src/app/index.tsx

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useState } from "react";
1+
import { useState, useTransition } from "react";
22
import { Pressable, Text, TextInput, View } from "react-native";
33
import { SafeAreaView } from "react-native-safe-area-context";
44
import { Link, Stack } from "expo-router";
@@ -51,7 +51,7 @@ function CreatePost() {
5151
setContent("");
5252
await queryClient.invalidateQueries(trpc.post.all.queryFilter());
5353
},
54-
}),
54+
})
5555
);
5656

5757
return (
@@ -101,21 +101,29 @@ function CreatePost() {
101101
function MobileAuth() {
102102
const { data: session } = authClient.useSession();
103103

104+
const [isPending, startTransition] = useTransition();
105+
const onPress = () => {
106+
startTransition(async () => {
107+
if (session) {
108+
await authClient.signOut();
109+
} else {
110+
await authClient.signIn.social({
111+
provider: "discord",
112+
callbackURL: "/",
113+
});
114+
}
115+
});
116+
};
117+
104118
return (
105119
<>
106120
<Text className="text-foreground pb-2 text-center text-xl font-semibold">
107121
{session?.user.name ? `Hello, ${session.user.name}` : "Not logged in"}
108122
</Text>
109123
<Pressable
110-
onPress={() =>
111-
session
112-
? authClient.signOut()
113-
: authClient.signIn.social({
114-
provider: "discord",
115-
callbackURL: "/",
116-
})
117-
}
118124
className="bg-primary flex items-center rounded-sm p-2"
125+
disabled={isPending}
126+
onPress={onPress}
119127
>
120128
<Text>{session ? "Sign Out" : "Sign In With Discord"}</Text>
121129
</Pressable>
@@ -132,7 +140,7 @@ export default function Index() {
132140
trpc.post.delete.mutationOptions({
133141
onSettled: () =>
134142
queryClient.invalidateQueries(trpc.post.all.queryFilter()),
135-
}),
143+
})
136144
);
137145

138146
return (

0 commit comments

Comments
 (0)