Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions apps/mobile/.oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,12 @@
"no-literal-copy/no-literal-copy": "error"
},
"overrides": [
{
"files": ["src/components/ui/icons.test.ts"],
"rules": {
"import/no-nodejs-modules": "off"
}
},
{
"files": ["src/lib/expo-router-linking.mounted.test.tsx"],
"rules": {
Expand Down
12 changes: 12 additions & 0 deletions apps/mobile/src/components/ui/icons.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { existsSync, readFileSync } from 'node:fs';

import { expect, it } from 'vitest';

it('uses Lucide icon subpaths with runtime files', () => {
const source = readFileSync(new URL('icons.ts', import.meta.url), 'utf8');
const imports = source.match(/(?<=from ')lucide-react-native\/icons\/[^']+/g) ?? [];

expect(imports.length).toBeGreaterThan(0);
const missing = imports.filter(specifier => !existsSync(new URL(import.meta.resolve(specifier))));
expect(missing).toEqual([]);
});
4 changes: 2 additions & 2 deletions apps/mobile/src/components/ui/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export { default as GitPullRequestClosed } from 'lucide-react-native/icons/git-p
export { default as GitPullRequestDraft } from 'lucide-react-native/icons/git-pull-request-draft';
export { default as Globe } from 'lucide-react-native/icons/globe';
export { default as HelpCircle } from 'lucide-react-native/icons/circle-question-mark';
export { default as History } from 'lucide-react-native/icons/history';
export { default as History } from 'lucide-react-native/icons/rotate-ccw-clock';
export { default as House } from 'lucide-react-native/icons/house';
export { default as ImageOff } from 'lucide-react-native/icons/image-off';
export { default as Inbox } from 'lucide-react-native/icons/inbox';
Expand Down Expand Up @@ -139,7 +139,7 @@ export { default as ShieldOff } from 'lucide-react-native/icons/shield-off';
export { default as Shuffle } from 'lucide-react-native/icons/shuffle';
export { default as SlidersHorizontal } from 'lucide-react-native/icons/sliders-horizontal';
export { default as Smartphone } from 'lucide-react-native/icons/smartphone';
export { default as SmilePlus } from 'lucide-react-native/icons/smile-plus';
export { default as SmilePlus } from 'lucide-react-native/icons/face-slightly-smiling-plus';
export { default as Sparkles } from 'lucide-react-native/icons/sparkles';
export { default as Square } from 'lucide-react-native/icons/square';
export { default as Star } from 'lucide-react-native/icons/star';
Expand Down