aboutsummaryrefslogtreecommitdiffstats
path: root/apps/mobile
diff options
context:
space:
mode:
authorxuatz <xzlow10@gmail.com>2025-06-22 20:29:30 +0900
committerGitHub <noreply@github.com>2025-06-22 12:29:30 +0100
commitd5e2973dce617f451e4eb07491b3a6874ea6ca47 (patch)
tree9e134ac8c0b263cec755068082ca61c9646efd21 /apps/mobile
parent91a9d3c1aee04d77b2a2d022821f4a7a38e315f3 (diff)
downloadkarakeep-d5e2973dce617f451e4eb07491b3a6874ea6ca47.tar.zst
chore: migrate away from eslint to oxlint (#1642)
* chore: migrate away from eslint to oxlint * revert turbo task name lint * it seems like we can remove the seemingly default globals
Diffstat (limited to 'apps/mobile')
-rw-r--r--apps/mobile/.oxlintrc.json39
-rw-r--r--apps/mobile/app/dashboard/bookmarks/new.tsx2
-rw-r--r--apps/mobile/components/bookmarks/BookmarkCard.tsx2
-rw-r--r--apps/mobile/package.json20
4 files changed, 43 insertions, 20 deletions
diff --git a/apps/mobile/.oxlintrc.json b/apps/mobile/.oxlintrc.json
new file mode 100644
index 00000000..dc4ad1e1
--- /dev/null
+++ b/apps/mobile/.oxlintrc.json
@@ -0,0 +1,39 @@
+{
+ "$schema": "../../node_modules/oxlint/configuration_schema.json",
+ "extends": [
+ "../../tooling/oxlint/oxlint-base.json",
+ "../../tooling/oxlint/oxlint-react.json"
+ ],
+ "categories": {
+ "correctness": "warn"
+ },
+ "env": {
+ "builtin": true,
+ "commonjs": true,
+ "browser": true,
+ "es2022": true,
+ "node": true
+ },
+ "globals": {
+ "React": "writeable"
+ },
+ "settings": {
+ "react": {
+ "version": "detect"
+ }
+ },
+ "ignorePatterns": [
+ "**/*.config.js",
+ "**/*.config.cjs",
+ "**/.eslintrc.cjs",
+ "tailwind.config.ts",
+ ".next",
+ "dist",
+ "build",
+ "pnpm-lock.yaml",
+ "expo-plugins/**",
+ "ios/**",
+ "android/**",
+ "plugins/**"
+ ]
+}
diff --git a/apps/mobile/app/dashboard/bookmarks/new.tsx b/apps/mobile/app/dashboard/bookmarks/new.tsx
index e821555a..d24c1597 100644
--- a/apps/mobile/app/dashboard/bookmarks/new.tsx
+++ b/apps/mobile/app/dashboard/bookmarks/new.tsx
@@ -48,7 +48,7 @@ const NoteEditorPage = () => {
throw new Error(`Unsupported URL protocol: ${url.protocol}`);
}
createBookmark({ type: BookmarkTypes.LINK, url: data });
- } catch (e: unknown) {
+ } catch {
createBookmark({ type: BookmarkTypes.TEXT, text: data });
}
};
diff --git a/apps/mobile/components/bookmarks/BookmarkCard.tsx b/apps/mobile/components/bookmarks/BookmarkCard.tsx
index 5b118f43..52d39c5c 100644
--- a/apps/mobile/components/bookmarks/BookmarkCard.tsx
+++ b/apps/mobile/components/bookmarks/BookmarkCard.tsx
@@ -224,7 +224,7 @@ function LinkCard({
} else {
imageComp = (
<Image
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
+ // oxlint-disable-next-line no-require-imports
source={require("@/assets/blur.jpeg")}
className="h-56 w-full rounded-t-lg"
/>
diff --git a/apps/mobile/package.json b/apps/mobile/package.json
index 426df353..f60b77a3 100644
--- a/apps/mobile/package.json
+++ b/apps/mobile/package.json
@@ -10,8 +10,8 @@
"web": "expo start --web",
"format": "prettier .",
"format:fix": "prettier . --write",
- "lint": "eslint .",
- "lint:fix": "eslint . --fix",
+ "lint": "oxlint .",
+ "lint:fix": "oxlint . --fix",
"typecheck": "tsc --noEmit"
},
"dependencies": {
@@ -61,31 +61,15 @@
},
"devDependencies": {
"@babel/core": "~7.26.0",
- "@karakeep/eslint-config": "workspace:^0.2.0",
"@karakeep/prettier-config": "workspace:^0.1.0",
"@karakeep/tailwind-config": "workspace:^0.1.0",
"@karakeep/tsconfig": "workspace:^0.1.0",
"@types/react": "^18.3.12",
"ajv": "latest",
- "eslint": "^8.57.0",
- "eslint-config-universe": "^12.0.0",
"prettier": "^3.4.2",
"tailwindcss": "^3.4.1",
"typescript": "^5.7.3"
},
"private": true,
- "eslintConfig": {
- "root": true,
- "extends": [
- "@karakeep/eslint-config/base",
- "@karakeep/eslint-config/react"
- ],
- "ignorePatterns": [
- "expo-plugins/**",
- "ios/**",
- "android/**",
- "plugins/**"
- ]
- },
"prettier": "@karakeep/prettier-config"
}