Skip to content

Commit 478bafb

Browse files
committed
Merge branch 'main' into organise-react-native-patches
2 parents 9968701 + 4668539 commit 478bafb

1,793 files changed

Lines changed: 135657 additions & 39353 deletions

File tree

Some content is hidden

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

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ FB_APP_ID=YOUR_APP_ID
3838
FB_PROJECT_ID=YOUR_PROJECT_ID
3939

4040
GITHUB_TOKEN=YOUR_TOKEN
41+
OPENAI_API_KEY=YOUR_TOKEN

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ web/gtm.js
1414
src/libs/SearchParser/searchParser.js
1515
src/libs/SearchParser/autocompleteParser.js
1616
help/_scripts/**
17+
modules/ExpensifyNitroUtils/nitrogen/**
1718
Mobile-Expensify/**
1819
vendor

.eslintrc.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,24 @@ const restrictedImportPaths = [
8787
importNames: ['memoize'],
8888
message: "Please use '@src/libs/memoize' instead.",
8989
},
90+
{
91+
name: 'lodash/isEqual',
92+
message: "Please use 'deepEqual' from 'fast-equals' instead.",
93+
},
94+
{
95+
name: 'lodash',
96+
importNames: ['isEqual'],
97+
message: "Please use 'deepEqual' from 'fast-equals' instead.",
98+
},
9099
{
91100
name: 'react-native-animatable',
92101
message: "Please use 'react-native-reanimated' instead.",
93102
},
103+
{
104+
name: 'react-native-onyx',
105+
importNames: ['useOnyx'],
106+
message: "Please use '@hooks/useOnyx' instead.",
107+
},
94108
];
95109

96110
const restrictedImportPatterns = [
@@ -216,6 +230,7 @@ module.exports = {
216230
'rulesdir/no-multiple-onyx-in-file': 'off',
217231
'rulesdir/prefer-underscore-method': 'off',
218232
'rulesdir/prefer-import-module-contents': 'off',
233+
'rulesdir/no-beta-handler': 'error',
219234

220235
// React and React Native specific rules
221236
'react-native-a11y/has-accessibility-hint': ['off'],
@@ -262,6 +277,14 @@ module.exports = {
262277
property: 'isHybridApp',
263278
message: 'Use CONFIG.IS_HYBRID_APP instead.',
264279
},
280+
// Prevent direct use of HybridAppModule.closeReactNativeApp().
281+
// Instead, use the `closeReactNativeApp` action from `@userActions/HybridApp`,
282+
// which correctly updates `hybridApp.closingReactNativeApp` when closing NewDot
283+
{
284+
object: 'HybridAppModule',
285+
property: 'closeReactNativeApp',
286+
message: 'Use `closeReactNativeApp` from `@userActions/HybridApp` instead.',
287+
},
265288
],
266289
'no-restricted-imports': [
267290
'error',
@@ -292,6 +315,7 @@ module.exports = {
292315
'@libs': './src/libs',
293316
'@navigation': './src/libs/Navigation',
294317
'@pages': './src/pages',
318+
'@prompts': './prompts',
295319
'@styles': './src/styles',
296320
// This path is provide alias for files like `ONYXKEYS` and `CONST`.
297321
'@src': './src',

.github/.eslintrc.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ module.exports = {
77
'no-await-in-loop': 'off',
88
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'],
99
'no-continue': 'off',
10-
'no-restricted-imports': 'off',
10+
'no-restricted-imports': [
11+
'error',
12+
{
13+
patterns: [
14+
{
15+
group: ['@src/**'],
16+
message: 'Do not import files from src/ directory as they can break the GH Actions build script.',
17+
},
18+
],
19+
},
20+
],
1121
},
1222
};
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Patch Tracking
3+
about: Template for tracking patches applied to third-party libraries
4+
---
5+
6+
If you haven't already, check out our [contributing guidelines](https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md) and [patch guidelines](https://github.com/Expensify/App/blob/main/contributingGuides/PATCHES.md) for information on how to manage patches.
7+
___
8+
9+
## Patch Information
10+
11+
**Library Name:** <!-- e.g., react-native-pdf -->
12+
**Library Version:** <!-- e.g., 6.7.3 -->
13+
**Patch Number:** <!-- e.g., 001 -->
14+
**Patch Description:** <!-- e.g., update-podspec-to-support-new-arch -->
15+
**Full Patch Filename:** <!-- e.g., react-native-pdf+6.7.3+001+update-podspec-to-support-new-arch.patch -->
16+
17+
## Patch Details
18+
19+
### Reason for Patch
20+
<!-- Explain why this patch is necessary. What issue does it solve? -->
21+
22+
### Changes Made
23+
<!-- Briefly describe the changes made in the patch -->
24+
25+
### Upstream Status
26+
**Upstream PR/Issue:** <!-- Link to the PR or issue in the upstream repository, if one exists -->
27+
28+
## Related Information
29+
30+
**PR Introducing Patch:** <!-- Link to the PR that introduced this patch -->
31+
32+
## Additional Notes
33+
<!-- Any other relevant information about this patch -->
34+
35+
## Checklist
36+
- [ ] Patch file is correctly named and placed in the appropriate directory
37+
- [ ] Patch is documented in the corresponding `details.md` file
38+
- [ ] This issue is linked in the `details.md` file
39+
- [ ] Upstream PR/issue has been created (if applicable)

.github/actionlint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ self-hosted-runner:
1010
paths:
1111
'**/*':
1212
ignore:
13-
# This is meant to be a temporary workaround for a bug in actionslint. Upstream:
13+
# This is meant to be a temporary workaround for a bug in actionlint. Upstream:
1414
# - issue: https://github.com/rhysd/actionlint/issues/511
1515
# - PR: https://github.com/rhysd/actionlint/pull/513
1616
- '"env" is not allowed in "runs" section because .* is a Composite action.*'

0 commit comments

Comments
 (0)