Skip to content

Commit 2bddc32

Browse files
dfallingclaude
andauthored
Run lint only on PRs, not on main (#1)
* Skip lint on main pushes, keep it on PRs Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Mock react-native-encrypted-storage in Jest Native module isn't registered in the Jest environment, so importing EncryptedStorage threw "RNEncryptedStorage is undefined" and broke the App test suite. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b20a0f2 commit 2bddc32

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
run: bunx tsc --noEmit
2727

2828
- name: Biome (lint + format check)
29+
if: github.event_name == 'pull_request'
2930
run: bun run lint
3031

3132
- name: Test

jest.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
module.exports = {
22
preset: '@react-native/jest-preset',
3+
setupFiles: ['<rootDir>/jest.setup.js'],
34
};

jest.setup.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
jest.mock('react-native-encrypted-storage', () => ({
2+
__esModule: true,
3+
default: {
4+
setItem: jest.fn(() => Promise.resolve()),
5+
getItem: jest.fn(() => Promise.resolve(null)),
6+
removeItem: jest.fn(() => Promise.resolve()),
7+
clear: jest.fn(() => Promise.resolve()),
8+
},
9+
}));

0 commit comments

Comments
 (0)